You might have seen the classic Youtube video by marcan showing a Gameboy Color being overclocked to arbitrary frequencies, using an FPGA development board.

Recently, I got hold of a GBC again and wanted to try this myself. I don’t have such an FGPA or a even a VCO, but I realized that the RP2040 on the Raspberry Pi Pico supports PWM at varying frequencies. Turns out, it indeed has a pretty wide frequency range, and it is trivial to connect it to a Gameboy.

After desoldering the original crystal oscillator, it’s a matter of connecting the PWM output to the bottom crystal pin (the CPU’s crystal input). The top pin can be left unconnected.

The wiring, exposing GND, VCC and the clock input.

MicroPython on the Pico makes it super simple to change the PWM frequency on the fly. As a proof-of-concept, I’m polling a potentiometer on an ADC pin and changing the frequency accordingly.

The only downside is that due to the scaling math it is not possible to produce the exact 8.388608 Mhz frequency the GBC expects. Even when quite close, the sound still sounds a bit “off”. I am not sure if this is really caused by the small difference in frequency or whether the PWM signal somehow messes up something else in the sound generation circuitry. Either way, at fast speeds this doesn’t matter. You can always add back the original crystal behind a toggle switch.

Because the frequency can be changed programmatically, there are some interesting things you could do with this. Some ideas I’d love to see:

  • Nicely package a small RP2040-based board and jump between frequencies using a button-combination. This is basically what the GBAccelerator offers (but with a different SoC and presumably way less hacky).
  • Listen to the address bus and automatically fast-forward through slow sections of certain games.

For now I went for a more analog (and more practical) experience: a fixed 16Mhz crystal (~2x speedup) behind a toggle switch.