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: SOLVED: Need help with U-hid nano and Pole Position  (Read 13357 times)

0 Members and 1 Guest are viewing this topic.

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
SOLVED: Need help with U-hid nano and Pole Position
« on: March 27, 2024, 09:53:57 am »
Morning all-

I have just had the worst luck getting this to work, and I have spent hours reading lots of information on the internet as well as documentation from Andy @ Ultimarc- but I am just stymied.
I may be making my problems worse each time I try a new wiring configuration too- I'm not too bright.   :dizzy:

Can anyone here that knows what I'm dealing with have mercy upon me and help me solve this dreadful problem?  Beers/coffees will be bought.  Many thanks for reading!

KR
« Last Edit: March 28, 2024, 05:46:37 pm by Kid Raster »

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9546
  • Last login:Today at 11:20:43 pm
  • Designated spam hunter
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #1 on: March 27, 2024, 10:51:36 am »
I have just had the worst luck getting this to work, and I have spent hours reading lots of information on the internet as well as documentation from Andy @ Ultimarc- but I am just stymied.
Pretty sure the U-HID can't be configured for the "active high" inputs from the Pole Position steering wheel optical board -- you'll need an encoder like the OptiPac for that.



You may also find useful info in these posts.

The pedals are pots, right?
The Pole Position upright cab has only one pedal.  The sit-down cab has two pedals.
- The upright and sit-down cabs both have a potentiometer gas pedal.
- The sit-down cab has a microswitch brake pedal.

See pages 44-45 of the manual here.

To interface with the Pole Position cab controls, you'll need a PCB or encoder(s) that can handle three types of inputs.
- Optical (mouse) inputs from the wheel.
- Analog (potentiometer) input from the gas pedal.
- Digital (microswitch) inputs from the shifter, coin door, and (if you have a sit-down cab) brake pedal.

The other thing you'll need to deal with is that the Pole Position optical board is an "active high" device, but most optical encoders are "active low" devices.
http://forum.arcadecontrols.com/index.php/topic,156286.msg1641780.html#msg1641780

i have a Pole Position and i am trying to hook up the Opti-Pac but i seem to not get any mouse movement... anyone have a how to or information on something i may be doing wrong.


X1 and X2 are the data lines.

Set your multimeter to Volts and check the following:

1. Is ground connected to the ground pin?

2. Is 5v connected to the 5v pin?

3. When you slowly turn the wheel, do the data lines alternate between logic high (near 5v) and logic low. (near 0v)
- A line that is stuck high or low points toward a bad opto. (or possibly a bad board)

This quadrature waveform shows what you would see on the data lines (A and B) when you slowly turn the wheel clockwise.




Scott

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #2 on: March 27, 2024, 02:14:26 pm »
Scott thanks- good seeing you again.  Thanks a lot for your reply.

I was almost positive I have seen this achieved with only a U-hid nano (which is what convinced me to buy one) because of the Quadrature capability- but maybe it was a dream- I dunno.  :dunno

So- I DO happen to have an Opti-pac as well.  I'm guessing that the U-hid will at least allow me to use the analog pedal (it's an upright) and the shifter/coin.
Now, I guess I could still use a little nudge as far as setting up the Opti-pac right...Andy's link on his post on the thread you linked to is a 404 now.  :P

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #3 on: March 27, 2024, 08:34:17 pm »
Steering is fixed now via OptiPac- very cool, thanks for that!
Now I have the shifter and coin working with the U-hid nano, but I can't figure out where the pedal needs to go.  Here is a picture of what I am working with, if someone could point me in the right direction on where to connect these to the U-hid nano I would be eternally grateful!   :cheers:

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9546
  • Last login:Today at 11:20:43 pm
  • Designated spam hunter
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #4 on: March 27, 2024, 09:25:18 pm »
I was almost positive I have seen this achieved with only a U-hid nano (which is what convinced me to buy one) because of the Quadrature capability- but maybe it was a dream- I dunno.  :dunno
The original optical board won't work with the U-HID because the logic high/low voltage levels are different for active high devices vs. active low devices.

