Saturday, November 30, 2013

PiMAME - Retro Gaming on the Raspberry Pi


There have recently been a number of cool projects where the Raspberry Pi has been used to build a retro arcade cabinet. There is quite a bit of effort in fabricating a full arcade cabinet, but one can still enjoy the old arcade games just by connecting the Raspberry Pi to a TV and installing some software. One fairly complete software solution is PiMAME, which is a modified Raspbian built with all of the common emulators preinstalled. If you have ever attempted to compile just MAME on a Raspberry Pi, you can appreciate not having to burn those 6+ hours.

PiMAME - "PiMAME is the gaming OS for the Raspberry Pi. PiMAME runs MAME, Neo Geo, and PlayStation games out of the box, and is constantly being updated with new emulators and tools. Included is a suite of software designed to reduce the complexity and time needed to setup a fully working system. An updater is included with the distribution. PiMAME is based off of Raspbian, the official Linux distribution for the Raspberry Pi."

Emulators

PiMAME includes the following Arcade Emulators:
  • AdvanceMAME
  • Neo Geo (GNGeo)
  • MAME4All
  • FBA (CPS1, CPS2, Neo Geo)

PiMAME also includes the following Console Emulators:
  • PlayStation 1 (PCSX_ReARMed)
  • Genesis (DGen)
  • Nintendo Emulators
    • SNES (PiSNES / SNES9x Advmenu)
    • NES (AdvanceMESS)
    • Gameboy (Gearboy Advmenu)
    • Gameboy Advance (gpsp)
    • N64 WARNING ALPHA!
  • Atari 2600 (Stella)
  • Commodore 64 (VICE)

Installation

To enjoy PiMAME, one only needs to download the compressed image (1.6 GB), extract the image (4 GB), write the image to an SD card and power on the Pi (quickstart). I would highly recommend burning this image onto a secondary SD card, so as not to destroy your hard work on your current Pi setup. You really should have a couple of free SD cards laying around when playing with a Raspberry Pi.

Download and write the image to a SD card:
# wget http://sourceforge.net/projects/pimame/files/pimame-0.7.10.img.zip/download
# unzip pimame-0.7.10.img.zip
# sudo dd if=pimame-0.7.10.img of=/dev/sdh bs=1M

It took about 10-20 minutes to write the 4 GB image to my SD card. The /dev/sdh is where my USB SD Card Reader appared on my system. Check dmesg after connecting your USB SD Card Reader to determine the correct device node for your system.

Once the system boots, make sure to manually run raspi-config and use the common options such as "Expand Filesystem", "Change User Password", "Hostname", etc. The raspi-config tool is not auto run on boot like it is with the base Raspbian distribution.


PiMAME Menu

As you power on the Raspberry Pi if you see the PiMAME logo (pictured above) you know you burned the right image. Once the PiMAME has fully booted, you will be presented with the following menu:

From this menu you can start the various game emulators.  You can also start some maintenance operations (under Tools) such as raspi-config, reboot and shutdown.  Unfortunately, the system update is not included in this menu.

If you happen to exit the PiMAME Menu, you can return to it by running:
# python /home/pi/pimame_files/menu.py

Add ROMs Through Web Interface

The PiMAME comes with a convenient built in web server that can be used to add ROMS. There is also a built in FTP server (recommended for files over 50 MB), for whichever is more convenient.

NOTE: All ROMs should be stored in the /home/pi/roms/ directory

To determine your IP address, you simply select "Tools" from the menu. Your IP address will be listed at the top of the "Tools" page.

Once you have the IP address, open up a browser and browse to the IP address.


Click the "ROM Uploader" button, and login. Select the "roms" folder. This is where your ROMs should go.

ROMs

PiMAME only comes with one freeware ROM by the name of 'Gridlee'.

So where does one get other game ROMs from?

Legal:
Less Legal: ("Yo Ho, Yo Ho, A Pirate's Life For Me")
Just in case you are curious, there is a very small handful of game creators that have opted to allow legal usage of their game ROMs.  Unfortunately, none of these are any of the big game developers like Nintendo, who are very actively against emulators and ROMs.

Gridlee

Let's see one of the emulators in action.  As Gridlee is the only included ROM, let's play Gridlee.  To start Gridlee, from the PiMAME menu, select "Arcade Emulators" then "AdvanceMAME".  When AdvanceMAME loads there will be only one game listed, Gridlee.  Press enter to start Gridlee.

The point of Gridlee is to move your character around and catch the bouncing balls.  There are also tall cylindrical enemies you can shoot, before they electrify the ground and hurt you.

I was a bit frustrated at first, trying to determine what they key bindings were and how to start the game.  To save you a few seconds, press "1" to start a single player game, or press "2" for a one-at-a-time two player game.  Press "5" to add coins for player 1 and press "6" to add coins for player 2.  The arrow keys will move your character around, and the "Control" key will fire your weapon.  You can press "F1" to see a list of the key options.

Maintenance

To perform updates and other tasks, I prefer to do these from a remote SSH session. As mentioned before, to determine your IP address, you can simply select "Tools" from the menu, or you can exit the PiMAME Menu and run ifconfig. Your IP address will be listed at the top of the "Tools" page.

The default user login is user "pi" with a password of "raspberry". When you connect through SSH the PiMAME menu will appear. This is due to PiMAME being set to start in the user's profile. None of the applications will run from a SSH session, so select menu option "6 - Exit" to return to the console.

Once you are in the shell, you can run the PiMAME update (or other console tasks).
# cd pimame_installer/
# sudo ./update.sh

# sudo reboot

2 comments:

Molt Soltan said...

I recently needed a ROM emulator at Sony. And I found it by accident. There are https://romsmania.com/ a lot of useful information for fans of retro games. Good luck in game!

Dung Maurice said...

You can find some good phone spy applications in this blog