A neat way to get roms, specially for MAME, is using the Archive.org site. WIth a simple search you can find complete sets of rom files for many MAME versions.
You can just click a file and get the complete set, but you can also navigate into the archive/zip file and get individual files/roms. This is really useful when you are making your own set of games and don’t want to just download all the games/roms.
Because i really liked this method and getting only the games i want to have in my collection, i built a bash script to automate the procedure. First find such a collection and click the links to get into the list of the main zip file. An example of such a list can be found here!
You have to download the source of the HTML page with a browser or just use wget or curl. After you have the HTML list file, get the script at the end of this post. Make sure to make it’s executable. Also install fzf and wget if you don’t have them in your system. To use it just give a command like:
./arcroms.sh ziplist.htm
Replace ziplist.htm
with the name of the file you gave to the HTML page you downloaded earlier. You will see a list of .zip files. Type the name of rom file and fzf
will find it. Press TAB if you want to select multiple. When you are done selecting, press ENTER, and all the .zip files will be downloaded with wget
into the current directory. Enjoy!
#!/bin/bash
#Example of an archive.com list of a zip file containing ROMS
#You can get the HTML with wget or curl
#https://ia601806.us.archive.org/view_archive.php?archive=/35/items/arcade-0223-merged/Arcade/roms.zip
if [ $# -ne 1 ]; then
echo ""
echo "Usage:"
echo "$0 <file> : Where file is a HTML archive.com list"
echo ""
exit
fi
ROM=$(cat "$1" | grep .zip | sed 's/\%2F/\//g' | cut -d"\"" -f2 | fzf -m --header 'Press TAB for multi-select')
if [ ! -z "${ROM}" ]; then
clear
#wget "http:$ROM"
echo "$ROM" | while read -r item; do
wget "http:$item"
done
echo .
echo "---------------------------------"
echo "Check if download was successful."
read -p "Press a key to continue... " -n1 -s
fi