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

Analog Pedal Patch Readme (2002-5-2)



Pedal Patch - What it Does

This patch is designed to fix the problem the official Mame has with the IPT_PEDAL input type (bug pedal055yel). IPT_PEDAL is an analog input type designed to emulate arcade analog pedals. Official Mame, however, does not read analog data from analog input devices; instead it converts the analog input to a digital on/off, and then uses this digital data to simulate an analog input. This patch allows Mame to use the analog data from analog input devices correctly. About 20 racing games use this input type for the game's pedal.

The patch also allows Mame to go back and use the older input method if you want (with a new command line/.ini/.cfg file option).

The patch works for both windows and dos versions of Mame.


Getting Started with the Pedal Patch

  1. Either download the binary exe, or compile the patch into Mame yourself. Compiling is detailed in the next section. Both can be downloaded from http://www.urebelscum.speedhost.com/download.html or one of it's mirrors.
  2. The binary compiled is called "mamepedal.exe" for windows, and "dmamep.exe" for DOS (like the official mame). You can: copy this over your normal Mame, rename the patched mame, or create a new directory for the patched mame. (This readme assumes are using mamepedal.exe, but most is the same for dmamep.exe). I suggest moving or extracting mamepedal into the same folder as mame is in. (Read the documents that came with standard mame on setting up mame.)
  3. If you are running the windows version, type "mamepedal -cc" to create the mamepedal.ini file. (If the file already is there, it will not be overwritten.)
  4. You can enable the feature if you want (this is the default) by:
  5. You can disable the feature if you want by:
  6. Run mamepedal like normal mame.

Compiling the Pedal Patch into Mame

  1. Download the official mame source files, if you haven't already.
  2. Download the correct compiler for which ever version (windows or DOS) you are going to compile, if you haven't already.
  3. Either download the edited source files or the diff file. If you downloaded the source files, copy them over the official mame source files. If you downloaded the diff file, use patch.exe to patch the changes into mame (more details on patching on next section). If you are using a non-official version of Mame, try downloading the diff file and patching; I think the diff file will work with most other versions, but no guaranty
  4. Compile the patched mame. (see windows compile or dos compile for more compile details)
  5. Continue with the Getting Started section.

How to use the Pedal Diff File

(this is just the basics)

  1. Download the most current "patch" for DOS/windows. Install it. (it can be downloaded from my download page)
  2. Download and then Copy/move the pedal diff file to Mame's base directory.
  3. Open a command line prompt
  4. Go to Mame's base directory. This probably is "mameXX", and src directory is a sub directory of this directory. (Do not start in the src directory)
  5. type "patch -p 1 -i difffilename.dif"
  6. If no errors are displayed, goto the Compiling the Patch into Mame section.

FAQ

How can I test if the pedal patch is working with my pedal/joystick?

  1. Start a game that uses the IPT_PEDAL input type (see table for list) and has a service mode. I suggest Spy Hunter or Super Sprint.
  2. Enter service mode (F2 for most games). (Super Sprint won't change to service mode until the race track screen.)
  3. Go to the page that tests pedal input. (For Super Sprint, press player 2 start once. For Spy Hunter, use your steering wheel/joystick left-right to move to item ___ and sellect with the key)
  4. Check if the pedal/joystick is set as the first joystick input for the pedal. (press TAB sellect Input (this game) and look at the pedal input settings) Add the pedal or joystick (up or down) if it isn't part of the input. Return to game's service page. (press TAB or ESC)
  5. Slowly press the pedal/joystick in the dirrection set for the pedal in the Input (this game). The numbers for the pedal should change in relation to the distance you move the pedal/joystick. Stop at some position somewhere near the middle of the movement; the numbers should not change. If the numbers continue changing all the way up or down when you hold the pedal/joystick in the same position, the patch isn't doing the job it should.

Why doesn't the pedal patch also do xxx?

This is a patch with only one change to Mame. If you want more patches to Mame's analog input, try my Mame:Analog+ patch. If you want different features from other mame variations patched in, you will have to compile it yourself. Sorry, I am busy enough as is.

However, I am open to new ideas, improvements, suggestions, bug reports, etc, that is related to mame's analog input handling, games with analog inputs, and maybe inputs in general. Just write to me with your input, and I'll see if I can help. No geranties, though

Can you add xxx to this patch?

If it isn't related to the analog pedal input, no. I might add it to my Mame:Analog+ patch, but maybe not. If not, you can compile this patch into most other versions of (dos or windows) Mame without much problems (see table in appendix).

Why so many limits with this patch?

Work is getting in the way of Mame, so I don't have very much time to do much more to the patch. Also, I want this patch to be as "clean" as possible, so it can be easily be added to the official Mame. Mame:Analog+ includes the pedal patch feature as well as more related to mame's analog inputs.

How do I disable the patch for a specific game?

Look at step five, getting started.

When will this pedal patch be part of the official mame?

I submitted it. I don't know if it will or won't, let alone when it will be added.

Is this pedal patch part of any other variations of Mame?

AFAIK, Mame:Analog+ is the only my other version of mame that has this patch. If any of the other variations want to use this patch, be my guest. If you let me know, I'll post it on my web sites. If anyone can improve my changes, please do. I am sure there are lots of places improvements are needed. I want all Mames to have better analog input, and that will only happen if changes are made.


Appendix

Games effected:

Game Name Driver Rom Set
Tested
Patch Work? Notes
ver.60
Datsun 280 Zzzap 8080bw.c 280zzzap Yes  
APB - All Points Bulletin atarisy2.c apb Yes  
Chequered Flag chqflag.c chqflag Yes  
Championship Sprint
atarisy2.c csprint Yes  
Dirt Fox namcos2.c dirtfoxj Yes* Conflict: Y axis aready in use. User needs to re-assign gear shift buttons to remove conflict.
Grand Champion grchamp.c grchamp Yes Game not fully emulated
Hard Drivin' harddriv.c harddriv Yes Game not fully emulated.
Hydra atarig1.c hydra Partial Conflict: Y axis aready in use. Game needs 3 analog axes for complete emulation. Use disable option "-noanalogpedal"
Danny Sullivan's
Indy Heat
ataxx.c indyheat Yes  
Laguna Racer 8080bw.c lagunar Yes  
Max RPM mcr3.c maxrpm Yes  
Ironman Stewart's Super Off-Road leland.c offroad Yes  
Pole Position polepos.c polepos Yes Although has 2 pedals, only the first pedal is fixed. This is the same as the original hardware; the brake is a switch (button) that feeds an analog variable in both the arcade and in mame.
Pole Position II polepos.c polepos2 Yes
Redline Racer leland.c redlin2p Yes*
*needs a change in driver/leland.c, included
Road Blasters atarisy1.c roadblst Yes  
Spy Hunter mcr3.c spyhunt Yes  
Spy Hunter 2 mcr68.c spyhunt2 Yes  
Super Sprint atarisy2.c ssprint Yes  
Turbo Tag mcr3.c turbotag Yes  

** there are more games that currently don't work yet, but whose drivers use the IPT_PEDAL analog device. (Final Lap is one, for example)