What's new

(Almost) pixel-perfect arcade emulation on Raspberry Pi with AdvanceMAME

Nice! Now Lakka has to integrate the newest RA and there we go :D
Would it then reduce the huge lag that Lakka currently has?
because this is running with the correct res and very close refresh you can disable VSYNC and Audio sync. Then enable frame throttle to 1x . This reduces lag so it non existent. A frame is drawn in 16 miliseconds. And the pad response is 0.08 milliseconds.

One draw back is every minute to minute and a half there is a slight frame stutter. Not perfect but so much better.
 
HIi guys,

Many things have been changing in the Libretro / RetroArch scene.

I have to keep up with source coding and insuring every continues to work when it comes to MME4CRT / CRTSwitchRes.

So on that note I have created a Patreon. Any support from MME4CRT users would be much appreciated.

https://www.patreon.com/CRTSwitchRes
 
Oi Arcade Project,

sorry for digging this one out, but I couldn't find anything newer concerning Advancemame in this forum.
And before starting a new thread, I probably might as well ask here.

I am running two Arcades with CRTs and all, using AdvMame - but with old DOS computers.

I would love to switch to Raspberry Pis, they are more reliable than the now quite old and sometimes failing hardware and they are much more silent.
The best of course would be, if I could use my old AdvMame setups...I put many, many hours of work into the setups, creating custom modelines and so on.

So I tried this tutorial with my Raspberry Pis 4B - and - it didn't work.
(this tut is for Raspi 3)
I find really contradicting stuff about this in different forums, as usual with Raspberry Pis.

So, the question is - does anyone know, if this setup works also on a Raspberry 4 somehow?
I also have the Gert666, Scart, and some CRTs.

I managed to get Advmame running after a while, with a scrambled picture, but thats it.
So, before I continue spending a lot of time to set it up, I'd rather ask, if its even possible on the 4B...
Maybe someone here is aware about limitiations or whatever might stop AdvMame working on the Raspi 4.

Thanks for your help
 
Oi Arcade Project,

posting this, in case someone tries this out in 2022!
This tutorial won't work with the Raspi4.

Legacy - up to Pi3, Raspberry used a custom video driver that communicated directly to the firmware (which only had a custom implementation of OpenGL ES) and had direct access to the framebuffer. This is now legacy and not fully supported in Pi4 anymore.
From here:
https://www.mortaca.com/rgb-pi/wiki/index.php?title=About_RGB-Pi_and_Raspberry_Pi4

Making this work on the Raspi3:
I did as described and it didn't work.
The problem is the graphic driver in the newer Raspbian versions.
So you have to download an older image, not the latest - I tried latest Stretch Lite from 2019-04-08 and it works as it should.

cheers
 
Updating further for anyone starting from scratch beyond 2024 . . .

Here is my tutorial on setting up MAME (advancemame) to work on a new Raspberry Pi 3 B+. The tutorial started by @Yami in 2018 worked as a Raspberry Pi emulator solution for my 2020 Tempest scratchbuild project, but Raspberry Pi 3 B+ hardware and software changes over the past 4 years have made those instructions obsolete.

I bought a *new* (2024) Raspberry Pi 3 B+ for a Robotron project I'm working on and setting up the emulator didn’t go right. Many things are different now. I learned that Raspberry Pi 3 B+ basic firmware I/O changes make it impossible to boot older images from scratch. This can be overcome by manually saving the updated firmware to the decompressed legacy image. Then the repository links that come packaged in that distro are now broken and I couldn’t get the basic files I needed installed. I figured out how to overcome that too (by echoing a legacy repository link into the sources.list file in /etc/apt/). Then you must methodically perform software updates and compiling commands – switching in and out of root at specific times.

Everything now runs perfectly (like it did following the original instructions)!

I would never remember how to do all this again in the future so I wrote it all down. I'm sharing these instructions here if you want to get straight to business. If there are more efficient ways to perform these tasks please contribute with comments.

The incentive for doing all this is that the older Raspberry Pi OS build (Raspian Stretch Lite) uses a framebuffer video driver version that allows full access to all the video enhancements that Andrea Mazzoleni continues developing in the AdvanceMame software. The newer Raspian versions will throw an video driver error when running ‘advmame <game>’ from the commandline (the framebuffer driver doesn’t work right) and running from the GUI (‘startx’ from the commandline) results in an uninspiring, choppy, sluggish experience. I’ve tried using many other updated distros (Ubuntu, Apertis, etc.) without success – more video errors and miscellaneous problems.

I'm also sharing my advmame.rc & advmenu.rc files that reflect my current setup as a starting (or finishing) point for anyone else . . .

Tutorial:
1. Get a new Raspberry Pi3 Model B+ (model no. SC0073) from a reputable dealer:
2. Download necessary firmware to make older version on Rasbian Lite work on a modern Raspberry Pi3 Model B+ here:
3. Download this Raspian Lite file (thank you, @ghost666):
4. Use Etcher on a PC or Mac to flash Raspbian Lite onto a 128gb SDCard.

5. With the SDCard still in PC or Mac, copy the required start*.elf and their associated fixup*.dat support files (replace start.elf, start_cd.elf, start_db.elf, start_x.elf, fixup.dat, fixup_cd.dat, fixup_db.dat and fixup_x.dat) over the corresponding files in the SDCard destination OS image.

6. Boot the Raspberry Pi with the newly-flashed SDCard into the GUI (X).

7. Open a terminal window and change root password: ‘sudo passwd root’ (hit return and enter new password twice) and log in as root (‘su root’).

8. Navigate to /etc/apt/ directory (cd .. <ENT> cd .. <ENT> cd /etc/apt/)

9. In /etc/apt/ directory, update the repository file with this command:
10. Close the terminal window.

11. Go through the desktop system configuration process and “Update Software.” Be patient and let it finish.

12. Restart the GUI

13. Shut down the Raspberry Pi OS cleanly from the GUI.

14. Place the SDCard back into the PC or Mac and repeat step 5 (replace start.elf, start_cd.elf, start_db.elf, start_x.elf, fixup.dat, fixup_cd.dat, fixup_db.dat and fixup_x.dat in the SDCard destination image).

15. Reboot the Raspberry Pi into the GUI.

16. Open browser copy/paste from www.advancemame.it “build.txt documentation” file into terminal default “pi” user directory:
  • sudo apt-get update
  • sudo apt-get install build-essential git autoconf automake libsdl2-dev libasound2-dev libfreetype6-dev zlib1g-dev libexpat1-dev libslang2-dev libncurses5-dev
  • git clone https://github.com/amadvance/advancemame.git
17. Run raspi-config from terminal window: 'sudo raspi-config'
  • Boot options: Select autologin text console as pi
  • Boot options: Show splashscreen? No
  • Finish
  • Reboot now? Yes
18. Login terminal as root: 'su root'

19. In the commandline type:
  • cd advancemame
  • automake --add-missing
  • sh autogen.sh
20. If you want to the games to boot instantly without using “misc_quiet yes” in advmame.rc then go to the /advancemame/src/ directory (‘cd src’) to edit usrintrf.c with ‘nano usrintrf.c’ then commenting out (with /* */) the last 3 “if” statements under the “Main Initialization” section. Resave the edited usrintrf.c file with <CTRL><x>, <Y>, <Enter>.

20. Return to /advancemame/ directory with 'cd ..' then:
  • ./configure
  • make -j3

21. When compiling is finished, ‘make install’
 

Attachments

Last edited:
Back
Top