Site hosted by Angelfire.com: Build your free website today!

A Fix for Some of the Analog Pedal Problems

With this hack you should be able to compile a MAME that handles analog pedals a little better.

I tested this hack on versions 37b16, 53, 54, and 55. It will work for all other MAME versions that use the file src/inptport.c written on 5/13/2001, which starts at either mame 0.37b12 or 13. I don't know about versions before that date. I'm giving the line numbers of ver 55 (and 54), but the others are only off by 3 more lines, so you will not have any problems finding the right spots (just add 3 to the line number given).

How to apply this dirty hack:

  1. Download mame source.
  2. Open src/inptport.c and the file included with these instructions in any text editor. I will start at the end of inptport so the line numbers still match. Each step in the PedalHacks.txt is labeled
  3. Cut and paste the function isNegativeSemiAxis() in PedalHacks.txt to the end of inptport.c
  4. At line 1211 just before the line with "IPF_REVERSE", insert the six lines that check for the semi-axis.
  5. On line 1121 change "is_stick = 0" to "is_stick = 1", or just cut and paste from the PedalHack.txt file over lines 1120 and 1121.
  6. Cut and paste the function prototype near the top of the file inptport.c on its own line. The first line is fine, but not "nice". It's better to place it just before the first function near line 328. (No need to put it in the header file because the function is for use in this file only)
  7. recompile MAME. You'll have to check elsewhere for the info ;)
  8. enable joystick control in mame.ini, or in command line call, or in your frontend. Plug in analog controling device and make sure it works on your computer.
  9. Start game. Edit input for pedal 1 to one of your pedals in either just this game or all games. ([TAB])
  10. enjoy!

Fixes, and not fixed:

Fixes:

Not fixed: