Hey guys,
If you have a spare system around, try knoppix. Knoppix is a Live DVD based on Debian linux that can be installed to run from a hard drive or a flash drive.
It's pretty useful for systems without hard drives, you can just run it from a flash drive. Unfortunately, most flash drives write fairly slowly so it's best to run it from a local hard drive.
I like to use the boot cheatcode "knoppix64 tohd=/dev/sda1" which will copy the knoppix dvd to free space on partition sda1, without overwriting other files on the partition. You still use the dvd to boot, but it will auto find the knoppix files you've copied or you can use "knoppix64 fromhd=/dev/sda1" to specify it manually.
If you have enough memory, you can have the livedvd copied to ram and execute only out of ram memory with "knoppix64 toram"
You can get knoppix from
http://knoppix.netKnoppix has a remarkable collection of software installed, but one thing it's missing is mame.
Being based on Debian, we can install Debian packages on Knoppix. Knoppix9.1 is based on Debian Bullseye.
We can install Debian's packaged version of mame. (most recent stable version is mame 0.228) which is almost a year old now.
Two packages are needed: mame and mame-data. Optionally you can get mame-doc and mame-tools.
You can search for packages at
http://packages.debian.org for "mame" and locate the packages that way:
http://http.us.debian.org/debian/pool/main/m/mame/
http://http.us.debian.org/debian/pool/main/m/mame/mame_0.228+dfsg.1-1_i386.deb
http://http.us.debian.org/debian/pool/main/m/mame/mame-data_0.228+dfsg.1-1_all.deb
http://http.us.debian.org/debian/pool/main/m/mame/mame-doc_0.228+dfsg.1-1_all.deb
http://http.us.debian.org/debian/pool/main/m/mame/mame-tools_0.228+dfsg.1-1_i386.deb
Also needed are two packages to parse xml and for the lua console:
wget http://http.us.debian.org/debian/pool/main/l/lua5.3/liblua5.3-0_5.3.3-1.1+b1_i386.deb
wget http://http.us.debian.org/debian/pool/main/p/pugixml/libpugixml1v5_1.11.4-1_i386.deb
Note that Knoppix is based on i386 architecture, so you have to get the i386 packages. Yes, it's not 64 bit packages but it does run under a 64 bit kernel with "knoppix64" on boot.
wget the files, then after booting knoppix, just run "dpkg -i *.deb" and it should install mame 228.
Note that if you've copied the knoppix files to the hard drive with the cheatcode "tohd=/dev/sda1", you can save files in the directory "/mnt-system" which is where knoppix is mounting its system files from. (/mnt-system -> /media/sda1/KNOPPIX)
But what about more recent versions? Debian packages 238 but it relies on some more recent libc dependencies so it won't run on Knoppix 9.1.
However, you can compile the latest mame (tried with mame 239) under knoppix 9.1. Knoppix9.1 has gcc 9 installed as well as git.
First, you will need some packages:
http://http.us.debian.org/debian/pool/main/a/alsa-lib/libasound2-dev_1.2.4-1.1_i386.deb
http://http.us.debian.org/debian/pool/main/p/pulseaudio/libpulse-dev_14.2-2_i386.deb
http://http.us.debian.org/debian/pool/main/libs/libsdl2/libsdl2-dev_2.0.14+dfsg2-3_i386.deb
http://http.us.debian.org/debian/pool/main/libs/libsdl2-ttf/libsdl2-ttf-dev_2.0.15+dfsg1-1_i386.deb
http://http.us.debian.org/debian/pool/main/s/sdl-sound1.2/libsdl-sound1.2_1.0.3-9+b1_i386.deb
http://http.us.debian.org/debian/pool/main/s/sndio/libsndio-dev_1.5.0-3_i386.deb
http://http.us.debian.org/debian/pool/main/s/systemd/libudev-dev_247.3-6_i386.deb
http://http.us.debian.org/debian/pool/main/q/qtbase-opensource-src/libqt5core5a_5.15.2+dfsg-9_i386.deb
http://http.us.debian.org/debian/pool/main/q/qtbase-opensource-src/libqt5gui5_5.15.2+dfsg-9_i386.deb
http://http.us.debian.org/debian/pool/main/q/qtbase-opensource-src/libqt5widgets5_5.15.2+dfsg-9_i386.deb
http://http.us.debian.org/debian/pool/main/q/qtbase-opensource-src/qtbase5-dev_5.15.2+dfsg-9_i386.deb
http://http.us.debian.org/debian/pool/main/q/qtbase-opensource-src/qtbase5-dev-tools_5.15.2+dfsg-9_i386.deb
http://http.us.debian.org/debian/pool/main/l/lua5.3/liblua5.3-0_5.3.3-1.1+b1_i386.deb
http://http.us.debian.org/debian/pool/main/p/pugixml/libpugixml1v5_1.11.4-1_i386.deb
If you put this list into a file you can use "wget -i <filename>" to download the file list in <filename> or just wget each one manually.
Then you can use "dpkg --force-depends -i *.deb"
We use force-depends because we haven't grabbed all of the dependencies.
Download the source zip from mamedev.org and extract it.
then edit the makefile with "nano makefile"
locate the line with #PTR64 = 1 and change it to just "PTR64 = 0"
because we are going to build for i386 which is not 64bit.
You may need to set the line (I don't think you have to though)
QT_HOME = /usr/lib/i386-linux-gnu/qt5
Then you can compile with "make -j4" and when it's done you should be able to run mame.
Knoppix9.1 is super useful, I like to use it on old laptops that don't have hard drives. It's super handy for testing hardware, and has lots of utility programs like "hardinfo".
Another thing you can try is "sudo apt install mame mame-data"