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 --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Pole Position Gear Shift - Am I set up correctly?  (Read 282 times)

0 Members and 1 Guest are viewing this topic.

funbobby

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Today at 12:48:51 pm
  • I want to build my own arcade controls!
Pole Position Gear Shift - Am I set up correctly?
« on: September 05, 2019, 09:58:56 am »
Hey Guys,

I am using the original Pole Position controls along with the U-HID board.  I still have the original controls (so a single switch on the gear shift).  I have flipped the TOGGLE option to NO, and configured the U-HID to send a constant keypress when closed, then clear it out when not closed.  This works great because it never gets confused between High/Low gear.  I've noticed if I leave the gear shift in the closed position when I walk away from the machine, after a while it freezes and stops running the 'Attract Mode'.  I simply re-start it and everything is fine, but I'm pretty sure the issue is because it's the equivalent of pressing the spacebar down for an hour.

 I've read many older threads where people suggest/beg for the ability to map high/low to two different keys, but I haven't read where that is currently available.

I just wanted to double check that I'm using the latest features available to make the original controls work as realistically as possible and I"m not missing something.

Thanks!

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 527
  • Last login:Yesterday at 06:57:40 am
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #1 on: September 07, 2019, 10:27:23 am »
Change the keypress the u-hid emulates when your shifter switch close (you said spacebar, right?) and you should be good to go.
What do you mean when you say 'I have configured the u-hid to send a keypress when closed'? There should be no need for "special" configurations if the shifter in mame is set to 'no toggle'

funbobby

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Today at 12:48:51 pm
  • I want to build my own arcade controls!
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #2 on: September 09, 2019, 02:45:10 pm »
What do you mean when you say 'I have configured the u-hid to send a keypress when closed'?

I just mean that the keypress in u-hid is NOT set to pulse....so it acts as a constant keypress....as if you're holding a key down.   With Toggle set to NO, I couldn't figure out another way to do it.

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 527
  • Last login:Yesterday at 06:57:40 am
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #3 on: September 10, 2019, 12:36:08 am »
Ok, I suppose that's the correct choice. "Pulse" is likely PWM of some sort (I am not used to commercial "arcade" boards like U-HID, but Arduino ;) ).
Try changing the mapping of the shifter switch then.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 7394
  • Last login:Today at 06:02:35 pm
  • Designated spam hunter
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #4 on: September 10, 2019, 02:43:23 am »
Pulse option sends one short keypress when the shifter switch is closed.
http://www.u-hid.com/home/u_config_utils.php
Quote
Pulse Primary
This sends a short pulse, simulating the key being pressed then released, even though it might still be physically closed (eg a toggle switch left closed)

[I couldn't figure out another way to do it.
Have you tried changing it to a gamepad button output?
Quote
Important Note about keyboard keycodes: On USB keyboards (and therefore the U-HID) the auto-repeat of the keyboard is done in Windows. So if you assign any keycode to be pressed permanently (which can occur in many configurations) you will get an endless string of characters in your application. For this reason, many of the advanced combinations should only be used with gamepad buttons, which do not have a problem being held in the pressed position.
You should also avoid defining any keyboard keys from being "pressed" by default as this will cause boot failures (stuck key) and may cause unexpected problems in the Windows GUI.


Scott

funbobby

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Today at 12:48:51 pm
  • I want to build my own arcade controls!
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #5 on: September 10, 2019, 08:50:20 am »

Have you tried changing it to a gamepad button output?


Scott

I'll definitely experiment some with changing it to gamepad.  I had read the warnings about the constant keypress a while ago,  and that describes exactly what's happening  (Windows doesn't like the constant keypress)  but didn't pick up on the fact that a button press worked differently than standard keyboard input.  Thanks!

funbobby

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 13
  • Last login:Today at 12:48:51 pm
  • I want to build my own arcade controls!
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #6 on: September 12, 2019, 09:53:09 am »
Thanks again for the help.  Changing it to a gamepad button worked perfectly.  Everything still works perfectly and Windows doesn't crash.

PL1

  • Global Moderator
  • Trade Count: (+1)
  • Full Member
  • *****
  • Online Online
  • Posts: 7394
  • Last login:Today at 06:02:35 pm
  • Designated spam hunter
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #7 on: September 12, 2019, 10:36:44 am »
Glad to assist.   :cheers:


Scott

baritonomarchetto

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 527
  • Last login:Yesterday at 06:57:40 am
Re: Pole Position Gear Shift - Am I set up correctly?
« Reply #8 on: September 12, 2019, 11:17:20 am »
Good work!