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:
21. When compiling is finished, ‘make install’