Skip to content

Instantly share code, notes, and snippets.

View m4x10187's full-sized avatar
❤️
Let's All Love Lain

SylverReZ m4x10187

❤️
Let's All Love Lain
View GitHub Profile
@m4x10187
m4x10187 / gw_flash.py
Created August 10, 2025 09:52 — forked from SciresM/gw_flash.py
utility for interacting with gateway modchip updates
import sys
from struct import pack as pk, unpack as up
def u32(x):
return x & 0xFFFFFFFF
def tea_update_custom_mac(mac, v, k):
v0, v1 = v[0], v[1]
cur_sum = 0xC6EF3720
k0, k1, k2, k3 = k[0], k[1], k[2], k[3]
@m4x10187
m4x10187 / GW3DS eMMC password algorithm.txt
Created July 9, 2025 18:56
Technical specs regarding Gateway 3DS' eMMC encryption as part of its anti-clone protection
This is how they generate the password (the XOR stuff):
pwd[0] = (cid[3]>>8 | cid[2]<<24) ^ 0x7E98C617u; // 0x17C6987E
pwd[1] = (cid[2]>>8 | cid[1]<<24) ^ 0xDEED0144u; // 0x4401EDDE
pwd[2] = (cid[1]>>8 | cid[0]<<24) ^ 0x68C51A37u; // 0x371AC568
pwd[3] = (cid[0]>>8) ^ 0x62B5FF65u; // 0x65FFB562
The shifting around is just because i have the CID laid out differently than what they used:
/ CID is in 128 bit mixed endian (MSB in cid[0], little endian words).
/ Shift the CID back into the screwed up format TMIO uses and apply key
@m4x10187
m4x10187 / macos_e3.h
Created January 8, 2024 18:16
Mac OS boot logo for Ender 3
#pragma once
#define CUSTOM_BOOTSCREEN_BMPWIDTH 128
const unsigned char custom_start_bmp[] PROGMEM = {
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,B00000000,
@m4x10187
m4x10187 / PSPATHS.REG
Created January 8, 2024 18:08
PsyQ environmental variables registry key for Windows Me
REGEDIT4
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\Environment]
"EnvAction"=dword:00000000
"windir"="C:\\WINDOWS"
"winbootdir"="C:\\WINDOWS"
"COMSPEC"="C:\\WINDOWS\\COMMAND.COM"
"PATH"="C:\\WINDOWS;C:\\WINDOWS\\COMMAND;C:\PSYQ\BIN"
"PROMPT"="$p$g"
"TEMP"="C:\\WINDOWS\\TEMP"