11 January 2013
Shea Silverman has ported MAME to the Raspberry Pi, which means you can play classic arcade games on your Pi.
MAME is short for Multi Arcade Machine Emulator. Emulators are programs that that enable software designed for one machine (in this case an arcade cabinet) to run on another (your Raspberry Pi). As another example, you can use an Amstrad CPC emulator to play the games I wrote in the 1980s on your Windows PC. Emulators are popular because they're convenient (it's easier to use an emulator on your current PC than to set up a dedicated machine). Some people believe early video games are as historically significant as early black and white films, and emulators can also help to preserve software for future generations.
To use Shea Silverman's PiMAME, you need to download the SD card image and flash it to the SD card as you did for the Linux operating system originally. For example, you can use Image Writer for Windows to copy the image file to an SD card using your Windows PC. You need to take special care with this process, because anything on the SD card is wiped, and if you specify the wrong drive, that might be erased by mistake.
PiMAME comes with Gridlee (pictured), which was never released when it was made, but has since been made freely available for non-commercial use by its creators. Other games have also been made freely and legally available by their creators and can be downloaded here.
You add any additional games in the /home/pi/roms/ directory on the SD card. The PiMAME SD card image includes the desktop environment so the easiest way to copy or move files is using the File Manager. When you switch the Raspberry Pi on, the SD card boots into PiMAME, but you can press Escape to go back to the shell prompt and use 'startx' to go into the desktop environment. Alternatively, you can download the ROMs using the Raspberry Pi itself and save them in that directory. You don't need to unzip them: zip files work fine.
The default keys are 5 to insert a coin, 1 to start, cursor keys to move, and the buttons are (in order) Left Control, Left Alt, Spacebar and Left Shift. In practice, that usually means Left Control is fire.
Not all games I've tried work. Some won't load and some have problems with the sound, including Gridlee. It's a little bit hit and miss then, but when it works, it's fabulous. Shea Silverman has done a great job on bringing classic games to the Raspberry Pi.
My book Raspberry Pi For Dummies is available for preorder now.
I wanted to use a RPi in my own arcade cabinet, but so far I have not found a viable way to make it drive a 15Hz arcade monitor. I could put a modern screen in the cabinet, but it just wouldn't be the same.
Other emulators are faster; where MAME developers have a choice between clear, portable code, and performance, they choose the former.
There's a somewhat abortive effort to document the basics in plain English at their Wiki too. http://mamedev.org/devwiki/index.php/How_Arcade_Games_Work
You make a good point about the source code being a way to record how hardware was designed so the games can be preserved for the future and analysed now for educational purposes. As you say, MAME considers the ability to play to be a nice side effect of that. Very few users probably dig into the source code, but the point is that it's there for those that do, and these are the people who will ensure we can preserve these important cultural artefacts.
Blog Home | Website Home