Advance MAME (Findings so far)


88 posts   Page 1 of 4   1, 2, 3, 4
by streakycufc » Mon May 28, 2012 9:26 pm
Just thought I would share my findings so far with regards to AdvanceMame on the Raspberry Pi.

I got AdvanceMame up and running following the great work by Nick Miller (cheers Nick) and the comments in his blog. The blog can be found here.
http://1337technophile.blogspot.co.uk/2012/03/easier-to-compile-advmame.html

I managed to run advmame from the command line (i.e. not within X) by running this command:
usermod -a -G video

After hunting the Rpi Forum I managed to install the joystick package and got a USB Gamepad working a treat. I got sound working by install the ASLA drivers and running these 2 commands after booting the Rpi (I’m using Debian):
    sudo depmod
    sudo modprobe snd-bcm2835

ROM Status:
The following ROMS work a treat (video & sound arcade perfect)
commando,frogger,hyperspt,kungfum,scramble,trackfld

The following ROMS work ok (video/performance however sound is odd)
1932kai,bombjack,darwin,elevator,gberet,invaders,superman,unsquad

The following ROMS are slow (unplayable really)
1941j,asteroid,contra,ffight,ghouls,pacland,rtype2,scontra,sf2ce,simpsons,smashtv,starwars,tmnt2,pdrift(very slow)

With regards to performance on the slower roms then:
    I’ve installed both version 0.106.0 and 0.106.1 of advmame and haven’t noticed any difference.
    I have tested Class 6 and Class 10 SD cards and again no performance difference.
    I have also played around the 3 start.elf files on the SD card as well with no visible improvement on the emulator performance on later roms.
      arm128_start.elf
      arm192_start.elf
      arm224_start.elf
see http://elinux.org/RPi_Advanced_Setup

My only hope to improve performance on the slower roms is either another emulator (XMAME, SDLMAME, MAME4ALL, MAME37b5) or a newer version of Debian (or another distro) that takes advantage of the GPU.

In summary the Rpi as a MAME Emulator is great for the really old type (late 70s/early 80s) games I was brought up on i.e. Galaxian, Track & Field, Frogger but unfortunately is struggling on some of the more recent roms i.e. Street Fighter 2, Final Fight

Cheers
Posts: 13
Joined: Fri May 04, 2012 11:04 am
by dom » Mon May 28, 2012 9:55 pm
Pretty sure mame37b5 (I think mame4all is also based on this version) will have much better performace.
I think after that version they focused more on cycle accurate timing and less on performance (as PCs were fast enough).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4057
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by Toad King » Tue May 29, 2012 5:12 am
The big problem with all of these programs is they almost all use SDL, and that is currently not hardware accelerated on RasPi, thus draining a lot of the processing power to drawing to the screen. I really think if we get a GLES/OpenVG port of SDL, we'll start seeing big improvements in almost all SDL programs.
User avatar
Posts: 156
Joined: Sun Dec 18, 2011 8:03 pm
by Nocturnal » Sat Jun 02, 2012 11:18 am
I found lowering the audio frequency in mame to 22050hz fixed the weird audio issues I was having, and also improved general peformance. I'll try some of the roms you have listed later to see if it has a similar effect for them.
Posts: 16
Joined: Sat Jun 02, 2012 11:15 am
by Nocturnal » Sat Jun 02, 2012 2:57 pm
For me, invaders and 1943kai both play the same on my laptop as they do on the Pi. With asteroid, I had to drop the sample rate down to 11050 before I got it to play and sound correct (there is a colour difference compared to my laptop though).

In starwars I can get the sound working, by dropping to 8000 with a latency of 0.50, but there is an odd speeding up and slowing down effect.

I'll try more of them later.
Posts: 16
Joined: Sat Jun 02, 2012 11:15 am
by jamesh » Sat Jun 02, 2012 3:18 pm
If you get chance, MrDo! and Bubble Bobble....

I see no reason for any other games....!
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12093
Joined: Sat Jul 30, 2011 7:41 pm
by Nocturnal » Sat Jun 02, 2012 4:07 pm
:-) Both work fine for me. Can't compare Bubble Bobble (it seems fine though), since it won't work on my laptop :-/
Posts: 16
Joined: Sat Jun 02, 2012 11:15 am
by RetroRepair » Sat Jun 02, 2012 4:45 pm
I suspect those games which run ok are 60hz and match (at least in multiples) the refresh of your monitor.

