Main Woodworking Reviews Software Monitor/Video Maximus Arcade
Audio/Jukebox/MP3 Project Announcements Artwork Consoles Buy/Sell/Trade Meet Up
Arcade Miscellaneous Everything Else Politics n Religion Forum Discussion Wiki Discussion GroovyMAME
DOS/WinCab Merit/JVL Touchscreen Automated Projects Driving & Racing Project Arcade Old Boards
Linux Restorations Pinball MaLa Frontend controls.dat Old Archives

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


  

Author Topic: Hi/Low Gear Shifter in MAME  (Read 2030 times)

0 Members and 1 Guest are viewing this topic.

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Hi/Low Gear Shifter in MAME
« on: May 08, 2008, 09:12:32 pm »
 :hissy: Ok this is just driving me crazy.

Does anyone know how to get an Hi/Low gear shifter to work in games like Out Run, Chase HQ, Pole Position...

I've got a single microswitch shifter, like this one



 :cheers:

cw

  • Trade Count: (+7)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 692
  • Game over man game over
    • The Cab
Re: Hi/Low Gear Shifter in MAME
« Reply #1 on: May 09, 2008, 07:50:45 am »
hmmm seems like you could hook up the no and nc parts of the switch so that it would shift when you engage the switch or disengage the switch.

gonzojoey

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
Re: Hi/Low Gear Shifter in MAME
« Reply #2 on: May 09, 2008, 08:31:09 am »
I've never tried, but I think I remember someone converting a Pole Position cabinet to MAME and setting the config so that LOW GEAR was always on (no key assigned, i think) and then HIGH GEAR was assigned (that's when the microswitch on the shifter gets engaged). I'll keep searching to see if I can find the build info from that.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9546
  • Comanche, OK -- USA
Re: Hi/Low Gear Shifter in MAME
« Reply #3 on: May 09, 2008, 09:44:43 am »
hmmm seems like you could hook up the no and nc parts of the switch so that it would shift when you engage the switch or disengage the switch.
That makes the most sense to me (going by the way it's setup in MAME)

gonzojoey

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
Re: Hi/Low Gear Shifter in MAME
« Reply #4 on: May 09, 2008, 01:04:17 pm »
Here's the build I was talking about: http://www.classicplastic.net/dvgi/special-poleposition.html

He says "Thanks to some help from another Pole Position MAME cabinet owner at the Build Your Own Arcade Controls forum, I was given a recompile of MAME v0.56 that supports proper arcade shifting"

I have no idea who that is, but hopefully they'll chime in and give you a hand.

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #5 on: May 09, 2008, 02:07:01 pm »
After almost loosing my mind I got it.

First I tried to add a second switch in parallel with the first one, meaning that, when shiftting gears the other switch would have the same keystroke. This works, but there was an issue...wether in Hi or Low position there was a constant key press while the computer is ON which is a real bummer.

So i decided to go the other way around, ie. having the gear keystroke when the lever is neither in Hi or Low, so that there is a signal to the encoder when the lever is moved and neither switch is pressed, and I got by doing this simple connection...


It works like charm, the only catch is that you've got to have the lever in the right position at the beginning of the game.

 :cheers:

PS - I can't really understand why the MAMEDev team don't add a simple  mod to the input of this games, so that:

Gear key pressed - Hi gear
Gear Key not pressed - Low Gear

It would be so much simpler and much more arcade perfect. 

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #6 on: May 09, 2008, 02:21:21 pm »
Thanks for the replies guys...

I knew there was a possible way to get this by recompiling MAME, but from what I saw in other threads, that doesn't always work, and as I'm not a real expert in recompiling MAME, I decided to go the other way.

 :cheers:

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #7 on: May 12, 2008, 05:03:02 am »
styxx:

Does your connection method work with the 3 'types' of hi/lo shifter games?...using your examples:

1) Pole Position = toggle method
2) Chase HQ = hold shifter input = lo / release = hi
3) [Can't think of an example] = input for lo, input for hi

I can see that this would work for 1), but not so sure about the others.

Agreed it would be very nice if MAMEdev decided upon a 'standard' method, as to my knowledge although some shifters work differently to others, shifter operation in Mame seems to be done however the driver author felt like it.

(edited, misleading game name)
« Last Edit: May 13, 2008, 06:30:31 am by Minwah »

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #8 on: May 13, 2008, 12:36:54 am »
styxx:

Does your connection method work with the 3 'types' of hi/lo shifter games?...using your examples:

1) Pole Position = toggle method
2) Chase HQ = hold shifter input = lo / release = hi
3) Out Run = input for lo, input for hi

I can see that this would work for 1), but not so sure about the others.

Agreed it would be very nice if MAMEdev decided upon a 'standard' method, as to my knowledge although some shifters work differently to others, shifter operation in Mame seems to be done however the driver author felt like it.

The game that I tested this on was Out Run, and as it uses a single keystroke to change gear, so it works great. That keystroke is generated while the lever is moving and neither switch is pressed.
 
I got so excited playing it that I didn't even bother testing this on the others. ::)

Well tested on Pole Position, and it's perfect :applaud:

