Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: useful middleware app?  (Read 1324 times)

0 Members and 1 Guest are viewing this topic.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
useful middleware app?
« 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.

Cakemeister

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1002
  • Last login:May 31, 2024, 06:23:16 pm
  • I'm a llama!
Re: useful middleware app?
« Reply #1 on: December 10, 2007, 08:37:25 am »
If you do write such a piece of software, send me the source code. :)

Old, but not obsolete.

gonzo90017

  • Trade Count: (+5)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1034
  • Last login:June 23, 2019, 02:41:07 pm
  • I'm a llama!
Re: useful middleware app?
« Reply #2 on: December 10, 2007, 01:42:19 pm »
Sounds like a great idea.

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: useful middleware app?
« Reply #3 on: December 10, 2007, 07:49:59 pm »
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!


Red

  • Trade Count: (+14)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 464
  • Last login:November 07, 2017, 08:37:51 am
  • I want to build my own arcade controls!
Re: useful middleware app?
« Reply #4 on: December 12, 2007, 12:47:27 am »
Yes, great idea. 

Lilwolf

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4945
  • Last login:July 31, 2022, 10:26:34 pm
Re: useful middleware app?
« Reply #5 on: December 15, 2007, 02:05:24 pm »
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?