Sound

For the first four days, cable-club was silent. The screen showed FireRed's intro — the title screen, the Oak speech, the options menu — but there was no sound. Audio registers existed as stubs that accepted writes and returned zeros. The game thought it was playing music. Nothing came out. The GBA’s audio hardware The Game Boy Advance has two audio systems running simultaneously. The PSG (Programmable Sound Generator) is inherited from the original Game Boy. Four channels: two square waves with configurable duty cycle and frequency sweep, one custom waveform channel that plays samples from a 32-byte wave RAM, and one noise channel driven by a linear feedback shift register. Each channel has its own length counter and volume envelope. This is the chip-tune hardware — the beeps, the bloops, the sound effects. ...

April 5, 2026 · 5 min · Christopher Griffiths

Frame 476

FireRed crashed eight seconds after boot. Every time. Frame 476. Not a hang, not a glitch — the CPU branched to garbage in palette RAM and stopped executing real instructions. The crash was 100% deterministic. Same frame, same instruction, same corrupted address. That kind of determinism means there is a root cause, and it is findable. The symptom Pokemon FireRed uses a sound engine called m4a (MusicPlayer2000). It runs in IWRAM — the GBA’s fast 32KB internal RAM — and mixes audio samples into a buffer every VBlank. A register called R5 tracks the write position in the buffer. Normally, R5 stays within the buffer boundaries: a 1,584-byte region starting at 0x030061B0. ...

April 4, 2026 · 5 min · Christopher Griffiths

I threw away a working emulator

On March 29, I started writing a Game Boy Advance emulator from scratch in Rust. By March 30 — seventeen commits and roughly thirty-six hours later — Pokemon FireRed was playing its intro cinematic. The CPU passed 100% of the standard ARM and Thumb test suites. The relay server was working. I had a functioning emulator. Then I threw it away. Why a GBA emulator My nephew Declan has never seen a Game Boy. I wanted to trade Pokemon with him over the internet, the way I did with a link cable twenty years ago. That is the entire motivation. ...

March 31, 2026 · 5 min · Christopher Griffiths