So a while ago I ordered and received my Raspberry Pi Model B computer. I recently received a case, HDMI to DVI adapter, USB cord and SD card reader for it and decided it’s time to have a decent play.
I’d been thinking for some time now what it is that I wanted to do with the Pi… People have been making web servers (have to try harder than that!), media players, robotics control systems etc. There was talk about people successfully getting an arcade machine emulator working on Debian Squeeze (Raspbian - Download and details here) – The Pi’s favoured operating system. This was, however, only in a virtualbox virtual machine.
I came across an article yesterday that described the successful compilation of AdvanceMAME on a Raspberry Pi, and I thought I’d take a look. I followed the instructions and got AdvanceMAME compiled (the whole process took well over 6 hours, I’m not sure of the total). After some reconfiguration (note #1) I was able to play SuperTank on my Pi!
There were also some performance issues, which makes using MAME on a Pi almostĀ infeasible (note #2). Overall it was a great learning experience, as I’ve never had to baby something through such a large compile – But if you follow the steps correctly and remain patient, it should work out nicely.
I haven’t heard of many success stories for the other operating systems approved for the Pi, so I’d recommend sticking with Raspbian. Also don’t use an Apple keyboard with it.
The SD card reader is a cheap, multi-card unit that is USB powered. The video connector is a cheapy too, going from HDMI male (Pi) to DVI female (monitor). I purchased the case on ebay.
I’ll be building a menu system eventually using Python.
Note #1:
Inside the advmame.rc config file (~/.advance/advmame.rc), I had to set the display colours setting to use 16bit colour:
display_color bgr16
This solved an issue I had when I was playing Metal Slug (all versions had the same issue), where the majority of the colours on the screen were a violent shade of green. After talking to a mate who’s had experience with this, we believe the system was defaulting to the “yuy2″ setting (YUV). I had to set it to “bgr16″, which fixed all the colours. The possible values are:
auto (Auto choose best option)
palette8 (Palettised 8 bits mode)
bgr8 (RGB 8 bits mode)
bgr15 (RGB 15 bits mode)
bgr16 (RGB 16 bits mode)
bgr32 (RGB 32 bits mode)
yuy2 (YUV mode in the YUY2 format)
I have not tested any other values aside from bgr16, and have only assumed it had defaulted to the yuy2 setting.
Note #2:
Although SuperTank worked a treat (was completely playable), Metal Slug was quite slow. I ended up using frameskip to speed it up:
advmame mslug --frameskip 0.5
This helped a bit, but I wouldn’t say that it made it playable. It was nice for a gimmick, but I don’t think (at this stage) that the Raspberry Pi is appropriate for a MAME machine.
Edit: You should also modify the memory split of the pi before playing around with MAME, as the default setting of 16mb for the video is very insufficient. Run the following command to get into the config:
sudo raspi-config
Enter the memory split menu and select the bottom-most option, diving the memory down the middle (128mb each).



