Specifying emulator for arcade roms via command line?
-
I apologize if this question has been answered already elsewhere, but a cursory search didn't find anything. I'm looking to add all of my Mame roms to the /arcade/ folder and based on the documentation, I know I need to "specify which emulator each will use from the Runcommand Menu", but is there any way to do that programmatically? Holding down the A button and manually setting the default emulator for the rom via the Runcommand Menu works fine on a game by game basis, but when I'm uploading a few hundred roms that require different emulators, I'd much rather write a quick script to either create a per-rom config file or update an existing file as needed. I've tried digging around in the RetroPie filesystem after manually changing the settings in the RunCommand menu, but I haven't seen where these changes are being recorded (or whether they're manually editable at all).
-
@waltisfrozen said in Specifying emulator for arcade roms via command line?:
I haven't seen where these changes are being recorded
/opt/retropie/configs/all/emulators.cfg
-
Thank's for the tip. Looking at the way the md5 hashes are created in emulators.cfg, I whipped up this script to create emulator config entries for all of my FinalBurn Alpha roms before moving them to the arcade directory. Hopefully this will come in handy for anyone else who's finding this thread and is comfortable enough w/ the command line to try this for themselves :
cd ~/RetroPie/roms/fba
for game in *.zip;do echo -n -e "# arcade/home/pi/RetroPie/roms/arcade/${game}\na";echo "arcade/home/pi/RetroPie/roms/arcade/$game"|md5sum|awk '{ printf $1}'; echo ' = "lr-fbalpha"';done >> /opt/retropie/configs/all/emulators.cfg
I've also added a line to include a comment for each entry so that these changes can be audited and rolled back if necessary.
Also, wouldn't it make more sense to do the md5 hash of the zip file itself instead of its path? That would make the roms more portable and make it easier to reverse-engineer the contents of the config file.
-
@waltisfrozen This was already changed - if you update to the latest retropie-setup it no longer uses md5 hashes by default, but just includes system and rom name minus extension /path (excluding all characters except
a-z A-Z 0-9 _ -
in the formatsystem_romname
for per emulator settings, the format is
emulator_romname
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.