I’ve been searching for a fast way to rename my media files and generate a gamelist.xml file which contains all the game metadata (name, description, genre, release date, etc) and which points to the proper media files so that all this data will be available in RetroPie (EmulationStation). It’s taken a while but I’ve found a relatively quick way to do this which is the subject of this RetroPie: Mass Renaming article. While AttractMode doesn’t really appeal to me (I know it does appeal to many though) I did want to make sure that if I was sorting out my media, that it would be able to work in AttractMode as well as RetroPie (Emulationstation) in case I wanted to try it out at a future date. Where RetroPie (EmulationStation) uses XML files, attractmode (from my understanding) relies on matching media files names in the appropriate directory structure and appears to only link to media files and not collect other metadata such as release date, genre etc.
Other than the benefit of being able to work in both AttractMode and RetroPie (EmulationStation), the other benefit is that you can back your directory structure up, and when you do a fresh install of either system, all you have to do is copy the media over and it should instantly (well after a restart) be up and running.
This is part of my series of articles on Retro Gaming.
Download the Games and the Media
Setup the Directory Structure
Now that you have your ROMs we can begin with this RetroPie: Mass Renaming article. You need to setup your files in the following folders in order to be used in attract mode:
Video Snaps (.mp4) /roms/snaps/
BoxArt Images (.jpg / .png) /roms/boxart/
Marque Banners (.jpg / .png) /roms/wheel/
If you’re looking to setup DosBox, things can be a little bit different.
[READ MORE ON DIGIMOOT: RetroPie DosBox Setup Guide]
Once you have everything downloaded and in the right folders two things need to be done. First we need to make sure all the files are named identically in each folder and subfolder. I.e. the ROM needs to be named exactly the same as the media files in their sub-directories. Then second we need to generate the .xml for emulationstation pointing to the right file images and downloading the metadata from the internet. If you’re just using AttractMode then you just need to do the first of the two steps (renaming files).
The program which is going to be your friend for renaming all of your files to match is going to be FatMatch which can be downloaded in from the following locations:
FatMatch will check all your ROM file names and try to match them with the files in the folder you have selected.
You will need to select your ROMs directory and then select the image (or video snaps) directory. Enter the appropriate file extension or just leave it as ‘*’ for all extensions. Then click the start button at the top. Once the process is complete, select the results tab (shown below)
You will need to select the file to be renamed to match the ROM at the root of the tree. Go through the results and select as appropriate. This may take a bit of time to review and will vary in difficulty depending on how your files are initially named.
This process will need to be repeated for each folder (snaps, wheel and boxart) to ensure each is matching. Having all this media match is important for if you ever decide to you attractmode in the future and for step two of the process below.
[READ MORE ON DIGIMOOT: RetroPie: Setup on an x86 Machine with Linux Ubuntu or Mint]
Create XML File
To use this, you’ll have to copy your ROMS to the raspberry pi running retropie. Once done, follow the instructions in the video from ETAPrime below. The video will walk you through the installation and running the scraper. As ETAPrime notes you will need to switch to the raspberry pi or ssh in to it and run the scraper by inputting:
Once you’ve done the scraping, this will generate a gamelist.xml which will now need to be updated and edited to point to the location of the media file in the directory structure noted above. I would also recommend checking out some of the other videos on ETAPrime’s youtube page as there is a lot of helpful stuff related to retro gaming there.
Adding Media Locations to XML File
Next we will need to modify this gamelist.xml to point to the files you’ve setup previously. To do this we will use a handy little program called Gengal. It can be downloaded from file dropper here.
Before you start run Gengal, it may be a good idea to backup your gamelist.xml file. Once you’ve done that, first you will need to select the folder which contains your roms. Then check off the items (image, marquee, video) that you wish to include in your gamelist.xml file.
That’s it, You’ve now complete this RetroPie: Mass Renaming article! The process isn’t perfect, but I find it gets around 98% or 99% of the files and in a 600+ list of games there are a dozen or so that need to be manually corrected. This is MUCH, MUCH faster than manually completing the whole process.
Happy retro gaming!