Search the Community
Showing results for tags 'mess naming'.
-
Hi all, after two days of fiddling around with the displayed names for my mess games - mostly SNES and Genesis - I found no solution to get the game names shown in a readable style, only the rom filenames so far. - I´m using the Mess 0.155 software list set - the Emulator itself is Groovyume (tried it with the mess.exe too) - the games do work and load from within the frontend but as soon as i try the map file for the specific machine it wont load the games. Problem here is that it also replaced the rom filename ex. contra3.zip turns into Contra III - The Alien Wars (USA).zip -which the *.bat file cant find. - I tried renaming the roms to the filename as they are stated in the map file but ume/mess wouldn´t load them as they need to be in the mess-specific filename (plus it would take a hughe amount of time to rename all the games by hand). - i also tried to switch-on the use database option with no luck. To get to the point - i would like to have my mess games (which are seperatly configured in different emulator slots per machine) shown in a readable way ex. contra3.zip -> Contra III - The Alien Wars So my question here is, is there a way to quickly generate a map file out of the *.xml files stored in umes/mess` hash file? Did i miss a option containing the software-list support? I searched different threads already but couldn´t find an answer to my problem here - any help is appreciated. --edit 1st -- Come to think about it - maybe a xml parser would be the way to go - looking into the snes.xml files from mess hash folder the format is like: <software name="contra3" cloneof="sprobot"><description>Contra III - The Alien Wars (USA)</description> so would it be possible to script something that 1. read out the value of "software name" 2. add *.zip extension and a "|" 3. add the value of "description" next to it 4. and finally write it all in a single *.map file ? attached is a smaller *.xml file out of the mess hash folder --- edit 2nd --- after asking a friend of mine who is comfy with programming he wrote me a little python script which solved the problem. He gladly gave me permission to post the code here for people who may suffer from the same problem Python 3 required !!! howto: 1. copy the needed *.xml files from the mess hash folder into python folder (in my case c:\python34) 2. run the script via "python.exe romsetxmlparser.py xyz.xml" (xyz for the needed machine) 3. script should run through the xml list, creating the needed map file for gameex. script (just copy paste script into empty textfile and name it romsetxmlparser.py): from xml.dom import minidomimport sysprint("input: " + sys.argv[1])#fin = open('xyz.xml', 'r', encoding="latin-1")fin = open(sys.argv[1], 'r', encoding="latin-1")raw = fin.read()print('magic happens')doc = minidom.parseString(raw)fin.close()#fout = open('romlist.txt', 'w', encoding="latin-1")fout = open(sys.argv[1]+'.map', 'w', encoding="latin-1")softwareNodes = doc.getElementsByTagName("software")counter = 0for game in softwareNodes: name = game.getAttribute("name") description = game.getElementsByTagName("description")[0] output = name + ".zip|" + description.firstChild.nodeValue +'\n' #print(description.firstChild.nodeValue + "|" +name) try: fout.write(output) counter += 1 except: e = sys.exc_info()[0] print (name) print (e) fout.close()print("games in list: " + str(len(softwareNodes)) + ", games written to file " + sys.argv[1]+'.map' + ": " + str(counter))#print counterAll games are now shown in the correct way plus they load via the frontend as the internal *.bat now loads the correct *.zip file