Installation of MAME4all-pi is as simple as downloading the zip file, unzipping it (using the unzip command), then running mame. In between unzipping and running mame, you have to get the appropriate MAME ROMs you want to play (I won't mention any sources here so don't ask) and copy it to the roms directory under mame4all.
unzip mame4all_pi.zip mame4all
cd mame4all
./mame
Press ESC to exit mame4all and TAB if you want to get to the mame configuration menu. The joystick was plug and play except only the buttons would work but not the directional stick. To make sure the joystick is sending data when the joystick is moved or buttons are pressed, I download the joystick package which includes some useful diagnostic tools. If Raspbian sees the joystick correctly, there'll be a js0 device file in /dev/input representing the 1st joystick. To see the raw data read from this file, you can run the jstest command
sudo apt-get install joystick
sudo jstest --normal /dev/input/js0
As you move the joystick around and press the buttons you can see the values being displayed on the screen. In the out of box state, moving the joystick up and down modifies axis 2 and 3 whereas mame4all is looking for values under axis 0 and 1. Normally you'd need a update the source for mame4all-pi to get this to work and compile it but for this particular joystick, you just have to press the Auto and Clear button at the same time once and it'll toggle the mode to act like a traditional directional joystick. This state isn't persistent and you'll have to do this every time you connect the joystick the first time.
![]() |
| jstest output |



No comments:
Post a Comment