Main > Main Forum
Bribery for new Mame feature "Shifter Toggle" Help...
RobotronNut:
how about a simple hardware solution? if i understand correctly, mame currently expects momentary button presses in all cases, but some games play better with stay-in-place shifters.
if each microswitch in a 2-pos or 4-pos stay-in-place shifter were connected to a "one-shot" or "monostable multivibrator," you would get a single pulse, starting each time that switch is closed, and lasting for a user-definable duration. thus, your stay-in-place shifter would be simulating momentary button presses.
you can get 2 one-shots in a single TTL chip (74123, 74221, or 74423), so a 2-pos would need one chip, and a 4-pos would need 2 chips. you'd also need a few resistors and capacitors and access to +5V somewhere inside your panel. it would probably be even cheaper to use a very inexpensive microcontroller with a few lines of code.
i don't know if there'd be enough business for one of the vendors out there to take on this project.
Minwah:
--- Quote from: RobotronNut on January 24, 2006, 06:21:14 pm ---if each microswitch in a 2-pos or 4-pos stay-in-place shifter were connected to a "one-shot" or "monostable multivibrator," you would get a single pulse, starting each time that switch is closed, and lasting for a user-definable duration. thus, your stay-in-place shifter would be simulating momentary button presses.
--- End quote ---
Sounds like it should work, but then there are games of 'type 2', which wouldn't work with this. Also, you lost me with the hardware talk so I wouldn't want to have to build such a project. I think a software solution is best/simplest unltimately...
Silver:
Based on what has been said here, I believe there is NO hardware solution that can solve all the problems.
The problem is that the games in mame that use a shifter are configured differently. So you can make varios harware circuits to adapt different shifters to work in different situations (such as get a momentary to work as a 'held down' type, or vice versa. Or even the No/NC double wire up - but there are still games in every case that don't work correctly.
You could solve this by having a circuit that is ALSO controlled by software, so that it acted differently depending on which game you are playing (say get a frontend to activate it before launching the game) but if you are going to the trouble of a custom program, why not just mod mame?
Also, it would probably be viable to have a solely software solution - such as back ground program written to monitor for your "gear up" signal and then either send a always on signal or a momentary signal (ie get the effect of a custom circuit soley through software). Bit crude and hacky though.
The best to expect from mame is for authentic modelling of the original game. Has anyone done this and submitted the fixes? It appears the changes are not huge in this respect (I say this not being much of C programmer).
MikeQ:
What about adding this "circuit" (or software behavior) to a key-wiz. Since the key-wiz is programmable, you can program the desired behavior of the input attached to the shifter to match the game. Then when a game is selected, a config file or something describes the desired behavior and you program the key-wiz accordingly.
Mario:
--- Quote from: Minwah on January 24, 2006, 05:48:45 am ---
--- Quote from: Mario on January 23, 2006, 11:20:57 pm ---With a return-to-center type of shifter, any game can be supported.
--- End quote ---
But for some games (eg Chase HQ) where you have to hold a button down to stay in low, you would have to hold the shifter in the lo position and let go to engage high. So it would work but far from ideal. And for the other games (Pole Pos etc.) I agree with Xiaou - it wouldn't really feel right.
--- End quote ---
My key point is that Mame must support the setup. The Mame code should be written so that if a momentary contact shifter/joystick is used and the game ROM requires a constant contact, then the Mame code should tell the ROM code that the contact is still closed. I.e., Mame translates one type of control to another. Mame already does something similar in allowing a joystick to be used in place of a trackball.
Mario