I guess this means the other games which sound awful would be fixed by forcing them to run at 60hz, though at the expense of accuracy (tearing and/or stuttering will likely occur).

The only way round this would be to output on a real arcade monitor or other 15khz monitor though I'm not sure if anyone's managed this yet on Pi. Using RGB at least.

It'd be interesting if someone could test this on a CRT with composit output, though I'm not sure it'd make much difference. Maybe if someone has access to a 50hz TV and a 60hz TV they can at least test the games to see what happens?
Posts: 1
Joined: Sat Jun 02, 2012 4:35 pm
by Nocturnal » Sun Jun 03, 2012 3:24 am
I have a PAL/NTSC LCD TV, that is the target screen I want to use. Sadly, I have not yet been able to figure out a configuration that will actually let these games run when connected over composite. I keep getting a video mode error when trying to start the games, or advcfg crashes during the test with "Calibration mode unsupported".
Posts: 16
Joined: Sat Jun 02, 2012 11:15 am
by Lurch666 » Sun Jun 03, 2012 11:28 pm
I am having trouble compiling advancemame on my PI.It keeps stopping with a 'no more space on volume' error which I assume means I have no more room on my SD card to fit the compilation on.I am using a 8GB SD card and when it failed the first time I extended the partition because the debian image was only 2Bg so only 2 GB of my SD was being used.I presumed by extending the main partition I would have most of the capacity of the 8GB card free for compilation yet I still get the out of space error.What am I doing wrong???
Posts: 1
Joined: Mon May 28, 2012 2:54 pm
by Nocturnal » Mon Jun 04, 2012 6:49 am
I had the same problem initially, but my card is only 2gb, so I mounted a usb key and compiled the source on that. I'm guessing you have not successfully increased the size of the partition. If you login to your pi and run df, it will list the mounted partitions, their sizes and how much space is used / free.
Posts: 16
Joined: Sat Jun 02, 2012 11:15 am
by Swift&B0ld » Mon Jun 04, 2012 1:52 pm
I followed these instructions and there were 2 things that other may find useful.

Firstly running "sudo advmame <rom>" the config file was roots : "/root/.advance/advmenu.rc"

Secondly with my pi plugeed into a panasonic TV via HDMI, I had to manually configure (device_video_clock) in the config file as "device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60" based on sect 4.5 of "http://advancemame.sourceforge.net/doc-install.html".

Natu
Posts: 1
Joined: Mon Jun 04, 2012 1:45 pm
by SSilver2k2 » Wed Jun 06, 2012 1:54 am
@Swift - The tip about the display settings worked for me.

I was able to get advmame compiled but it would always error out with video_fault. Once i edited the .rc config file with the correct device_video_clock everythign worked fine. I'm running it through RCA, on the command line, no X.

I haven't tried HDMI yet.

So far PacMan, Ms Pac Man, 1942, and Bubble Bobble run great.
Galaga for some reason had some slowdown.
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by SSilver2k2 » Wed Jun 06, 2012 3:02 pm
I posted the compiled source as well as a small howto (not great, would appreciate feedback).

It's available at http://blog.sheasilverman.com/?p=37
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by seybonazo » Wed Jun 20, 2012 3:25 pm
Has anyone tested out the Defender Game. If so, what are your findings? I am looking to purchase a Raspberry Pi for a MAME project.
Posts: 3
Joined: Wed Jun 20, 2012 3:23 pm
by SSilver2k2 » Thu Jun 21, 2012 1:25 am
I'll test out Defender for you tomorrow :) I have a feeling it'll work fine
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by seybonazo » Thu Jun 21, 2012 1:55 am
SSilver2k2 wrote:I'll test out Defender for you tomorrow :) I have a feeling it'll work fine


Thanks SSilver2k2. Now if I can only get my hands on a Raspberry Pi, then I'll be asking how to configure it :D
Posts: 3
Joined: Wed Jun 20, 2012 3:23 pm
by SSilver2k2 » Thu Jun 21, 2012 6:14 pm
seybonazo wrote:
SSilver2k2 wrote:I'll test out Defender for you tomorrow :) I have a feeling it'll work fine


Thanks SSilver2k2. Now if I can only get my hands on a Raspberry Pi, then I'll be asking how to configure it :D


Defender works fine (just a little awkward because of the control scheme it uses). No slowdown at all.
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by Crook » Thu Jun 21, 2012 8:28 pm
I need more detail in the how to I'm afraid.

