Skip to content

Instantly share code, notes, and snippets.


Wenting Zhang zephray

View GitHub Profile
zephray / epd.c
Created May 28, 2021
16-level greyscale test code for GDEW0154M10
View epd.c
#include "epd.h"
#include "image.h"
const unsigned char EPD_LUTGreyscaleA[] ={
0x00, 0x05, 0x07, 0x00, 0x00, 0x01,
0x00, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x0c, 0x13, 0x0f, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
zephray / el-pio-demo.c
Last active Aug 5, 2021
Driving EL display with Raspberry Pi Pico's PIO
View el-pio-demo.c
// Copyright 2021 Wenting Zhang <>
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in
View lael320256_demo.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <ctype.h>
#include <time.h>
#include <wiringPi.h>
#include <math.h>
#include <bcm_host.h>
View 3.2.102_tinyconfig
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.2.102 Kernel Configuration
# CONFIG_64BIT is not set
# CONFIG_X86_64 is not set

Mooneye GB acceptance tests

Test GB BOY Colour GB BOY
add sp e timing 👍 👍
boot div dmg0
boot div dmgABCmgb 👍
boot div S
boot div2 S
boot hwio dmg0
zephray / init_seq.txt
Created Feb 24, 2018
View init_seq.txt
By miggae
Hi Tannous
Below, there are the ADC registers "writes" of a working example on ML507.
View setrain.cs
//Space Engineers Automatic Train Control Script
//Written by ZephRay for ATSES
/* Configurations */
public const string PROGRAM_BLOCK_NAME = "Train CU"; //编程块名称
public const string LCD_BLOCK_NAME = "Train CU LCD"; //调试LCD名称
public const string BACK_THRUSTER_NAME = "Train Back Thruster"; //后推进器名称
public const string FORWARD_THRUSTER_NAME = "Train Forward Thruster"; //前推进器名称
public const double ALLOW_VELOCITY_ERROR = 3.0; //调速控制误差范围 m
zephray / utf8to1252.c
Last active Apr 18, 2017
UTF8 to CP1252
View utf8to1252.c
// Copyright (c) 2008-2009 Bjoern Hoehrmann <>
// See for details.
// Copyright (c) 2017 ZephRay <>
// utf8to1252 - almost equivalent to iconv -f utf-8 -t windows-1252, but better
// What this program can do?
// Sometimes you would encounter some "double utf-8 encoded file", most cases
// from a MySQL dump. If this happens, you may find some luck use this program
// to fix your file!
zephray / ebmviewer.c
Created Mar 22, 2017
ebm image viewer
View ebmviewer.c
#include <SDL.h>
#include <stdio.h>
#define RGB(r, g, b) (((r)<<16)|((g)<<8)|(b))
void displayImage(SDL_Surface *surface, uint8_t *image) {
uint32_t *pixels = (uint32_t *)surface->pixels;
uint32_t pixel;
uint16_t raw;
uint8_t y;