My first project for Raspberry Pi is game emulator. Oh, no, it is the second. The first is to make a case for Raspberry Pi.
Let us look at the Raspberry Pi’s status when it working inside of the case.
The board is sitting inside of the box perfectly. The white lan cable connect from left. Usb keyboard and usb mouse connect from left. orange HDMI cable is from up. The mini-usb power cable from right.
I followed the instruction of Shea Silverman’s blog.
I tried the Namco Galaxians game when I first run it.
I recorded the steps how I run to make it works below.
0) Prepare the SD card, I use 2012-09-18-wheezy-raspbian.zip. Then I run apt-get update and apt-get upgrade to keep system updated.
1) Download the Mame binary file
2) Unzip the binary zip file to mame directory.
3) chmod 777 /dev/fb0
4) Put rom, galaxian.zip, into mame/share/advance/rom/
5) Run the command to start game Galaxy
6) The first time it is run it will generate a set of folders and files into ~/.advance
Edit ~/.advance/advmame.rc to add the proper display configuration
For HDMI try:
device_video_clock 5 – 50 / 15.62 / 50 ; 5 – 50 / 15.73 / 60
For NTSC TVs try:
device_video_clock 5 – 50 / 15.73 / 60
I use HDMI cable, so I pick the first choice.
7) Run the command to start game
cd into mame/bin/ then ./advmame galaxian
First time, I use keyboard to paly the game.
Key 5, 6 is to insert coin. Left Ctrl and Alt is used as button 1 and 2.
Four arrow keys is to move up, down, left, and right.
The second time, I used my old Logitech Precision Gamepad to replace the mouse, because Raspberry Pi has two USB port only.
The Raspberry Pi can recognize this USB Gamepad.