Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Script to generate Emulation Station xml for MAME (entirely offline!)
- This topic has 17 replies, 6 voices, and was last updated 9 years, 11 months ago by maouu.
-
AuthorPosts
-
03/01/2014 at 21:19 #5342cacophony555Participant
I wrote a script to generate the Emulation Station xml for MAME, and thought others might be interested. The only alternative I’ve found is ES-scraper, which can take multiple days to run if you have thousands of roms. The big advantage of my script is that it runs entirely offline within a couple seconds.
From the readme:
mameGenXml.pl is a perl script that will create the xml for Emulation Station, attempting to populate real game names in place of the often cryptic mame filenames. It will also add references to image files if it finds them in the rom directory.It’s available here with instructions if anybody would like to try it:
http://webspace.lenscritic.com/mame/03/01/2014 at 23:04 #5345trimmtrabbParticipantgreat, this will save a lot of time and effort thanks!
03/04/2014 at 04:38 #5404cacophony555ParticipantFYI, I’ve updated this script to support FBA and consoles as well. See the readme for more info.
12/31/2014 at 18:35 #84356nolageekParticipantI used this and it it worked beautifully to build the gameslist.xml – but ES doesn’t seem to be using it. I have copied the file to both ~/Retropie/roms/mame/gameslist.xml and in ~/.emulationstation/gameslist/mame/gameslist.xml and still, no data in emulation station.
Anything I’m missing?
12/31/2014 at 18:46 #84357cacophony555Participant[quote=84356]I used this and it it worked beautifully to build the gameslist.xml – but ES doesn’t seem to be using it. I have copied the file to both ~/Retropie/roms/mame/gameslist.xml and in ~/.emulationstation/gameslist/mame/gameslist.xml and still, no data in emulation station.
Anything I’m missing?
[/quote]Did you make sure to quit emulation station before moving the gamelist.xml?
You need to move it to the directory that contains the ROMs and it has to match your configuration in es_systems.cfg. Can you put the relevant lines of your ~/.emulationstation/es_systems.cfg here so I can see it?12/31/2014 at 19:13 #84358nolageekParticipantI was coming back here to report the issue – it was totally my fault – I had it saved as gameslist.xml and not gamelist.xml
renamed the file in the /roms/mame/ directory and it worked just fine.
12/31/2014 at 19:15 #84359cacophony555ParticipantAh yes, good catch! Glad to hear it’s working now!
12/31/2014 at 19:54 #84362nolageekParticipantthank you so much! I downloaded a massive list of 28000 images from http://www.progettosnaps.net/snapshots/ and used some cli fu to just copy over the ones that matched my 3400 MAME roms and about 3/4 of them matched up.
I wish it wasn’t such a pain to clean up ROMS (not as easy as deleting files I don’t recognize!). It seems like whenever I try to I end up breaking half of the ones I want.
12/31/2014 at 20:07 #84363nolageekParticipantOne more question – any idea why some roms don’t get added? Off the bat I see 720 and 3COUNTB, but not 1942 or 1943, etc…
01/01/2015 at 02:15 #84376cacophony555Participant[quote=84363]One more question – any idea why some roms don’t get added? Off the bat I see 720 and 3COUNTB, but not 1942 or 1943, etc…[/quote]
You mean certain games don’t get added to the gamelist.xml file? As long as they’re in the same directory and have the same extension (eg “.zip”) they should definitely be added.
01/06/2015 at 17:32 #84672maouuParticipantHello,
Thanks for this script !!! How can I match my Snes folder roms with my image Snes folder to generate an XML file ?!!
Because when I execute the command :
perl mameGenXml.pl -rompath /home/pi/RetroPie/roms/snes -mode console -extension smc > gamelist.xml
The result is the XML file create, but not image path, there is no <image>…</image>
I put the .png file with the rom file in the same folder and I launch the script, but I don’t have images path in the XML file !!
Do you have an idea ?!
Thanks you :)
01/06/2015 at 21:58 #84714FloobMemberThis video may help you, but if you are scraping SNES you may want the second video because it will populate the other metadata as well.
01/06/2015 at 22:19 #84717maouuParticipantThanks you, but when I scrap the rom folder, I get out the XML file but I do not have all my games, I’ve only games that have been scraped (by GameDB I think) but the unknow games for source are not added on XML files, I lost a lot of games :(
Is there a way to have the descriptions, with release dates, editors …. etc. and even if the scrap can not have the description, editors..etc for some games, they are anyway listed in the XML file ?!! with tags <desc> <releasedate> empty for example.
Otherwise I have to do everything manually :(
Thanks you
01/07/2015 at 06:39 #84736cacophony555Participant[quote=84672]Hello,
Thanks for this script !!! How can I match my Snes folder roms with my image Snes folder to generate an XML file ?!!
Because when I execute the command :
perl mameGenXml.pl -rompath /home/pi/RetroPie/roms/snes -mode console -extension smc > gamelist.xml
The result is the XML file create, but not image path, there is no <image>…</image>
I put the .png file with the rom file in the same folder and I launch the script, but I don’t have images path in the XML file !!
Do you have an idea ?!
Thanks you
[/quote]Do the images have the exact same names as the roms and have extensions that are one of these: png, jpg, jpeg, bmp ?
In other words if your rom is called “mygame.smc” the image must be called one of “mygame.png”, “mygame.jpg”, etc
You sure you’re looking at the right xml file ?
If you’re still having problems it might help if you provided some example rom and image file names and the relevant part of the ouput xml file output.
01/07/2015 at 06:44 #84737cacophony555Participant[quote=84717]Thanks you, but when I scrap the rom folder, I get out the XML file but I do not have all my games, I’ve only games that have been scraped (by GameDB I think) …
[/quote]Hard to say without more detail, but it sounds like you might be looking at the wrong xml or something. Based on your command above the script simply looks for all the files in /home/pi/RetroPie/roms/snes directory that have an smc extension and writes an output xml with all those files.
01/07/2015 at 15:29 #84745patrick500ParticipantFor my part, I have tested the 3 following solutions, here is my personal feedback :
1. Scraper included in EmulationStation
– Scraper freezes or blockes EmulationStation
– Medium ration of detection (roms found in the database)
+ When rom is detected, good information provided (#of players, description…)
+ XML creation in automatic way (nothing to do)2. Scraper in commandline
Video by Floob : https://www.youtube.com/watch?v=bg20m5pPjns
– Medium ratio of roms detected
– It needs sometimes to run several times the command line to increase the number of found pictures
– Could take several hours for a result
– In some cases, delay (4-10secondes) could appear between “the roms is closing” & “come back to EmulationStation” or “when EmulationStation is closing” and “time to come back to the prompt”.
+ not so complex to use – good video tuto :) !3. Scraper with Emumovies
Video by Floob : https://www.youtube.com/watch?feature=player_embedded&v=ijag-o-bHy4
– No information about game (description, number of players…)
– Not all emulators are taken into account (just a few of them including Mame, FBA, Neogeo, a few Nintendo, and a few Sega ones…)
+ easy to use (scan of the rom folder from windows session)
+ easy to execute the command line to generate the gamelist.xml file (refer to the readme.txt/html)
+ good video tuto (Thanks to Floob!)
+ very good ration of roms detected (pictures found)For my part, I prefer the solution#3.
I have used it for : Mame, FBA, NEOGEO (with FBA), SNES and Sega Genesis, even if at the end, only pictures are available (no description and no player info).
But of course, it’s only my feeling regarding my configuration and usage.01/07/2015 at 16:42 #84747maouuParticipantThanks you very much for details !!!
I had already watched these videos, it helped me a lot !!
Actually I renamed my images the same name as my games and I get the pictures listed in the XML, but it lacks information !!! it’s a shame when you want to make a finished product !!It’s sad that the integrated EmulationStation scrapper or MameGenXML does not add games to the XML file, even if it does not repatriate all the info, it should nevertheless listed all roms.
Thank you for all the info, I should be able to get out.
I have built an Hyperspin Cab !! I know the system because it is quite similar to Retropie, and at that time it was already horrible to manage XML !!!
Thanks you Patrick500 and Floob for your all amazing videos !! And sorry for my bad english, i’m French !! ;) Happy New Year
01/07/2015 at 18:03 #84752maouuParticipantI have a last question !!
Can I use this kind of XML file for EmulatioStation ?!
<menu>
<game name=”3 Ninjas Kick Back”>
<description>3 Ninjas Kick Back</description>
<cloneof/>
<crc>f2ee11f9</crc>
<manufacturer>Sony Imagesoft</manufacturer>
<year>1994</year>
<genre>Fighter</genre>
</game>
</menu>Do you know if ES know this tags ?! Because maybe I can use my Hyperspin XML file… What do you think ?!
If you want to compare an XML file to your game folder and finally to have just the games contained in your XML to target roms directory, or create an XML file from a game directory you can use HyperROM2XML (Windows only sorry)
It’s a simple use software, and awfully good .. !!
https://www.dropbox.com/s/11xplhf87kyt30h/HyperROM2XML_1.6_bin.zip?dl=0
Thanks a lot.
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.