Now, that I got everything working I made some slight changes to your script to fit my needs:
- use game names instead of file names and multi-rom support
Main change is support for multi rom games. A lot of amiga games include several adf-files. UAE is able to load up to four of them at a time. So I made some changes to the creation of the xml files to show only the first one of the files as game and pass the rest of the files as parameter to UAE (or any other emulator that supports that feature).
If you are interested in this modifications you can view the modified default.py here:
http://pastebin.com/f5baa6323 (changes in getConfig, listRoms, bootRom and buildRomList). If you like this ideas you can take it into your main script, of course.
You will have to make some changes to your default.ini and maybe to your file names, too. Example config for uae looks like this (only modified lines):
Code:
app=uae {-%I% "%ROMPATH%%ROM%"}
diskprefix=_Disk
The part in the {}-brackets will be repeated if neccessary, otherwise the brackets will be removed. %I% will be replaced with the current file number (zero-based).
The modified xml will look like this:
Code:
<rom filename="Lemmings 2_Disk1.adf" game="Lemmings 2">
<description>
No Description.
</description>
<subrom filename="Lemmings 2_Disk2.adf" game="Lemmings 2"/>
<subrom filename="Lemmings 2_Disk3.adf" game="Lemmings 2"/>
</rom>
First file name remains unchanged. Other file names will be added as subrom-entries. This will only work if there is the diskprefix in the file name.
This is my first piece of python code so it will need some review. But until now (after 30 minutes testing;-)) I did not find any errors with launching games. I have a very small rom collection, maybe it will have problems with bigger ones.
I hope it is ok to post my changes here.
regards,
malte