Pico Held: Sega Mega Drive emulator | The MagPi #133

In the latest issue of The MagPi, out now, David Crookes takes a look at a device based around Raspberry Pi Pico that emulates the Sega Mega Drive and lets you play homebrew games.

Although there are many handheld retro game consoles based around Raspberry Pi devices, we still want to play with more. They help to keep the memories of old machines and titles alive, while providing the perfect opportunity to dive into a project and learn more about what is going on under-the-hood.

The 3.2-inch screen has a resolution of 320 × 240 pixels and it sits in a case that’s 136 × 60 × 12 mm. As well as a 3 W speaker, there’s an analogue control stick, three buttons, and an on/off switch. Pico Held is black with red buttons
Behold Pico Held

It’s this desire to understand that has driven Daniel Kammer to create Pico Held, a beautiful, open-source handheld with a Raspberry Pi Pico board at its heart. “There is so much you can learn from creating DIY projects,” he says. “By making it open-source, it also gives others the opportunities to learn – maybe they’ll help to improve Pico Held in the future.”

Hold fire

Before getting down to work, Daniel came up with some goals. “I wanted an appealing design, a screen big enough to play games on, a nice speaker for sounds and music, and a device powered by Raspberry Pi Pico – an amazing piece of hardware with a balanced set of features,” he explains.

Raspberry Pi Pico works well as a console emulator. RP2040 Plus can be used instead to provide 4 or 16 MB  of flash memory
Raspberry Pi Pico works well as a console emulator. RP2040 Plus can be used instead to provide 4 or 16 MB of flash memory

There were clear reasons for this. “A small screen and subpar speaker kind of defeats the whole point of having a gaming device in the first place,” he notes. This prompted Daniel to hunt for the largest, low-cost screen possible. “A 3.2-inch display was the biggest IL19341 I could get on AliExpress,” he says, but the goals posed a host of challenges.

Since Daniel custom-made a PCB and 3D-printed a case, he needed everything to fit. “I had to align the button holes to the PCB contacts, make sure the LCD was nicely centred, and the analogue stick was fitting,” he explains. “I also found it quite challenging not to exceed a thickness of 12 mm. For every flaw, I made a new PCB and new case!”

Daniel says homebrew game developers would be able to find a way to cope with three buttons. “DIY is about creativity, right?”, he says
Daniel says homebrew game developers would be able to find a way to cope with three buttons. “DIY is about creativity, right?”, he says

In the end, sacrifices needed to be made. “My prototype had four buttons, but I decided to go for three and use an analogue stick instead of a D-pad,” he says. “I also wanted to design the Pico Held in a way that others could build it too. That was a big constraint.”

To be this good

Developing the software proved even more challenging. Daniel wanted his handheld to play retro games, so he modified a Sega Mega Drive emulator called Gwenesis by bzhxx. “I had to fiddle with the endianness [the order in which bytes are stored] and the RAM/ROM handling,” he recalls. “It was pretty frustrating because virtually all errors were hard faults.”

The result has been an emulator running Mega Drive games more slowly than intended, but Daniel says lots of games still remain playable. “Sound was a bit trickier: I had to make the sound generation per frame/per line rather than per cycle, and that causes the sound to be flawed in a lot of games.” Daniel has also been able to run a NES emulator on his device: “It runs at full speed,” he tells us.

More than that, Daniel wants people to create their own games. “The Pico Held’s software library was written with the idea of allowing people to create classic pixel art games with 256 colours,” he reveals. “Creating the blitter and the tile map blitter in the software library for this purpose kept me busy for days.”

Yet, it’s been worth the effort. “Some have said the analogue stick isn’t well-suited for this kind of game device, and some want four buttons,” he says, confessing that he isn’t actually really into gaming. “But the reactions have been surprisingly positive. I was really glad about that!”

The MagPi #133 out NOW!

You can grab the brand-new issue right now from Tesco, Sainsbury’s, Asda, WHSmith, and other newsagents, including the Raspberry Pi Store in Cambridge. It’s also available at our online store which ships around the world. You can also get it via our app on Android or iOS.

The Magpi issue 133 cover

You can also subscribe to the print version of The MagPi. Not only do we deliver it globally, but people who sign up to the six- or twelve-month print subscription get a FREE Raspberry Pi Pico W!

The free PDF will be available in three weeks’ time. Visit the issue page for more details.

5 comments
Jump to the comment form

Alex79uk avatar

If it’s a device mainly for emulating the Megadrive/Genesis, why on earth would you put an analogue nubbin on it and lay the three buttons out like that? 🤷

Reply to Alex79uk

Liz Upton avatar

Optionality, my friend!

Reply to Liz Upton

Drew avatar

Slightly ironic this has been christened the Pico Held. I wonder if the creator is aware of the original product to use the Pico name, the Sega Pico ‘educomputer’ the mid-1990s for young children, which was based on the Genesis/MegaDrive?

https://en.m.wikipedia.org/wiki/Sega_Pico

Reply to Drew

Ashley Whittaker avatar
Unknown avatar

Yes, a replica of the Sega Pico would indeed be an interesting project, if you could figure out how to make it and all…

Reply to Unknown

Leave a Comment