Page 1 of 1

MAME (+MESS) emulator from apt-repository

Posted: Wed Oct 31, 2018 3:11 pm
by Fidelius
MAME 0.182 with integrated MESS, from an up-to-date Raspbian 9.4 Stretch on a Pi3 with enabled OpenGL driver, runs basically. It skips several frames, depending on the emulated system and screen size.

Is there anything we can do in order to speed up MAME?

Re: How to speed up MAME (0.182) from apt-repository?

Posted: Wed Oct 31, 2018 11:23 pm
by ejolson
Fidelius wrote:
Wed Oct 31, 2018 3:11 pm
In an up-to-date Raspbian (9.4 stretch) installation I enabled the OpenGL driver for desktop via raspi-config. Then:

Code: Select all

sudo apt install mame
This way MAME 0.182 runs basically which is great, but it skips several frames (between 5 of 10, to 9 of 10), depending on the emulated system and program and of course MAME's screen size.

Is there anything we can do in order to speed up MAME? (I prefer the standard MAME from Raspbian's repository, not some hard to install and run "Mame4Pi" or similar.)

When changing in ".mame/" the setting

Code: Select all

video auto
to "video opengl" or "video soft" there seems to be no speed difference.
Shouldn't there be one when using "video opengl" , in particular when increasing MAME's window size?
Is it possible the clock speed on your Pi is throttling due to inadequate power or cooling? Check this with vcgencmd.

Re: How to speed up MAME from apt-repository?

Posted: Wed Nov 07, 2018 3:18 pm
by Fidelius
Thanks for your reply.
Throttling seems to work fine here: with CPU load vcgencmd says 1200 MHz, whilst in CPU idle mode it says 600 MHz.

Re: How to speed up MAME from apt-repository?

Posted: Wed Nov 07, 2018 3:21 pm
by Fidelius
I solved the problem.

Here's the settings how to run MAME+MESS in a hardware accelerated window or in full-screen, so that many MAME programs run perfectly with 0 frame-skips, and more demanding ones skip some frames but are still well useable. MAME's speed doesn't depend on the window size anymore thanks to OpenGL acceleration.
  • With raspi-config we set the OpenGL video driver to "full" or "fake KSM". (What the exact difference is, I don't know)
  • Then we set these two values with MAME's built-in GUI (or manually in ~/.mame/mame.ini ):

    Code: Select all

    video    opengl
    gl_glsl  1
For example emulating the Amstrad CPC works fine, albeit with several frame-skips. Some MAME programs with the same Z80 processor do run with a 0 frame-skip, so it seems the CPC module of MAME is either not so optimized or just more complex than other emulated Z80 boards.

MAME (+MESS) runs great on Pi4

Posted: Tue Sep 10, 2019 8:42 am
by Fidelius
For the MAME friends out there, I'm happy to report that on the Pi4 several tested systems now run 100% in full-screen. This is with mame version v0.206 directly from Raspbian's apt package.

Also some emulated home computers run 100% now in Mame, for example Amstrad CPC and Megadrive. So finally we have a very powerful Amstrad CPC emulator for the Pi, out of the box.

Other famous home computers which Mame emulates well on a desktop PC, could or should also run well on the Pi4. Of the following ones I only tested CPC and Megadrive so far:

Code: Select all

~$ mame c64p | cpc6128 | cpc6128p | megadriv | nespal | sms1pal | snespal | spectrum […]
To see all emulated systems, and for a certain system its image file formats:

Code: Select all

~$ mame -listfull
~$ mame <system> -listmedia

P.S. To reduce audio stuttering drastically, I reduced Mame's sample-rate from the default 48000 to 11025 on the Pi4 in the "mame.ini" file or via Mame's built-in GUI.

Code: Select all

#samplerate 48000
samplerate 11025