IIRC someone changed out an active high original optical board for a Happ Red Board (active low device) to interface the controls with just a U-HID Nano.

https://forum.arcadecontrols.com/index.php/topic,166213.msg1752485.html#msg1752485

https://forum.arcadecontrols.com/index.php/topic,160573.0.html

Steering is fixed now via OptiPac- very cool, thanks for that!
Now I have the shifter and coin working with the U-hid nano, but I can't figure out where the pedal needs to go.  Here is a picture of what I am working with, if someone could point me in the right direction on where to connect these to the U-hid nano I would be eternally grateful!   :cheers:
That pic shows J25.  Pin 1 is on the left.

Pin 1 (green) - Ground (Frame ground)
Pin 2 (red) - 5v from U-HID (Potentiometer 5v)
Pin 3 (black) - Ground from U-HID (Potentiometer ground)
Pin 5 (green) - Wiper (Potentiometer center tab) to analog input on U-HID

https://www.arcade-museum.com/manuals-videogames/P/Pole_Position_SP218_2nd_Printing_Sheet_2ab.pdf


Scott
« Last Edit: March 27, 2024, 09:27:33 pm by PL1 »

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #5 on: March 27, 2024, 10:14:14 pm »
Scott thanks a lot for your help here.  So I have an update-

I have the opti-pac working (I think, because I can move the mouse pointer left and right on the windows desktop with the steering wheel) but it doesn't seem to steer the car in-game.  :dunno
I also followed your instructions on wiring the pedal with the U-hid nano, and it seems to work, but for whatever reason, when I press the pedal, the car rotates left/right (what the wheel should be doing).

So, I'm guessing there is just some sort of setup in MAME that I am missing.  I'm running MAME32Plus! 0.105.  Should I be using a different emulator for Pole Position?

I appreciate your help so far.  I was completely lost before.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9546
  • Last login:Today at 11:20:43 pm
  • Designated spam hunter
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #6 on: March 28, 2024, 02:33:50 am »
I'm running MAME32Plus! 0.105.  Should I be using a different emulator for Pole Position?
That's a REALLY ancient version of MAME.

You might want a more recent version, especially if changing the shifter output to a gamepad button doesn't work for you.

https://forum.arcadecontrols.com/index.php/topic,161022.0.html

I have the opti-pac working (I think, because I can move the mouse pointer left and right on the windows desktop with the steering wheel) but it doesn't seem to steer the car in-game.  :dunno
Windows recognizes the steering wheel as mouse X-axis.  That is good.

I also followed your instructions on wiring the pedal with the U-hid nano, and it seems to work, but for whatever reason, when I press the pedal, the car rotates left/right (what the wheel should be doing).
Mame accepts analog input from the pedal.  That is good, but you might want to consider changing the U-HID configuration for that input from X-axis (left/right) to Y-axis. (up/down)

So, I'm guessing there is just some sort of setup in MAME that I am missing.  I'm running MAME32Plus! 0.105.
1.) Do you already have mame.ini in your installation?
- if not, you'll need to launch mame one time with the "-cc" (create config) software switch to create a mame.ini file. (i.e. "mame.exe -cc")

2.) Edit mame.ini using notepad.
- Under "CORE INPUT OPTIONS", you want both mouse and joystick to be enabled (1) not disabled. (0)
- Save file and exit.

Code: [Select]
#
# CORE INPUT OPTIONS
#
coin_lockout              1
ctrlr                     
mouse                     1
joystick                  1
lightgun                  0

3.) Map the controls in MAME.
- Start Pole Position in MAME.
- Hit TAB to bring up the MAME menu system.
- Go to the "Inputs (this Game)" menu.

