Ok, I have the basics working.
Mame only. You can have multiple versions of mame though and you can have multiple configurations (or filters as I'm calling them)
You define your emulators in an xml file
You define your filters in another xml file.
here is the filters.xml example I'm working with
<?xml version="1.0"?>
<Filters xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="
http://www.w3.org/2001/XMLSchema">
<List>
<Filter>
<Name>All</Name>
<Emulator>MAME</Emulator>
<Hide>false</Hide>
<Conditions>
<Condition>
<Operator>ALL</Operator>
<And>false</And>
</Condition>
</Conditions>
<Arguments />
</Filter>
<Filter>
<Name>Fighters</Name>
<Emulator>MAME</Emulator>
<Hide>false</Hide>
<Conditions>
<Condition>
<Property>input.buttons</Property>
<Value>6</Value>
<Operator>EQUALS</Operator>
<And>false</And>
</Condition>
<Condition>
<Property>input.control.type</Property>
<Value>joy8way</Value>
<Operator>EQUALS</Operator>
<And>true</And>
</Condition>
</Conditions>
<Arguments>-cfg_directory cfgfighters</Arguments>
</Filter>
</List>
</Filters>
This will run all games normally, but then, if your running a game with 8way joystick and it has 6 buttons, it will change the cfg (*config directory) to another one.
This allows me to then change the default keys for all fighters the have buttons 1-3 on the top, and 4-7 on the bottom.
I can add/remove games based on the filters (hide) so you could add all games, change the configuration of some, then remove all trackball games and all mature games ect.
I'm hoping to have a release out by next weekend (possibly a mid release before then).
what I hope to add before then.
- Add argument replacement from the properties. (ie, you could send in %input.control.type% in the arguments and it would swap the games <input><control><type> as its value. (this is mainly for the rom name, its hardcoded now, but I'm sure someone will think of something better to use it for).
- Add Zinc support
- Add some more Operators (currently only EQUALS and NOTEQUALS) but greater then / less then would be great for video support. And also a LIST mode that would take a comma seperated list as it's value.
- -listxml support (have all the info, just have to produce the strings)
- use it with a frontend and change whatevers needed that I'm not thinking about.
- create a .dat parser
btw, frontend authors out there. Calling any mame commands other then -listxml?