Build Your Own Arcade Controls Forum
Main => Software Forum => Topic started by: Lilwolf on December 10, 2007, 08:09:44 am
-
I'm considering / chunk of the way through writing an new middleware piece. This will sit between a frontend and emulators and make multiple emulators look like one instance of mame.
Why?
Well, I wanted some control that wasn't in a lot of frontends. Like changing video settings based on resolution, control settings in mame based on number of players and buttons, and also what emulator a game should run based on the what emulates it better for a given release.
when calling a game, it would then look through its own list and figure out what emulator should run, and what configuration, launch it... return when done.
It would also implement -listxml parameters and would only return the games that you want, and it would combine the results from multiple emulators.
You can get some of these features from some frontends. But it seems like it would be nice to be able to try different frontends without having to configure past the default mame.
Anyway, if this seems useful, let me know... Otherwise I won't add any configuration and just get it working for my own system.
-
If you do write such a piece of software, send me the source code. :)
-
Sounds like a great idea.
-
I always release my code. I started writing it in C# since I hadn't used it in years. It's great that Microsoft started giving out the Express Edition for home / project use!
-
Yes, great idea.
-
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?