The story for this one starts a few months ago, when [John Green] released his PICO-GB project. His code allowed the Raspberry Pi Pico to stand in for a Game Boy cartridge, complete with a simple text menu that let the user select between ROMs that had been baked into the microcontroller’s firmware. The project was particularly notable for the fact that it was entirely a software solution; while a custom breakout cartridge made for a handy temporary solution, you could have permanently wired the Pico’s pins directly to the Game Boy’s cartridge connector if you wanted to.
Then in early June, the RP2040 chip that powers the Pi Pico went up for sale in single unit quantities. That opened up the possibility of building the PICO-GB functionality into a cartridge small enough to actually fit inside the Game Boy. So [Martin “HDR” Refseth] got to work creating the slick cartridge PCB you’re seeing now.
The RP2040 is joined by a trio of Texas Instruments TXB0108 level shifters, and there’s a spot for adding a SPI flash chip. The RP2040 supports a maximum of 16 MB of external flash, but given the size of Game Boy games were generally measured in kilobytes, that shouldn’t pose much of a problem.
Looking ahead, the original PICO-GB documentation mentions enhancements like loading ROMs from SD card, as well as hardware additions like a real-time-clock for the more advanced games that supported it. We assume those concepts will become part of [Martin]’s PCB eventually, but these are still early days.
We’ve seen Game Boy cartridge emulation with a microcontroller in the past, but we’re exited to see how the unique capabilities of the Raspberry Pi Foundation’s custom silicon can improve the state-of-the-art.
[Thanks to Itay for the tip.]
10 thoughts on “Pi Pico Game Boy Flash Cart Gets Slim RP2040 Upgrade”
When micro-controllers get fast enough to bit-bang-emulate a ROM.
With the gameboy only running a 4Mhz clock (8Mhz in doublespeed on the CGB) it’s not that surprising that it is possible. (ok, it’s actually 2^22Mhz). Note, it would require some proper checks if it does keep up with the DMA speed of the Color Gameboy, not many games use DMA from the cartridge, but it’s the fastest the bus needs to respond.
The only really important question from the gameboy development community would be, what’s the power draw? If that’s decent enough, then this could be a pretty nice contender for an actual flash cart. Right now power hungry CLPDs or FPGAs are used to emulate the memory bank controllers, next to needing RAM/Flash chips.
Also, if you are interested in gameboy development, there is a 3 month compo started today, with some pretty big prices! https://itch.io/jam/gbcompo21
No better time to start hacking at this old beast then today.
The real bottleneck is memory speed. Anything slower than sram or parallel flash is too slow to make a cartridge.
The cartridge interface always operates at 1MHz (2MHz GBC), so that leaves you with just a couple hundred nanoseconds to decode an address, fetch data from your own memory and send it to the Game Boy.
I assume this project only works for games that fit in the 264KB of sram on the RP2040. I’d be pleasantly surprised if that’s not the case.
Here’s my own flashcart project btw :) https://hackaday.com/2020/01/27/all-the-games-in-one-cartridge/
Very nice. I hadn’t seen any of this work until now, but I was literally just embarking on exactly this project — the last bits I needed for prototyping just arrived yesterday. Always a bridesmaid, never a bride.
RP2040 seems a pretty good solution for early 8-bit flashcarts. I plan to do the Atari systems similarly, and some other projects interfacing with early consoles.
Yup, ordered the parts and have them here to do something similar, but had not started on this stage of it. Might just have to see what I can do with this hardware design.
This opens the possibilities of emulators :)
like doom on a NES cartridge: https://www.youtube.com/watch?v=FzVN9kIUNxw
nes/snes/c64/vic20/atari/sms/msx/ibm-xt/pcjr/pico8 & gb/gbc emulation should be possible.
on gb/nes/snes/c64/vic20/atari/sms/msx/pcjr/genesis pico powered cartridges
but not enough memory to run doom..
and some cartridges may need more external logic for more pins.
Bummed I’ve missed out on being first to hardware, but lots of interesting stuff to do on the software side. If you get the RP2040 to do the lifting, I think it should be reasonable to get 360 tiles (enough to fill the screen) across the cart bus. If you can make the PIO handle memory accesses, the two ARM cores can run relatively free to do rendering. It would be not unlike the Sega 32X in a lot of respects. There’s also a pin on the cartridge slot for passing one channel of analog audio into the Gameboy, so you could run a synthesizer or decode mp3s maybe.
There might be just enough pins left on the RP2040 to have a modified card design with a sizable serial flash / SD card that bulk audio or even some kind of video could be streamed from. Provided power draw is manageable, of course.
‘The project was particularly notable for the fact that it was entirely a software solution’ – well, except for needing a Pi Pico of course
Seeing the title I thought it was a custom GB cart which allowed to run PICO-8 fantasy console and games on a regular GBC. How great would that be!
PICO-8 does run on ARMv6, and M0+ is basically ARMv6.
However an elf loader and wrappers for any used libs, and a basically a linux subset in 256KB is near impossible.
I dont even know if the binary itself can fit into 256KB or if RP2040 can support PSRAM?
It might be easier to get one of the pico8 clones to run on it.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)