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: HELP: Wiring potentiometer to gameport  (Read 4305 times)

0 Members and 1 Guest are viewing this topic.

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
HELP: Wiring potentiometer to gameport
« on: February 11, 2003, 09:35:20 am »
In the site http://www.gunpowder.freeserve.co.uk/wheels/wiring.htm,
I read about connecting a gas/brake two pedal assembly either in a single-axis (figure 1) or dual-axis (figure 2).   I am getting two gas/brake pedal assemblies (ie: 4 pedals in total) so do you think I could connect one gas/brake assembly in a single-axis format using "J1Y" using pins 6 and 9 (like figure 1) and then connect the second gas/brake assembly in a dual-axis format using "J2X" and "J2Y" using pins 11 and 13?  Also, I hope to attach my 4-speed shifter (ie: 4 microswitches) to pins 2, 7, 10 and 14 (ie: Btn0, Btn1, Btn2 and Btn3 respectively).  Also, my steering wheel potentiometer will attach to pins 1 and 3 (as stated in figure 1).

Regarding my pedals....I am not trying to get two players to play at the same time.  Basically, I know some games call for three pedals (ie: Race Drivin', Hard Drivin', etc..) so I wanted to have at least 3 pedals.  I found a deal on two gas/brake virtua racing pedal sets which I am going to purchase so this gives me 4 pedals in all.  After reading the informarion at the website listed above, it seems like some games call for single-axis and some dual-axis so I want to have both type sets.  The website shows how to connect two pedals to a switch to allow for single-axis and dual-axis within one gas/brake pedal set, but since I am getting two gas/brake pedal sets anyway, it seems I would not need the switch.  I could simply wire one pair of pedals to be single-axis and the other as dual-axis so I could use the one pair to play the games which call for single-axis games and the other pair to play dual-axis games.   For the games which call for three pedals, I would believe (but PLEASE CONFIRM) that I could use one set of pedals plus only one pedal from the second set (ie: I could use the dual-axis set plus one pedal from the single-axis set (or vice versa)).

My question is will all of my pedals and buttons be interpreted by Mame32 successfully using the pin configurations stated above?   I mean will Mame somehow be able to allow me to play driving games with my pedals by getting inputs in either of the J1Y J2X and J2Y pins?  Obviously I want to make sure Mame32 will work before I  go through this effort....

I was going to hack two mice to for spinners in Mame32 but I found out that Mame32 could not intepret the Y-axis mouse input so I only made one spinner hack for the X-axis.   I am not sure whether this same concern (ie: Mame32 not register Y-axis input) is a problem for gameport input.....In my description above, I would be utilizing the J1X and J1Y inputs of the gameport.   Please help me figure whether this stuff will work before I buy all my driving assembly parts....

Thanks
UncleT
« Last Edit: February 11, 2003, 11:57:09 am by unclet »

Rocky

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 562
  • Last login:December 30, 2009, 12:38:41 pm
  • I want to finish my cab before I retire!!
Re:HELP: Wiring potentiometer to gameport
« Reply #1 on: February 11, 2003, 10:23:49 am »
MAME does have some restrictions on what analog inputs can be assigned to which player controls. Analog+ may have overcome this, I'm not sure.  I'm just planning to use 1 pedal so I haven't explored this very much.

Before I did any planning for my pedal and wheel, I tested everything with a regular PC wheel (actually a flight yoke). If you can hook up 2 joysticks to your game port and successfully map the right axis to the right controls, you will be fine when you hack the pedals.

Good luck,


Rocky

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+
Re:HELP: Wiring potentiometer to gameport
« Reply #2 on: February 12, 2003, 12:55:52 am »
original quote snipped do to post length limit. :D

Basically, I know some games call for three pedals (ie: Race Drivin', Hard Drivin', etc..) so I wanted to have at least 3 pedals.... I want to have both type sets.  The website shows how to connect two pedals to a switch to allow for single-axis and dual-axis within one gas/brake pedal set, but ... I would not need the switch.  I could simply wire one pair of pedals to be single-axis and the other as dual-axis so I could use the one pair to play the games which call for single-axis games and the other pair to play dual-axis games.   For the games which call for three pedals, I would believe (but PLEASE CONFIRM) that I could use one set of pedals plus only one pedal from the second set (ie: I could use the dual-axis set plus one pedal from the single-axis set (or vice versa)).

Yes.
I haven't tried this wiring, but I'm sure it will work (you do have to install joystick drivers correctly ;) ).  I think you should wire the steering wheel to J1 X (pin 3), the single axis pedals to J1 Y (pin 6), brake (of the dual axis pedals) to J2 Y (pin 13), and gas (of the dual axis) to J2 X (pin 11) for easiest input mapping:
Single axis games would not need any remapping.
Dual and three pedal axis games then would be set using ctrlr pedal.ini file.  Brake should work, but you'd need to change the gas input to joystick 2 X (or whatever the driver assigns it).  If the game has clutch, it could use the single axis pedals for that.

