Main > Driving & Racing Cabinets
Universal Gear Shifter support in MAME discussion
ntk:
i add another microswitch to my high/low shifter and i can turn on and off the second microswitch by pressing a button and now i can play all games with high/low shifter
before
after
abaraba:
--- Quote from: BadMouth on January 15, 2011, 10:31:02 am ---Something would have to keep track of what gear you are in, so it would know which "fake" gear switch to throw when you press GEAR UP.
--- End quote ---
That 'something' is called "variable" in programming, nothing you should concern yourself with, obviously. You misunderstood what Derrick said there, it's comical you are trying to re-do what he already has done, and solve problems that do not exist.
Derrick's stated his concern clearly, he is worried someone might forget toggle switch in ON position and mess UI input. Huh.
saint:
Abaraba - last warning. Tone your attitude down. If you can't post without belittling people don't post.
abaraba:
--- Quote from: SavannahLion on January 15, 2011, 01:07:09 pm ---Yeah, that's pretty much it. It's not hard to realize. Let's say we create an virtual shifter using keyboard buttons A and Z. Press A, we go HI, press Z we go low. Our imaginary player leaves the shifter on HI and exits the game for some reason (any reason, it doesn't matter). Then the gamer reenters the game at some point. The game driver has to make a choice about what state the shifter is in. Is it HI or is it LO? Since the game driver itself did not receive the last state of the shifter it sees that there is no signal and defaults to LO even though the shifter is left on HI. Now they're out of sync.
--- End quote ---
If you are using keyboard that would be no-issue, and if all HI/LO shifters are made with only one switch, perhaps to solve the problem you mention, then that makes it irrelevant there too.
As BadMouth corrected me before, Derrick does not map HI/LO shifters to two inputs, but only one, and I do not see any point of adding UP/DOWN set of inputs for this type of shifters at all. However, if required, it can be added like all the other hacks, which should be separate from proper function and therefore no-issue again.
--- Quote from: SavannahLion ---
--- Quote from: BadMouth ---If you're talking about the physical shifter becoming out of sync, here's my logic.....
With the old hi/lo shifter, there was only one switch (on the hi side).
If that switch wasn't closed, it defaulted to low gear.
Being in low gear is just the normal state of the game, like when no buttons are being pressed.
Think of the high gear switch as a turbo boost button.
Having the shifter in lo means absolutely nothing except that the high gear button isn't being pressed.
Same reasoning would apply to 1st gear on the 3 switch 4 spd shifter.
--- End quote ---
That kind of design will not work with a keyboard, period. A keyboard, within the OS, is designed to be interrupt driven. It has to. The OS needs to respond if something craps out. So by hooking up said shifter to a keyboard based controller and leaving it on HI would appear to the OS (or MAME or any other program) as a rapid series of key repeats. To prevent that, you would have to go in and tweak your OS settings (I believe Windows has it under Access settings) and that's kind of annoying.
--- End quote ---
I agree with BadMouth here, as I explained above. That is not supposed to work with a keyboard. It's not like you are going to put a brick on top of some key to lock it down, while authentic shifter only need to be put in neutral, or 'switch-off' position and everything will be just fine.
--- Quote from: SavannahLion ---The whole fake/real scheme that keeps coming up is just nonsense. You're virtualizing the controller. That's it. There's nothing magical about it.
--- End quote ---
I agree.
--- Quote from: SavannahLion ---I'm not entirely sure how I would want to tackle this. I might look at compiling a proper list identifying the shifter and, exactly, how they function. Without classifying or even trying to figure out how they would all interface in a standard way. Then I would examine the MAME code for each of those games and figure out what they were doing there. Then I would ultimately decided on how best to tackle the problem.
--- End quote ---
Everything is already there except "toggle switch" classification as a type of input device on its own.
Old devices:
- Analog stick
- Digital stick
- Paddle
- Dial
- Button switch
...
New device:
- Toggle switch
With that sorted out what remains to be done is the same thing as for 720, i.e. modify each driver to identify input device currently mapped/enabled and execute corresponding function accordingly. Nothing else needs to be done and this is really a minor modification/addition to core MAME, while modifying drivers for each game using shifter is where majority of work is.
SavannahLion:
Nothing against NTK, but that's actually something I want to avoid doing. I'd rather construct a small circuit that virtualizes that behavior rather than modify the actual hardware itself. That's why RAM Controls yoke interface is a HUGE plus and, what I feel, is a step in the right direction.
--- Quote from: ntk on January 15, 2011, 04:37:37 pm ---
i add another microswitch to my high/low shifter and i can turn on and off the second microswitch by pressing a button and now i can play all games with high/low shifter
before
after
--- End quote ---
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version