Tested on Chase HQ and S.C.I. and it doesn't work...bummer :angry: and considering these are two of my favourite driving games...bummer,bummer :angry: :angry: :angry: :angry:
Chase HQ works just like you said......well back to the drawing board for this one :banghead:

I'll report later

By the way, are there any other shifting methods in the other driving games?
( except 4 gear, clutch, etc... which of course are a different matter)

 :cheers: 

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #9 on: May 13, 2008, 06:35:16 am »
The game that I tested this on was Out Run, and as it uses a single keystroke to change gear

Sorry, I know there are games as I describe in 3), I thought OutRun was one of them. I can't think of another off the top of my head...

Quote
Tested on Chase HQ and S.C.I. and it doesn't work...bummer :angry: and considering these are two of my favourite driving games...bummer,bummer :angry: :angry: :angry: :angry:
Chase HQ works just like you said......well back to the drawing board for this one :banghead:

Yeah, bummer :(  I actually have a 4-speed shifter, so have a microswitch for each gear (I use 1st/2nd for lo/hi). It works pretty much fine with all these games, but the 'toggle' type games can get confusing as it doesn't matter which position the stick is in...and it can get out of sync...also you don't know which gear it is in to begin with.

Quote
By the way, are there any other shifting methods in the other driving games?
( except 4 gear, clutch, etc... which of course are a different matter)

Not that I know of, unless a new method(s) has been added since Mame ~0.99.

Angry_Radish

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 521
Re: Hi/Low Gear Shifter in MAME
« Reply #10 on: May 13, 2008, 08:51:58 pm »
I've never tried, but I think I remember someone converting a Pole Position cabinet to MAME and setting the config so that LOW GEAR was always on (no key assigned, i think) and then HIGH GEAR was assigned (that's when the microswitch on the shifter gets engaged). I'll keep searching to see if I can find the build info from that.


If you look through my old posts, I linked to the original thread on recompiling for pole position.
Works great on my driving cab (Using an atari shifter)

 **edit**
