Main > Main Forum
1p vs 2pm games in MAME
Haze:
--- Quote from: u_rebelscum on January 20, 2010, 07:39:13 pm ---
--- Quote from: Haze on January 19, 2010, 02:28:58 pm ---Reprogramming MAME won't help. The games only understand 1 joystick, that's the way the games were programmed. You would have to rewrite the actual GAME code to change that.
--- End quote ---
Technically, the easiest way around this is to hack mame (well, the game's driver) so "screen flip for cocktail play" doesn't work, and enable cocktail play. The game's software will do the switch inputs but not the flip screen. Ugly hack, but possible. And probably easier than hacking so mame looks at a specific memory bit that has to be found some how to see if it's player 1 or 2 (like the console emulations).
Both ways are against mame's goals, so you won't see 'em in mame unless you do 'em yourself, though. So yeah, practically, noone who can do it wants to do it, so it can't be done.
--- End quote ---
Well it depends on the game, some do the flipping in their own software, and don't set any flag, so you would have to at the very least poke around in ram in those cases.
u_rebelscum:
--- Quote from: Haze on January 21, 2010, 02:10:51 pm ---
--- Quote from: u_rebelscum on January 20, 2010, 07:39:13 pm ---
--- Quote from: Haze on January 19, 2010, 02:28:58 pm ---Reprogramming MAME won't help. The games only understand 1 joystick, that's the way the games were programmed. You would have to rewrite the actual GAME code to change that.
--- End quote ---
Technically, the easiest way around this is to hack mame (well, the game's driver) so "screen flip for cocktail play" doesn't work, and enable cocktail play. The game's software will do the switch inputs but not the flip screen. Ugly hack, but possible. And probably easier than hacking so mame looks at a specific memory bit that has to be found some how to see if it's player 1 or 2 (like the console emulations).
Both ways are against mame's goals, so you won't see 'em in mame unless you do 'em yourself, though. So yeah, practically, noone who can do it wants to do it, so it can't be done.
--- End quote ---
Well it depends on the game, some do the flipping in their own software, and don't set any flag, so you would have to at the very least poke around in ram in those cases.
--- End quote ---
Yeah. I was specifically thinking of the games that, for a while, mame couldn't flip the screen correctly. They were long running bugs in quite a few games. During that time, the switch controls "feature" the OP was asking for was part of mame. (And no, I don't remember which games nor which versions of mame.)
But you're right, many games did the flipping in software, so they coldn't "disable" that part of the driver since no part of the driver flips.
Ugly hacks anyway it's done. Just map both sticks to player 1 and play.
saurian333:
--- Quote from: secret80sman on January 19, 2010, 09:17:45 pm ---[...] I went the route of assigning both joysticks to control player 1 and 2. I did an experiment and while I was playing Ms. Pac Man with one joystick I touched the other one and it did not have any effect. It was almost as if MAME excluded the second joystick because the other joystick had "the right of way" so to speak.
--- End quote ---
That is happening for the same reason many people don't like 8-way sticks for games like Pac-Man. If one switch is activated, the game will not register a second one activated at the same time. It's not MAME ignoring the second stick, it's the game ignoring the second switch input. In some games, simultaneous inputs have worse effects, like causing the character to "freeze."
JohnEDollar:
Another possible option would be to use a SPDT switch, to switch between the two joysticks:
Wire both Joysticks as "Player 1".
Rewire the ground (Common) connection for the joystick directional switches, to the center pole of the switch.
Wire the other switch contact to the ground connections for each joystick's (Up, Down, Left, Right) common switch connections.
That way, you can flip the switch for the current player, and only that joystick is "electrically" active, due to the "ground" completing the switch circuit.
As a bonus, use a DPDT switch, and wire an LED to the other pole (half) of the switch.
Mount the LED near the active joystick, as a visual cue, indicating which player's joystick will control the game character.
Just a suggestion. ;)
- John
saurian333:
--- Quote from: JohnEDollar on January 22, 2010, 06:35:32 pm ---Another possible option would be to use a SPDT switch, to switch between the two joysticks:
Wire both Joysticks as "Player 1".
Rewire the ground (Common) connection for the joystick directional switches, to the center pole of the switch.
Wire the other switch contact to the ground connections for each joystick's (Up, Down, Left, Right) common switch connections.
That way, you can flip the switch for the current player, and only that joystick is "electrically" active, due to the "ground" completing the switch circuit.
As a bonus, use a DPDT switch, and wire an LED to the other pole (half) of the switch.
Mount the LED near the active joystick, as a visual cue, indicating which player's joystick will control the game character.
Just a suggestion. ;)
- John
--- End quote ---
But then, you'd never be able to play a 2P simultaneous game. You'd lose any reason for having 2 sets of controls, which brings us back to the "just play hotseat" option.