Quote
My question is will all of my pedals and buttons be interpreted by Mame32 successfully using the pin configurations stated above?   I mean will Mame somehow be able to allow me to play driving games with my pedals by getting inputs in either of the J1Y J2X and J2Y pins?  Obviously I want to make sure Mame32 will work before I  go through this effort....

If you install the drivers correctly, no problems.  I think you'd need to install it as two 2 axis, 2 button analog joysticks, which is fine for mame.  If you can find a driver for a 4 axis 4 button analog joystick, try using that; mame can use that too.

Quote
I was going to hack two mice to for spinners in Mame32 but I found out that Mame32 could not intepret the Y-axis mouse input so I only made one spinner hack for the X-axis.   I am not sure whether this same concern (ie: Mame32 not register Y-axis input) is a problem for gameport input.....In my description above, I would be utilizing the J1X and J1Y inputs of the gameport.

It has nothing to do with your joystick.  In mame, you can't remap mouse axis inputs (mouse buttons you can).  Mame:Analog+ (see my sig) can remap mouse axis, and there is a mame32 build, but the mame32:analog+ build doesn't have the commandline options coded into the mame32 GUI yet. :(
Robin
Knowledge is Power

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+
Re:HELP: Wiring potentiometer to gameport
« Reply #3 on: February 12, 2003, 12:56:01 am »
MAME does have some restrictions on what analog inputs can be assigned to which player controls. Analog+ may have overcome this, I'm not sure.  I'm just planning to use 1 pedal so I haven't explored this very much.

MAME is not as limited any more.  Err, as far as analog joystick inputs are concerned.  The FAQ has resently been updated to this fact, even though mame has had it for the last few versions. (Yay!  Now I can "read the FAQ", again.)  Details, MAME (and analog+) can remap analog joysticks, with one restriction:
If the input is analog from the device, left and right (up & down) are read from the same axis, and that axis is read for the first of the axis pair (left & up are always listed first before right or down).  
Example: a 270 steering wheel installed in windows as joystick 3 X-axis.  If you map "player 1 paddle" (the first one, or "left") to "joystick 3 X-axis -", right is "joystick 3 X-axis +" even though not listed in menu.  If you use ctrlr ini file, you only need to map P1_PADDLE "JOYCODE_3_LEFT" to do the same thing, but it is good for readablility also to P1_PADDLE_EXT "JOYCODE_3_RIGHT" so the user can see that in the UI input menu even though mame does not use it for analog devices.  (you still need to do both if the device is digital like an 8way or the keyboard).
Robin
Knowledge is Power

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re:HELP: Wiring potentiometer to gameport
« Reply #4 on: February 12, 2003, 07:35:20 am »
- Am I correct in assuming that an analog joystick is anything which is connected to the gameport which uses a potentiometer?

- What does Mame consider to be "paddle"?   How is that different than an analog joystick?


Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:HELP: Wiring potentiometer to gameport
« Reply #5 on: February 12, 2003, 09:30:23 am »
AFAIK 'paddle's are handled exactly the same as analog 'stick's - except they only have 1 axis.

It is confusing in MAME why say Out Run is classed as 'stick' but only has 1 analog axis - so I personally would have classed this as a paddle.  Other 270degree wheel games are indeed classed as paddles.

I think I am right in saying that anyway :)

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re:HELP: Wiring potentiometer to gameport
« Reply #6 on: February 12, 2003, 09:53:11 am »
Regarding the joystick drivers.....(and please keep in mind I am new to all of this....thanks)

Since I want to be able to connect 4 microswitches (rom my 4-speed shifter) to the button inputs of the gameport and have them function of course.  In order to have these buttons function, it would seem I must install a driver which indicates "....-axis and 4 button" ....correct?  

If I install a driver for two 2 axis, 2 button analog joysticks (which was mentioned), then will the 4 buttons located on my 4-speed shifter work properly?   It seems I might just have to install a driver for a 4 axis 4 button analog joystick (which was also mentioned).  

Would either driver do or is there a specific one I need to install now that you know I want to use all 4 button inputs via the gameport.   Also, you mentioned "if I could find a 4 axis 4 button analog joystick driver"...which leads me to believe this is hard to find....is it?

neuromancer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 446
  • Last login:May 10, 2006, 04:26:57 pm
  • Can I Play?
Re:HELP: Wiring potentiometer to gameport
« Reply #7 on: February 12, 2003, 10:56:41 am »
AFAIK 'paddle's are handled exactly the same as analog 'stick's - except they only have 1 axis.

