gotnull

A development blog. Mostly low-level stuff: bare-metal firmware, fantasy consoles, games, and whatever else I happen to be building. Notes written as I go, for anyone who finds them useful.

Reading a Real Cartridge Through a Fake CH340

The console's USB host port met a GBFlash cartridge reader that pretends to be a CH340 serial chip. Three wrong theories, one packet-size discovery, and by the end of the day the firmware read a physical Game Boy cartridge's header and validated it.

A Sawtooth Where the Noise Was

An EMOTIV EPOC headset from 2013, its USB receiver, and no vendor software. Identifying the dongle took minutes. Getting it to emit a single packet took hours and turned out to be a switch. Decrypting the stream took one run once I stopped trusting the documentation and scored every candidate key against real packets.

Running Ahead of the Sound Chip

The SNES core was losing four million cycles a frame waiting for a sound chip on another board to answer a one-byte question. Teaching the H7 to predict the answer and execute speculatively lifted dense Super Mario World from 35 to 49-52 fps. Then the fastest exact build ever measured painted garbage on the top of the screen while every checksum said it was perfect.

A flight recorder for firmware

Timing-sensitive failures on this console keep beating my telemetry: the screen goes wrong while every counter reads clean. This is the build log of a recorder that captures a working run and a failing run of the same workload, so a tool can find the earliest difference that matters.

The Receiver Was Innocent

I spent days optimising the HDMI coprocessor because every symptom said it was holding the SNES back. The optimisations worked, the frame rate climbed, and then the measurements turned around and convicted a different part entirely: the wire. This is the story of proving a bottleneck before building its replacement.

When 97% Is the Most Valuable Number

I soldered two bodge wires, taught the HDMI coprocessor to talk back, and made it run the SNES sound chip with real Super Mario World music. It reached 97% of realtime. That number is worth more than a pass.

Every Millisecond Now Has a Name

The from-scratch SNES core matched the reference emulator to the cycle across a 750-frame run of Super Mario World. Then the hardware priced five optimisations: two worked, two did nothing, and a profiler said the real problem is memory, not arithmetic.

Press Left Mouse Button

The emulated Amiga gets a mouse, opens a window, and then boots Turrican II - whose custom trackloader refused to work until the floppy drive learned to actually spin.
View all posts →