Compiling MAME, Linux Wiz Advice Needed

Ok, I spent more time on this today, and I got something working. If anyone can figure out better MAME settings for the mame.ini or the default.cfg, or anything else, please share. I think I’ve reached the limit of what I can do with the pre-compiled Raspberry Pi 3 binary that was found at the link above.

I expect compiling a custom GameShell build could bring speed improvements. I’m not sure if this one is making use of the multiple cores on GameShell, and I’m not sure if it’s making use of any video acceleration. To help with speed I turned off joystick inputs and also reduced the sound quality. Frameskip is also on by default, which is painfully obvious in games like dorunrun.

Since it seems that guy maintains an updated Raspberry Pi binary for MAME releases, I copied his file to my own server. That way the link won’t break if he changes/updated the file If someone else wants to mirror or put it on github or whatever, that’s great – feel free!

Here’s my copy of his file, for MAME 0.211, that will run on GameShell:
http://michaeladcock.info/temp/gameshell/mame0211b_rpi3.zip

Download that file and unzip somewhere on your GameShell (I unzipped in the cpi home directory so it created /home/cpi/mame0211b_rpi3).

Next, download this file: http://michaeladcock.info/temp/gameshell/mame0211b_rpi3_gameshell_config_v1.zip

Put it in the MAME directory you created (in my case, /home/cpi/mame0211b_rpi3) and unzip. This will give you a new mame.ini file with settings that seemed to work decently on GameShell, a default.cfg file with GameShell buttons mapped to MAME keys (more on that in a moment), and a better MAME UI font so you can actually read the text on the screen (it’s still tiny though!)

Finally, download this action.config:
http://michaeladcock.info/temp/gameshell/mame0211b_rpi3_gameshell_action.config_v1.zip

Put it where you want in your menu. I created a new /home/cpi/apps/Menu/20_Retro Games/09_MAMEPI and put it there. The contents are:

ROM=/home/cpi/mame0211b_rpi3/roms
ROM_SO=/home/cpi/mame0211b_rpi3/mame
EXT=zip
LAUNCHER=
TITLE=MAMEPI Roms
EXCLUDE=neogeo.zip
SO_URL=

You’ll need to change the mame directory paths at the top if you put yours somewhere else. This was just a hacky way to use an action config and launch standalone MAME, like other folks have done in the past. The ROM path is there as well. I recommend keeping the MAME ROMs separate from your Retroarch version since this is the latest version of MAME, and things would get messy.

While the action config will let you pick roms from the usual launcher list, It’s worth noting that MAME can also be run without passing any ROM name to it. If you just launch the binary “./mame” using a script, you’ll get the default MAME menu screen and can pick ROMs. With the font change I made, it’s actually sort of usable. You’ll need to be able to use the Tab key though, which brings me to…

MAME GameShell key bindings:
dpad - usual arrow keys for joystick (left side) in games, menu selection, etc.
A/B/X/Y - (xbox layout) for dual stick games (like Robotron), these are the right side joystick
A - player 1, button 1
B - player 1, button 2
X - player 1, button 3
Y - player 1, button 4
SHIFT A - player 1, button 5
SHIFT B - player 1, button 6
SHIFT X - player 1, button 7
SHIFT Y - player 1, button 8
SELECT - coin 1
START - start 1
SHIFT MENU - MAME Menu
MENU - quit / go back in menu
SHIFT SELECT (-) - reset machine (needed for initial setup of some games like Williams games including Robotron)
SHIFT START (+) - not used

I never hooked up my lightkey, since I like the GameShell as-is without the bulky stuff on the back. Someone with a lightkey may want to include key assignments for it as well.

I also recommend being choosy about which ROMs you copy over. The launcher takes forever to display any sizable collection of ROMs, so if you have a full or nearly full set you’ll be waiting around a long time just for the list to display and the launcher to load again. Better to just copy over a few games for testing, or your favorites. That’s not a MAME thing though, as it happens with every emulator using the launcher to list ROMs.

I’m hoping someone else finds a way to speed this up, or someone manages to build a custom version. (I may take a crack at that myself eventually.) For this build, games like Pac Man and Frogger work fine, and seemingly full speed with sound, etc. Flicky and Do Run Run frame skip so much as to be unplayable though. I just tried Asteroids and noticed that while it runs 100%, the key mapping is wrong, so you’ll need to do up a custom one for that (press shift-menu, go through the MAME menu, and do it how you like and menu to escape back to game; it will be saved for next time). Surprisingly, something like Time Killers actually runs, and while it’s frameskipping it’s almost playable. Even Space Lords runs, but is quite choppy due to frameskip. Although the controls would be horrible even if it ran fine, that’s one of my holy grail games, and I’d love to see it running full speed on the GameShell. The fact that it runs at all made me smile. :slight_smile:

1 Like