Unzip MAME - to where?

what is the chmod for? And shouldnt it be sudo?

I got the .rc file and added the line for HDMI - where though - anywhere in the file?

running "sudo advmame 1942" (the game I chose) gives sudo: advmame: command not found

I also tried 1942.zip - do I need the extension or not?

Why is it not working? Help please!
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm
by SSilver2k2 » Thu Jun 21, 2012 8:59 pm
Crook wrote:I need more detail in the how to I'm afraid.

Unzip MAME - to where?

what is the chmod for? And shouldnt it be sudo?

I got the .rc file and added the line for HDMI - where though - anywhere in the file?

running "sudo advmame 1942" (the game I chose) gives sudo: advmame: command not found

I also tried 1942.zip - do I need the extension or not?

Why is it not working? Help please!


You should be able to unzip it anywhere in your home directory. It will automatically unzip as a MAME Folder. (home directory is ~/ so by default /home/pi/

the chmod 777 is to allow everyone access to /dev/fb0 - the permissions may be set too high in a security standpoint, but it works for now. I'm working on a better tutorial that addresses that issue. if straight chmod doesnt work, by all means do a sudo chmod.

Do not use sudo to run advmame. Run it once as you, it will create the directories in your home folder under .advance. Put 1942.zip in the MAME Folder/share/advance/rom/ (~/MAME/share/advance/rom/)

add a new line to the top of your advmame.rc config file and add the HDMI config there.

now goto MAME Folder/bin/ and type ./advmame 1942

You should now be playing awesome video games :)
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by Crook » Fri Jun 22, 2012 10:08 am
Thanks for the clarification, will give it a whirl tonight. If I get 1942, defender and burnin rubber working, that's my weekend gone!
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm
by Crook » Fri Jun 22, 2012 7:04 pm
Excellent, got 1942 working - no sound though.

I'm new to linux - ./advmame 1942 instead of advmame 1942 works ? Is that how executables are run then?

Played:

1942
puckman (pacman)
Yie Ar Kung Fu
Galaxians
Burnin' Rubber
Pacland (slowdown)

I couldn't get defender to workdecoder.2 and decoder.3 NOT FOUND

No sound on any at the moment, but this is showing a lot of promise :)

EDIT:

sudo depmod
sudo modprobe snd-bcm2835

brought sound on through my HDMI monitor. Oh my :)

As stated above, this is currently good for very old arcade games. Pacland begins to show the slowdown. Is there an explanation of the Video settings somewhere - I'd like to experiment with resolutions.
Last edited by Crook on Fri Jun 22, 2012 7:33 pm, edited 1 time in total.
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm
by SSilver2k2 » Fri Jun 22, 2012 7:33 pm
do this to get sound running:

sudo apt-get install alsa-utils
Now load the sound driver using modprobe:
sudo modprobe snd_bcm2835

yes, you execute files with a ./

edit: i see you found it :)
you should be able to press "." to change resolutions once running the game.

If you haven't and are daring, you may want to overclock the Pi a bit. At 700Mhz, I get some slowdown in games, overclocked to 900Mhz, i'm getting a lot more performance.

I don't suggest this route unless you have overclocking experience and don't mind potentially harming your hardware.
My blog of various geeky things - http://blog.sheasilverman.com
DeskCade.com - Mini Raspberry Pi Arcade Cabinet
PiMAME - http://pimame.org
Posts: 177
Joined: Wed Jun 06, 2012 1:51 am
Location: United States
by Crook » Fri Jun 22, 2012 8:00 pm
Yeah already overclocked to 900. I hope that somewhere along the line there's some kind soul who will get some kind of accelerated video going for this, although to be honest most of the games I'd want to play are already there. Pacland would be the one I want on top, and asteroids. This is a great bonus for a RPi.
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm
by jamesh » Fri Jun 22, 2012 9:43 pm
Crook wrote:I'm new to linux - ./advmame 1942 instead of advmame 1942 works ? Is that how executables are run then?


When Linux tries to find the program name you have just typed to run it, it searches the PATH variable only. By default, the PATH variable does NOT include the current directory. Putting ./ in front of the program name simple tells the system to execute the program in the current directory, since . is the code for the current directory. This is a security feature to ensure you don't run something you shouldn't by accident.

You can modify the PATH variable to include . in the search, which means you would not need the ./ I'll leave that as an exercise!
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12093
Joined: Sat Jul 30, 2011 7:41 pm