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: Analog pedal hack ideas....Mame's 'auto-release' analog pedal thing...  (Read 4760 times)

0 Members and 1 Guest are viewing this topic.

Jakobud

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1962
  • Last login:June 30, 2025, 02:20:39 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?  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

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
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?  

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?  

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?  

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?

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.
Robin
Knowledge is Power

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
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).

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.
Robin
Knowledge is Power

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Ooops, sorry, didn't mean to mislead  :-[.  I haven't really used the ctrlr ini's that much yet.

U_Rebel:  What is the benefit of doing the P1_PEDAL etc stuff outside of default.ini?  Is this in case you are using say 1 analog joystick device for eg ad_stick, paddle & pedal, so the inputs may differ per game?

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
U_Rebel:  What is the benefit of doing the P1_PEDAL etc stuff outside of default.ini?  Is this in case you are using say 1 analog joystick device for eg ad_stick, paddle & pedal, so the inputs may differ per game?

I like modular info.  ;D

I guess the only real reason to do a pedal.ini is to also remap other stuff to a specific way if a game uses pedals.

Example:
I have a gamepad as joy1, and a steering wheel + pedals as joy2.  I'd want to remap my joy2 buttons to player1 for pedal & paddle games, while normally I wouldn't.  So I'd add two lines, paddle_ini "pedal" and pedal_ini "pedal" to default.ini and do the special joy2 steering wheel remapping only for the games that need it in the refered to pedal.ini file.

Also, part of the above is I'd like to keep default.ini as clean as possible, so I can quickly look at it and see how most games are mapped.  Since most games don't have ad_stick, dial, pedal, paddle, trackball, or lightgun inputs, I'd leave them out of the normal default remapping.  And wouldn't need to have the default player1 button1 mapped to "joy1 button0 or joy2 button0" all the time.

Third, a very, very, very minor speed boost can be found if a game's input ports have less PC inputs mapped to them.  Probably not noticable, but .... *shrug*

Forth, mame can only have one analog input mapped per game analog input type.  If I had two analog joysticks, and player1 had "Joy1_X_axis | Joy2_X_axis" mapped as inputs to P1_AD_stick_X, mame will see joy2's input as if was a digital input instead of the true analog input it is.  Since I'd want joy1 for analog stick games, and joy2 for pedals games (whether those games use "paddle" or "AD_stick_X" as the steering input type) this might cause a conflict.  Pedal.ini can get aroung this problem.  (something like under a dozen games still use AD_stick_X and pedal combos)

And last, for easy of troubleshooting ctrlr ini and input mapping problems.  If I get any ctrlr ini or input problems, I can troubleshoot by first renaming the pedal.ini file and seeing if the trouble still occurs.  If yes, then I know the input in pedal.ini are not causing the problem.

Most of these aren't of much importance, or only effect a few games. *shrug*  I guess it's up to you and the way your system is setup.
Robin
Knowledge is Power

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Thanks for explaining.

I think I hadn't thought of some of this, because I have mapped all the controls to have 1 input only, the exact key/joycode I want (eg "KEYCODE_UP" not "KEYCODE_UP
« Last Edit: June 18, 2003, 06:39:27 am by Minwah »

Aceldamor

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 878
  • Last login:October 25, 2019, 05:10:51 pm
  • You know you hear the music in your head...
Would your "turbo" button assignment also be like the Weapon Van Assignment for Spy Hunter?

What about games that have multiple gears like Hard Drivin' and Race Drivin'?
Fuzzy Wuzzy was a woman!

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Would your "turbo" button assignment also be like the Weapon Van Assignment for Spy Hunter?

What about games that have multiple gears like Hard Drivin' and Race Drivin'?

Yes, I suppose I would use the turbo button for the van in Spy Hunter...Although I will be using a modified RoadBlasters controller, so really I can have up to 4 fire buttons - I could use one of these.  I was originally planning on having both triggers / thumb buttons to be the same tho (2 inputs only).

As for Hard/Race Drivin', thanks for pointing that out - I haven't played them much since my PC has a hard time running them.  From what I can tell these games use an analog stick for the gear shift - my panel will not have this extra stick (nor a clutch for that matter) so I will probably just have to play it in automatic.  As with the Crusin' games (although I think these use buttons for gears).

Tiger-Heli

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5447
  • Last login:January 03, 2018, 02:19:23 pm
  • Ron Howard? . . . er, I mean . . . Run, Coward!!!
    • Tiger-Heli
Re:Analog pedal hack ideas....Mame's 'auto-release' analog pedal thing...
« Reply #10 on: June 18, 2003, 05:29:46 pm »
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
Did you hack 5 dual Strikes, or are you using some kind of disconnect between the DS and the controls?
It's not what you take when you leave this world behind you, it's what you leave behind you when you go. - R. Travis.
When all is said and done, generally much more is SAID than DONE.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re:Analog pedal hack ideas....Mame's 'auto-release' analog pedal thing...
« Reply #11 on: June 20, 2003, 01:00:14 pm »
I actually hacked 6 Dual Strikes because I am also connecting 2 Virtual-On joysticks to my driving cab too which I forgot to mention previously.   This was so I can play normal joystick games as well...   I did not want to be just limited to driving games on my "Driving cab" since if I am going to go through all of this trouble making this cab then it should do everything...almost (ie: it will not have a trackball or spinner....you will just need to use my standup 4-player Mame cabinet for those games...)

Also, I should mention that 1Up's Star Wars yoke hack site (http://www.1uparcade.com/project-swyoke.html) explains the wires required to be hacked (Left, Up, Down, Right from the directional pad) to connect a Star Wars yoke.  Since I was adding many other type arcade controllers in my cabinet with many switches, I decided to go ahead and hack the A/B/C/D/X/Y buttons and Left/Right trigger buttons as well.   This gives me 8 more "buttons/switches" per gamepad (ie: x6) to use for cabinet to connect stuff to.  Basically, I have 4 different types of shifters (4speed, 3speed turbo, 2 speed return to center turbo, 2-speed non-return to center with turbo) and also some of the controllers have buttons on them as well (ie: Spy Hunter, Virtual On joysticks, etc...) which need to be connected.

PS:  I know the shifters are a bit overkill, but it will look cool!

Oh yeah, I have also left space to eventually allow me to play my XBox games on my driving cabinet (ie: using a XBox steering wheel/pedals like a MadCatz MC2 Universal or something like this).
Should be great...since XBox has a lot of fun driving games.  Especially my kids will like it as well.
 
« Last Edit: June 20, 2003, 01:14:01 pm by unclet »