Main > Main Forum
Analog pedal hack ideas....Mame's 'auto-release' analog pedal thing...
(1/3) > >>
Jakobud:
I was thinking about making some sort of detachable analog pedal to add to my cabinet.  Anyone got any ideas of how I would do this?  Like how it would interface for example?  Can I use normal PC analog pedals in Mame?  Also for driving games in Mame (ones with analog pedals) in the config menu, what is the 'Analog Pedal Auto-Release <y/n>" thing that I see in there? How does that work?
Minwah:
I have recently aquired an (Happ) 2x analog pedal unit, so I am doing almost the same thing myself...

I am replacing the 5k pots with 100k ones, and wiring them to the gameport.  I tried it quickly with one of the pedals and it worked great.  Actually, I plugged the gameport plug into a Gameport > USB adaptor I have (I want to use USB as much as possible in my cab).

See http://www.gunpowder.freeserve.co.uk/wheels/wiring.htm for exactly how to wire up the pedals (note the switched method for single/dual axis setups - probably worth doing that for all round compatibility).

A couple of days ago I started setting up the ctrlr ini files I want to use in my cab...here is the part that applies:

P1_PEDAL                "JOYCODE_1_UP"
P1_PEDAL_EXT        "JOYCODE_1_DOWN"
P2_PEDAL                "JOYCODE_1_LEFT"
P2_PEDAL_EXT        "JOYCODE_1_RIGHT"

This is assuming each pedal is on a different axis (P1 Y-axis, P2 X-axis).

If you enter the MAME GUI with this setup, you would notice that the 'Auto Release' part you mention says the '_EXT' control from the ctrlr ini (eg 'P1 Pedal Auto Release = Joy1 Down, something like that).  Of course 'P1 Pedal' would say something like 'Joy1 Up'.  Sorry I cannot be exact, you need the joystick plugged in for MAME to show this.

I think the auto release 'Y' option is for when using a digital input (keypress).

BTW you could try it out using an analog stick if you have one - same principal, an axis for each pedal.

As for the 'detachable-ness', maybe a PC pedal would be better, after all that!  :D  You could mount an arcade pedal in a box, and interface as I plan to with USB, just make sure the pedal is the last joystick in your ctrlr ini files...
u_rebelscum:

--- Quote from: Jakobud on June 17, 2003, 06:33:37 pm ---I was thinking about making some sort of detachable analog pedal to add to my cabinet.  Anyone got any ideas of how I would do this?  
--- End quote ---

Hack an analog joystick?  USB analog stick for easier PnP?  Finding the space to physically mount the pedal would the the hard part.


--- Quote ---Like how it would interface for example?  
--- End quote ---

Gameport or USB ports, as an analog joystick.

Remember to map the physical pedal to mame's pedal input.   Ctrlr ini files would be perfect for this.


--- Quote ---Can I use normal PC analog pedals in Mame?  
--- End quote ---

Yes.


--- Quote ---Also for driving games in Mame (ones with analog pedals) in the config menu, what is the 'Analog Pedal Auto-Release <y/n>" thing that I see in there? How does that work?

--- End quote ---

This setting is only needed it you use a button instead of an analog pedal.  With this set to 'Y', when you release the button mapped to the pedal, mame acts as if you took you foot off a pedal.  If set to "N", mame leaves the pedal pressed.  This is part of mame's simulation of a game's analog input when a PC digital input is really used.

The setting doesn't come into play if you use a real analog input.
unclet:
I wired a bunch of arcade controls which used 5K pots to Microsoft Sidewinder Dual Strike USB gamepads using 1Up's Star Wars yoke hack design.   You can use this hack to connect anything to USB.  I simply plug the controllers into a USB hub and connect the hub up to my computer (at least this is the idea...still building my cab, but completed hacking all my gamepads).  

PS:  The gamepads themselves use 5K pots, so no need tyo try to replace 5K pots with 100K pots to use in the gameport.  Also, the gameport is becoming obsolete and replaced by USB, so it made more sense to me to go the USB route.  I actually started looking at the wiring gameport website mentioned above and was about to start but 1Up convienced me to try his hack.  

I connected a Star Wars yoke, Spy Hunter steering wheel, Sega HAngOn motorcycle steering assembly, and 2 sets of gas/brake pedal assemblies (one will be wired for single-axis and the other wired for dual axis).

Good luck...
UncleT
u_rebelscum:

--- Quote from: Minwah on June 17, 2003, 06:48:26 pm ---A couple of days ago I started setting up the ctrlr ini files I want to use in my cab...here is the part that applies:

P1_PEDAL                "JOYCODE_1_UP"
P1_PEDAL_EXT        "JOYCODE_1_DOWN"
P2_PEDAL                "JOYCODE_1_LEFT"
P2_PEDAL_EXT        "JOYCODE_1_RIGHT"

This is assuming each pedal is on a different axis (P1 Y-axis, P2 X-axis).
--- End quote ---

Those PEDAL_EXT should not be the normal joystick inputs.  The possible values are "KEYCODE_Y" or "KEYCODE_N".  Unlike the other analog inputs, the pedal is only "half an axis", so mame uses the _EXT differently than other analog inputs.

Correct ctrlr ini:P1_PEDAL                "JOYCODE_1_UP"
P1_PEDAL_EXT        "KEYCODE_Y"
P2_PEDAL                "JOYCODE_1_LEFT"
P2_PEDAL_EXT        "KEYCODE_Y" With same assumptions.

I'd put the above in a ctrlr ini file called pedal.ini and add pedal_ini "pedal" in the default.ini file, so the above changes are made only for games that use pedals.
Navigation
Message Index
Next page

Go to full version