Help with MAME source (read on)


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]

Posted by EmuMannen on 2, 2000 at 4:01 AM:

In Reply to: Re: Interesting question (read on) posted by EmuMannen on 2, 2000 at 3:46 AM:

I have started to browse the MAME sorce to find the format of the [mamedir]\cfg\[game].cfg files. It is like looking for a needle in a haystack. So could some one that knows the source inside and out please point me in the right direction (struct, function, .c or .h file etc). Thanks in advance for any help that might speed things up a bit...

/ EmuMannen

: You are probably right but I am (like most programmers) quite lazy so I would prefere some documentation (if there is one) instead of browsing sorce code. I don't know if the .cfg format is Mame or Allegro native, it is in binary format and different sizes for different games (so it is probably not a simple generic struct shared by all games). Well I might have to browse the source after all to get an answer...

: / EmuMannen

: : Couldn't the format of cfg files be found by looking at the mame source?

: : : Your question is interesting and I think that it would be possible for me to write a program that would do what you want if I only knew the format of the .cfg files in the cfg mame sub directory. Do any one know where I can find documentation of the format of the .cfg files?

: : : / EmuMannen

: : : : My control panel has two joysticks. Both of the sticks work perfectly in MAME. The left joystick uses a keyboard hack (arrow keys), and the right uses a gamepad hack (wired to gameport). This is great for ArcadeOS, because either stick will select games. MAME allows you to use either the joystick1 or keyboard arrows, so both sticks work identically by default.

: : : : HOWEVER...

: : : : I configured MAME (TAB defaults) so that player one uses the stick on the left and player two uses the stick on the right. This is great for two player (simultaneous) games (such as Joust). However, for single stick games (such as Pac-Man), it would be preferable to allow the use of either stick for player one or player two. That is, you could use whichever stick is more comfortable to you! However, I have to individually edit the MAME settings for every single stick game to allow the use of either stick.

: : : : This is probably impossibly difficult to follow (if you are still reading).

: : : : What I want to be able to do is configure all "single joystick" games to use either stick (the MAME default), while all simultaneous two+ player games (like Bubble Bobble, Simpsons, Joust, etc.) will use left for player 1 and right for player 2. Additionally, I would like Robotron and Crazy Climber to use both sticks.

: : : : Anyway, I was wondering if there is any way to do this automatically (or an easier alternative), or does each game have to be edited individually?

: : : : If you're still with me on this, nice job! Any help would be wildly appreciated.

: : : : Thanks,

: : : : noeltox




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]