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: Questions about shifter  (Read 2552 times)

0 Members and 1 Guest are viewing this topic.

Dan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:February 09, 2010, 11:52:34 pm
  • I want to Build My Own Arcade Controls!!
Questions about shifter
« on: March 22, 2002, 01:02:08 am »
I have a 2-position shifter.  It only has one microswitch for low/high gear.  When it's in low gear the gate is closed and when it's in high gear the gate is open.  Am I supposed to connect both NO and NC to the LOW and HIGH inputs I assign to my IPAC, respectively?  That way, when the gear is in low position, it sends a signal to the low input and when it's in high position it sends a signal to the high input.  Also, I remember awhile back someone posted how to modify the driving game drivers to accept separate low/high input rather than toggle between low and high with one button.  I've searched the archives but I can't find it.  Does someone here have that modification?

Thanks!!
Dan
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Questions about shifter
« Reply #1 on: March 22, 2002, 01:27:56 am »
Quote
I have a 2-position shifter.
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Free resource for building your own rotating control panels!

My other job...


Dan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:February 09, 2010, 11:52:34 pm
  • I want to Build My Own Arcade Controls!!
Re: Questions about shifter
« Reply #2 on: March 22, 2002, 11:34:58 am »
I've done a bit of research into this low/high shifter issue and now I see what the problem is.  The coin-op Pole Position has two states for the shifter: low = switch closed, high = switch open (this could be reversed depending on if you're left or right handed).  But the MAME driver uses one button to toggle between low/high gear.  So here's the line of code from the driver.  Anybody know how to change this so that the state is always high unless you close the switch (hold down the button) in which case it switches to low?

PORT_BITX(0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 | IPF_TOGGLE, "Gear Change", KEYCODE_SPACE, IP_JOY_DEFAULT ) /* Gear */

Thanks for your help,
Dan
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Dan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:February 09, 2010, 11:52:34 pm
  • I want to Build My Own Arcade Controls!!
Re: Questions about shifter
« Reply #3 on: March 22, 2002, 02:44:02 pm »
I figured it out!  After some fiddling with the polepos.c source code, I came up with the following modification to the line of code I posted above:

PORT_BITX(0x02, IP_ACTIVE_LOW, IPT_BUTTON1, "LO Gear", KEYCODE_SPACE, IP_JOY_DEFAULT ) /* LO Gear */

The way it works is that the gear is set to LO as long as the SPACE bar (or whatever key you set in MAME) is pressed.  When you let go of the key, it switches back to HI gear.  Now the game will function like in the arcade and I can use my shifter!

Dan
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

1UP

  • Token Junkie
  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2081
  • Last login:November 11, 2014, 01:37:18 am
  • Yes, that is a joystick in my pocket.
    • 1UPArcade
Re: Questions about shifter
« Reply #4 on: March 24, 2002, 12:25:03 am »
How about a hack that lets you define a SEPARATE button for low and high, for PC steering wheels with paddle shifters?
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »

Free resource for building your own rotating control panels!

My other job...


Dan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 53
  • Last login:February 09, 2010, 11:52:34 pm
  • I want to Build My Own Arcade Controls!!
Re: Questions about shifter
« Reply #5 on: March 24, 2002, 03:56:10 pm »
After studying the source code for several MAME drivers, it wouldn't be that difficult to add support for separate inputs for LO/HI gears.  I also changed the driver for Turbo while I was at it.  Now I just need to mount the Oscar SWC and shifter in a panel :)

Dan
« Last Edit: December 31, 1969, 07:00:00 pm by 1026619200 »