Found the thread: http://forum.arcadecontrols.com/index.php?topic=68742.0
/**edit**
« Last Edit: May 13, 2008, 08:57:31 pm by Angry_Radish »

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #11 on: May 14, 2008, 04:26:07 am »
If you look through my old posts, I linked to the original thread on recompiling for pole position.
Works great on my driving cab (Using an atari shifter)

Thank you, that should come in handy :)

However, I have other problems with Pole Position...I started using v0.123 and now v0.125 as analog pedals do not work properly with some older versions (I was using v0.99). But there was the problem of refreshspeed not working in v0.123 (stuttery sound), and now in v0.125 refreshspeed causes some horrible noises to occur. So I will probably wait for these issues to be worked out...

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #12 on: May 15, 2008, 07:58:10 pm »
Well, finally I reached a working solution, and it turned out to be an easy one.

Using the above connection, I added a two position switch like this one


It will work as a selector for two different modes with the same gear shifter, and it will all go like this


Mode 1 - works in games like Chase HQ or S.C.I.

Mode 2 - works in games like Out Run or Pole Position ( toggle method), this should also work in games
              that use two different inputs for Hi and Low, as long as you assign them the same letter. Like
              Minwah mentioned I can't really remember any game either, but if I come across one, I'll post later.

In Mode 1 there's no catch and works perfectly, in Mode 2 the only catch is that you have to engage the right gear before the game starts( as an example Out Run starts in Hi  and  Pole Position starts in Low). 

The two position switch is really small and can go unnoticed anywhere in the CP. Above the shifter, underneath it or in here:
   

Finally, if you don't want to have a constant key pressed when not playing, just engage Hi Gear in either Mode.

 :cheers:

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #13 on: May 16, 2008, 05:32:05 am »
Nice idea! :)

I thought of another (I think) solution.  Use one microswitch, and wire NO to one input (Input 1) on your encoder, and NC to another (Input 2). Using my 3 'methods' again:

1) (toggle) Have the gear input set to Input 1 OR Input 2
2) (hold=lo) Have gear input as Input 2 (assuming lo gear does not engage microswitch)
3) (2 inputs) Have lo gear input as Input 2, hi gear as Input 1

This suffers with the same flaw with the toggle method - the stick needs to be in the correct position to start with (and also eg taking out of lo and putting it back in lo messes up the gear positions).

Another thing is that there is no way to prevent a constant keypress. I would suggest a simple switch in the ground line to basically switch the shifter on or off.

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #14 on: May 16, 2008, 01:04:20 pm »
Nice idea! :)

I thought of another (I think) solution.  Use one microswitch, and wire NO to one input (Input 1) on your encoder, and NC to another (Input 2). Using my 3 'methods' again:

1) (toggle) Have the gear input set to Input 1 OR Input 2
2) (hold=lo) Have gear input as Input 2 (assuming lo gear does not engage microswitch)
3) (2 inputs) Have lo gear input as Input 2, hi gear as Input 1

This suffers with the same flaw with the toggle method - the stick needs to be in the correct position to start with (and also eg taking out of lo and putting it back in lo messes up the gear positions).

Another thing is that there is no way to prevent a constant keypress. I would suggest a simple switch in the ground line to basically switch the shifter on or off.

Tested this connection, and here's my report  ;D ;D ;D

1) (toggle) - Gear set to Input 1 (gear only changes when Input 1 is pressed) doesn't work
                   Gear set to Input 2 ( gear only changes when you release input 2, basically same as above) doesn't work
                   Gear set to Input 1 and 2 (gear only changes when going from Input 2 to Input 1) doesn't work

2) (hold=lo) - Works fine as long as you assign gear to Input 1

3) (2 inputs) - Same as third attempt in 1) (toggle) doesn't work

Basically this connection doesn't work because both Switches are in there doing the same thing, Input 2 only sends a signal to the encoder when you release it.

 :cheers:
 

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #15 on: May 19, 2008, 12:50:35 pm »
1) (toggle) - Gear set to Input 1 (gear only changes when Input 1 is pressed) doesn't work
                   Gear set to Input 2 ( gear only changes when you release input 2, basically same as above) doesn't work

                   Gear set to Input 1 and 2 (gear only changes when going from Input 2 to Input 1) doesn't work

When you say 'Input 1 and 2', do you mean 'Input 1 OR 2' (in Mame, if you see what I mean?).  ie either can be pressed? I assume so, but just to make sure you didn't really mean 'and' (ie both have to be pressed at once)...

Quote
Basically this connection doesn't work because both Switches are in there doing the same thing, Input 2 only sends a signal to the encoder when you release it.

But when Input 2 stops sending a signal, Input 1 starts.

I don't doubt what you say (I haven't actually tried it), but can't really see why this wouldn't work. Lets call the Normally Open contact 'A', and the Normally Closed one 'B'...say 'A' and 'B' are the keys the inputs of the encoder are mapped to:

Lo gear = NO = A
Hi gear = NC = B

In Mame, gear = 'Kbd A or Kbd B'

There is always either A or B being sent, depending which gear is selected.  It only changes when you change gear.  So it should work....shouldn't it?

Quote
3) (2 inputs) - Same as third attempt in 1) (toggle) doesn't work

I don't see why this doesn't work either...NO is one gear, NC is the other, job done?

(again, not doubting your results, just trying to get my head round why it wouldn't work :))

styxx

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • My cab is a constant WIP...
Re: Hi/Low Gear Shifter in MAME
« Reply #16 on: May 19, 2008, 02:11:48 pm »
When you say 'Input 1 and 2', do you mean 'Input 1 OR 2' (in Mame, if you see what I mean?).  ie either can be pressed? I assume so, but just to make sure you didn't really mean 'and' (ie both have to be pressed at once)...

I meant assigning (in MAME) both inputs to gear shift, as the games that use this method only use one keystroke to change gear.


But when Input 2 stops sending a signal, Input 1 starts.

I don't doubt what you say (I haven't actually tried it), but can't really see why this wouldn't work. Lets call the Normally Open contact 'A', and the Normally Closed one 'B'...say 'A' and 'B' are the keys the inputs of the encoder are mapped to:

Lo gear = NO = A
Hi gear = NC = B

In Mame, gear = 'Kbd A or Kbd B'

There is always either A or B being sent, depending which gear is selected.  It only changes when you change gear.  So it should work....shouldn't it?

 
I don't see why this doesn't work either...NO is one gear, NC is the other, job done?

(again, not doubting your results, just trying to get my head round why it wouldn't work :))

You're getting this the wrong way around. A NC connected switch sends a signal when it's not pressed, so when you engage the gear shifter (ie press the switch) the signal is cut off.

You can do a simple test to try any connection, just grab two switches (any kind), connect them in which ever way you want, open Notepad and test the keystrokes :)

 :cheers:

Minwah

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7558
    • MAMEWAH
Re: Hi/Low Gear Shifter in MAME
« Reply #17 on: May 20, 2008, 06:42:34 am »
I meant assigning (in MAME) both inputs to gear shift, as the games that use this method only use one keystroke to change gear.

But, using AND (both inputs pressed at same time) or OR (either input can be pressed)? Both can be done in Mame, but the latter is needed here for this to work.

Quote
You're getting this the wrong way around. A NC connected switch sends a signal when it's not pressed, so when you engage the gear shifter (ie press the switch) the signal is cut off.

I know what NC is (I didn't say anywhere NC connects when the switch is pressed?)...  Effectively using these 2 contacts on one switch, they are two inputs to your encoder. So although the NC signal is cut off when the switch is engaged as you say, the NO signal connects.  So with these two terminals connected to two encoder inputs, one of the inputs is always 'live'.

Quote
You can do a simple test to try any connection, just grab two switches (any kind), connect them in which ever way you want, open Notepad and test the keystrokes :)

I don't need to ;) In the connection I described, either 'A' or 'B' would be constantly sent, depending whether the switch is closed or open. At no point would no keystrokes be sent. (edit: dependant on keyrepeat, but either way, one of the inputs would always be live).
« Last Edit: May 20, 2008, 06:49:58 am by Minwah »

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28