It is confusing in MAME why say Out Run is classed as 'stick' but only has 1 analog axis - so I personally would have classed this as a paddle.

Out Run has 2 axis. Steering and throttle.

Bob

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7662
  • Last login:January 18, 2019, 05:03:20 am
    • MAMEWAH
Re:HELP: Wiring potentiometer to gameport
« Reply #8 on: February 12, 2003, 11:14:41 am »
AFAIK 'paddle's are handled exactly the same as analog 'stick's - except they only have 1 axis.

It is confusing in MAME why say Out Run is classed as 'stick' but only has 1 analog axis - so I personally would have classed this as a paddle.

Out Run has 2 axis. Steering and throttle.

Bob

Not as far as MAME is concerned - it has one analog (X) axis.  The throttle and brake controls are handled digitally.  IMO an analogue X axis and a couple of digital inputs does not equate to an analog joystick.  A paddle + 2 buttons would be better suited.

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+
Re:HELP: Wiring potentiometer to gameport
« Reply #9 on: February 12, 2003, 11:24:40 pm »
- Am I correct in assuming that an analog joystick is anything which is connected to the gameport which uses a potentiometer?

Analog joystick can mean two things.  
One is what you said.  
Other is anything connected to a computer that the OS sees as a joystick with at least one axis can can have a range of values greater than 3 (digital axis having three: left, center, right).

The second definition includes devices definited in the first, plus USB "analog" sticks (USB is digital format).

As far as mame is concerned, the second definition is more accurate.  As far as your project, either will do.


Quote
- What does Mame consider to be "paddle"?   How is that different than an analog joystick?

AFAIK 'paddle's are handled exactly the same as analog 'stick's - except they only have 1 axis.

The difference is only in the documenting, ATM.

To mame AD_STICK_X == PADDLE, and AD_STICK_Y == PADDLE_V.  Translation: analog stick X axis equals paddle, and analog stick Y axis equals paddle (vertical).  Also, in mame, there is no requirement that an analog stick (AD_STICK) needs to have two axes.  Yup, all are handled the exactly the same.  

Quote
It is confusing in MAME why say Out Run is classed as 'stick' but only has 1 analog axis - so I personally would have classed this as a paddle.  Other 270degree wheel games are indeed classed as paddles.

It's up to the driver writer.  IMO, I think paddle is a better definition for steering wheels, and some people (like Aaron Giles) write their drivers with the same feeling.  Other writers feel that games with two (analog) pedals and a steering wheel are easier/clearer to emulate with an analog joystick, and write the drivers that way.  *shrug*
Robin
Knowledge is Power

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+
Re:HELP: Wiring potentiometer to gameport
« Reply #10 on: February 12, 2003, 11:29:54 pm »
If I install a driver for two 2 axis, 2 button analog joysticks (which was mentioned), then will the 4 buttons located on my 4-speed shifter work properly?   It seems I might just have to install a driver for a 4 axis 4 button analog joystick (which was also mentioned).

If you install two 2 axis 2 button drivers, 2 of your buttons will be on joystick 1, the other joystick 2 (J1B1, J1B2, J2B1, J2B2).  If you install a four axis 4 button driver all buttons will be on the same joystick (J1B1, J1B2, J1B3, J1B4).  *shrug*  Either will work in mame.

As far as drivers, I think win98 and know winME come with default drivers that include both types (I run on winME).
Robin
Knowledge is Power

unclet

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3561
  • Last login:March 17, 2025, 11:51:15 am
Re:HELP: Wiring potentiometer to gameport
« Reply #11 on: February 13, 2003, 07:39:45 am »
I plan on having my pot steering wheel connected to J1X, my single-axis pedals to J1Y, my dual-axis gas pedal to J2X and my dual-axis brake to J2Y.  My 4-speed shifter has four buttons (microswitches) on it which I would like to connect and allow the player to use no matter if they are playing with the single-axis or dual-axis pedals.  

If I install a 4-axis/4-button driver then all buttons will be on J1 (mentioned below).  Can I use all of these 4 buttons (defined on J1) if I am using the dual-axis brake/gas pedals which are defined on J2(X/Y)?   Do the buttons and pedals have to be on the same joystick for some reason?

Similarly, if I use a 2-axis/2-button driver then two buttons will be on J1 and 2 buttons will be on J2 (mentioned below), but can I still use all 4 buttons when playing dual-axis games which utilize the J2(X/Y).

I would think that mame would care less which joystick the buttons are defined, since Mame allows key mapping of either location......correct?

Just curious to see if this will work nicely for single-axis and dual-axis game.....and trying to learn more stuff as well.

Thanks
UncleT
« Last Edit: February 13, 2003, 09:16:45 am by unclet »