Game Boy Cartridge Equipped with an STM32 for Running Little Sound DJ
Andrzej Surowiec designed a custom Game Boy cartridge around an STM32F405 with 1MB of flash and 192KB of RAM.
When nostalgia strikes and the original gaming console isn't available, most of us turn towards an emulator to play our favorite games. While that can help us relive the good old days, we need the original hardware to get the full experience of retro gaming. In Andrzej Surowiec's case, the electronics hacker went a different route and developed a Game Boy cartridge that can be loaded with any game, and played on the original handheld console.
Surowiec was looking for a way to play Little Sound DJ on his Game Boy and found another electronics hacker (Dhole) who created a similar Game Boy cartridge around the popular STM32 microcontroller. Although Dhole’s design was a success, it can’t save games, a feature Surowiec wanted in his version, and a task easier said than done.
The original Game Boy cartridges stored saved games in battery-backed SRAM, which preserves the game state when the console is powered off. To achieve the same save state, Surowiec added a CR1220 coin cell holder; however, retaining that data requires more current than that battery could provide. He decided instead that he could use the battery to save SRAM game content to flash or external FRAM chip, which didn’t work out as planned.
After a few tweaks, he was able to use the onboard button to dump the RAM contents into the microcontroller’s flash storage, only doing so crashes the console as the firmware is busy writing to the flash to accept BUS commands, but Surowiec states users were turning off the console anyway. He also added USB mass storage support to his design, which allows him to upload and download ROM and RAM without the need for any additional software.
Surowiec has uploaded a detailed walkthrough of his Game Boy cartridge on his project blog, complete with links to all design files and code for those who would like to recreate his build.