CentiPied: Centipede Arcade Restoration and Raspberry Pi Conversion


Custom Retro Front End

I wanted to be able to have something very lightweight to be able to switch between games. Anything pre-existing like PiPlay is much too heavy. I'm using WahCade/MahCade on my dedicated MAME cabinet, but even that is more than I wanted. I wanted some thing crappy and retro. So the best way was to make my own. Unfortunately, I'm a web programmer, so it's been awhile since I've done any C/C++ programming so I knew it was going to be a bit of research and trial and error to get this working.

I knew I wanted a graphical interface - but without resorting to the X Windows system. I needed this to be lightweight, all processing used for MAME, nothing on any window manager running in the background. I also didn't need any 3D craziness like OpenGL ES or whatnot. The first thing I found after searching was using the framebuffer device, very low level. This seemed to be what I needed. After trying a test program, it indeed worked...but rather awkwardly. The screen did some odd resolution flipping. Some had brought up the fact that it was pretty rough and prone to erroring out quite easily. So I looked for another solution, and found it - SDL. SDL or Simple Directmedia Layer libraries make it rather simple to program rudimentary graphics on Linux (and Raspberry Pi of course) using C++. This guide helped a bit with the setup and hello world, but the crux of what I needed to do was found mostly in Lazy Foo's SDL 1.2 Tutorials

This part of the project I spent a good bit of time on, and unfortuately, it's been on the debugging side. As of this writing, I am still having problems with the Pi intermittently just not initializing SDL - it just hangs with a black screen and mouse cursor, with no entry in any of the running processes. What's infuriating is that after trying one thing after another to pin it down, it seems like it just works or doesn't when it wants, no rhyme or reason to it. I used SDL 1.2, but it looks like SDL 2.0 is now possible on the Raspberry Pi, so I may try going down that path instead, especially since Lazy Foo converted all his tutorials over to SDL 2.0 as well.

Update: it seems others have been pulling their hair out over this same issue, and someone as been kind enough to write some fixed SDL library packages - see the forum post here.