- Highlight "P1 Pedal 1 Analog".
- Press ENTER. (Tells MAME to remap this input)
- Step on the pedal. (MAME should see the change and map the pedal to this input)

- Highlight "P1 Pedal 1 Analog DEC". (The DEC and INC inputs are used to generate fake analog/mouse inputs using button presses -- you've got real analog and mouse inputs so you don't want these inputs active)
- Press ENTER.
- Press ESC. (MAME should map this input to "none")  NOTE: In some releases of MAME, you'll need to press DELETE to set the input to "none".

- Highlight "P1 Pedal 1 Analog INC".
- Press ENTER.
- Press ESC. (MAME should map this input to "none")

- Highlight "Dial Analog".
- Press ENTER.
- Turn the steering wheel. (MAME should see the change and map the steering wheel to this input)

- Highlight "Dial Analog DEC".
- Press ENTER.
- Press ESC. (MAME should map this input to "none")

- Highlight "Dial Analog INC".
- Press ENTER.
- Press ESC. (MAME should map this input to "none")

That should get you pretty close to running right, other than configuring the shifter as a gamepad button and remapping that input in MAME. (see link at the beginning of the post)


Scott

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #7 on: March 28, 2024, 10:52:49 am »
Scott-

I can't thank you enough man...really just over the mountain.  IT WORKS!  I'll just have to figure out the shifter, it works but I think the mechanics of it are wonky.
When I assign it as gamepad key in the U-hid nano, I can't get it to detect at all.  There are choices for "down action" and "up action"- pic attached- I'm not sure what to choose in those fields.  Setting it as a key (ie spacebar) seems to work, but I've gotta shift up AND down each time I want it to change gears, instead of just shifting up OR down.  Again not sure what to choose in the up action/down action fields. :dunno
But your top tier level support has been really great.  PM me your Paypal addy and I'll buy you a few beers, or coffees, or Big Gulps!!!

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 9546
  • Last login:Today at 11:20:43 pm
  • Designated spam hunter
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #8 on: March 28, 2024, 12:45:39 pm »
When I assign it as gamepad key in the U-hid nano, I can't get it to detect at all.  There are choices for "down action" and "up action"- pic attached- I'm not sure what to choose in those fields.
There's a description of the various action choices at https://www.u-hid.com/home/u_config_utils.php, but I'd recommend trying "Normal Primary" for down and "Clear" for up with a gamepad button and shifter toggling disabled in MAME.

To disable toggling, upgrade to MAME v0.151 (or newer) and manually edit the polepos.cfg file using Notepad.

http://forum.arcadecontrols.com/index.php/topic,135345.0.html

Tested and confirmed working in MAME v0.262 and MAMEUIFX 0.152.  Just add the text in red to the port tag=":IN0L" (shifter) line.

Quote
. . .
        <input>
            <port tag=":IN0L" type="P1_BUTTON1" mask="2" defvalue="2" value="0" toggle="no" />
            <port tag=":BRAKE" type="P1_PEDAL2" mask="255" defvalue="0">
                <newseq type="standard">
. . .

If the shifter switch works backward, edit the .cfg file to map the control to "NOT".

https://forum.arcadecontrols.com/index.php/topic,165173.msg1741846.html#msg1741846

If the steps in this post don't work for you, check out this thread for some other options.

https://forum.arcadecontrols.com/index.php/topic,165173.0.html


Scott
EDIT: ROMnames for Pole Position changed in v0.150 so you'll need to update the ROM too.  Easiest way is to find a known version ROMset first then download the matching version of MAME.
« Last Edit: March 28, 2024, 12:58:18 pm by PL1 »

Kid Raster

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:July 30, 2024, 10:10:25 pm
  • More bounce to the ounce
Re: Need help with U-hid nano and Pole Position cabinet
« Reply #9 on: March 28, 2024, 02:19:31 pm »
Scott thanks.  I'll start heading that way.  The offer for some beverages stands eternal.  :notworthy: