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: 1p vs 2pm games in MAME  (Read 3491 times)

0 Members and 1 Guest are viewing this topic.

secret80sman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 104
  • Last login:March 14, 2013, 07:04:31 pm
    • The Ultimate 80's Tribute Band
1p vs 2pm games in MAME
« on: January 19, 2010, 08:28:55 am »
Am having trouble assigning player two controls for mame games that typically only had a single jostick on their arcade machine counterparts (ex. Ms. Pac Man, Galaga, etc.) I can reassign player one control to whatever I want but then those controls are the same for player two. If I want to have a friend sit with me side by side and not have to reach over everytime we switch is there anything else I can do other than having a dedicated shared stick in the middle ? ins Is there something I am doing wrong? I know how to assign controls inside of each game (press enter and then the direction of the joystick or button of choice). Any help would be greatly appreciated.

Thanks everyone!
MG

Thenasty

  • Trade Count: (+17)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 4420
  • Last login:July 24, 2025, 06:20:12 pm
    • Thenasty's Arcademania Horizontal/Vertical monitor setup.
Re: 1p vs 2pm games in MAME
« Reply #1 on: January 19, 2010, 08:34:59 am »
there nothing you're doing wrong. Remember MAME emulates how the real ARCADE WORKS. So Ms.Pacman is a Single Joystcik and player take turns using the same joystick. This is how the orignal works and how it was program.
If you're good in re-programing MAME, maybe you can achieve what you wanted.


You can however achieve this via HARDWARE. You can setup both joysticks to the same inputs, then have a switch for the GROUND and switch it when it's the other players turn.


If its a cocktail setup, then just go in the DIP setting and switch the game to coctail.
« Last Edit: January 19, 2010, 08:37:10 am by Thenasty »
Thenasty's Arcademania Horizontal/Vertical setup.
http://forum.arcadecontrols.com/index.php?topic=26696.0

Free VGA Breakout Cable
http://forum.arcadecontrols.com/index.php?topic=38228.0

Ultimate All in One Coin Mech write up (Make your own)
http://forum.arcadecontrols.com/index.php?topic=19200.0

Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5285
  • Last login:June 13, 2025, 09:18:32 pm
  • Intellivision Rocks!
Re: 1p vs 2pm games in MAME
« Reply #2 on: January 19, 2010, 09:07:04 am »
Another thought is for those games that are affected by this to map both joysticks to the same inputs within Mame itself.  Only do it for those select games though.

So for Ms Pac-Man, Mame will allow you to have two controls assigned to move her right (or any direction) and you would have those controls be Joy 1 and Joy 2 right.  They would both be able to move her.

Make sense?

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 25, 2025, 05:49:10 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: 1p vs 2pm games in MAME
« Reply #3 on: January 19, 2010, 09:34:15 am »
Another thought is for those games that are affected by this to map both joysticks to the same inputs within Mame itself.  Only do it for those select games though.

So for Ms Pac-Man, Mame will allow you to have two controls assigned to move her right (or any direction) and you would have those controls be Joy 1 and Joy 2 right.  They would both be able to move her.

Make sense?

I'll simplify:

redefine/remap your inputs so both joysticks control "player one"
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

Hoopz

  • Don't brand me a troublemaker!
  • Trade Count: (+8)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5285
  • Last login:June 13, 2025, 09:18:32 pm
  • Intellivision Rocks!
Re: 1p vs 2pm games in MAME
« Reply #4 on: January 19, 2010, 09:50:19 am »
Another thought is for those games that are affected by this to map both joysticks to the same inputs within Mame itself.  Only do it for those select games though.

So for Ms Pac-Man, Mame will allow you to have two controls assigned to move her right (or any direction) and you would have those controls be Joy 1 and Joy 2 right.  They would both be able to move her.

Make sense?

I'll simplify:

redefine/remap your inputs so both joysticks control "player one"
Sometimes, I get a little wordy....  :P

 :lol

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: 1p vs 2pm games in MAME
« Reply #5 on: January 19, 2010, 02:28:58 pm »
If you're good in re-programing MAME, maybe you can achieve what you wanted.

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.

Don

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 106
  • Last login:March 26, 2024, 04:39:03 pm
Re: 1p vs 2pm games in MAME
« Reply #6 on: January 19, 2010, 03:54:14 pm »
MAME can have multiple inputs to do the same function. For example you can set it up where you configure your inputs so that:

Joy 1 up = (up Arrow) OR (R)
Joy 1 down = (down arrow) OR (F)
Button 1 = (L-ctrl) OR (A)
..etc.

*above is example you may have diff inputs for each button/direction than me

This means that both player 1 and player 2 controls will do the same function for the game you want

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: 1p vs 2pm games in MAME
« Reply #7 on: January 19, 2010, 08:21:25 pm »
yeah, but it also means that player 2 can completely mess up player 1's game because both joysticks will work for both players.

I think the original question was about making the games work so that players 1 and 2 used different controls for their turns, and those controls only work for them.  That simply isn't possible due to the design of the games, it has nothing to do with MAME, it's the way the games were made and MAME emulates them faithfully.



Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14019
  • Last login:July 25, 2025, 05:49:10 pm
  • Have you played with my GingerBalls?
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: 1p vs 2pm games in MAME
« Reply #8 on: January 19, 2010, 08:27:57 pm »
is taking turns on the same stick really that hard?

perhaps a second MAME cab for player 2 then?  :laugh:
If you're replying to a troll you are part of the problem.
I also need to follow this advice. Ignore or report, don't reply.

DJ_Izumi

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1098
  • Last login:November 04, 2023, 04:19:22 pm
Re: 1p vs 2pm games in MAME
« Reply #9 on: January 19, 2010, 08:36:48 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.

It would work, it's just not be very productive.  I've seen it in offical console emulators like when Namco releases pacman on a modern console.  The emulator switches which controller gets to control the character depending on which player number is active.  So on say Namco 50th Ani you will NEED two controllers to play the two player game.


bkenobi

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1668
  • Last login:August 16, 2021, 10:41:52 pm
Re: 1p vs 2pm games in MAME
« Reply #10 on: January 19, 2010, 09:13:54 pm »
Search for CFG Magician.  It will do what you want!

EDIT:  Here you go:
http://forum.arcadecontrols.com/index.php?topic=88948.0

secret80sman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 104
  • Last login:March 14, 2013, 07:04:31 pm
    • The Ultimate 80's Tribute Band
Re: 1p vs 2pm games in MAME
« Reply #11 on: January 19, 2010, 09:17:45 pm »
Everyone,
This was a big help, 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.

I agree that it is not ideal because both joysticks are in effect active so if one stops for a second and the other stick is bumped accidentally (or on purpose as would be the case with some of my friends) then you could be in trouble. I don't have a dedicated four way stick so for now this will have to do. Thanks again for pointing me in the right direction!

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: 1p vs 2pm games in MAME
« Reply #12 on: January 20, 2010, 07:39:13 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.

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.
Robin
Knowledge is Power

gazz292

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 137
  • Last login:January 22, 2022, 12:00:01 pm
Re: 1p vs 2pm games in MAME
« Reply #13 on: January 20, 2010, 07:46:39 pm »
go with the both joys mapped to player one, but add the guts from one of those electric shock games to the shaft of the joysticks, have a relay that connects the ouput of the shocker to the oposite joystick that's in use at the time, then if you buddy's try to mess your game up, they pay for it   >:D

secret80sman

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 104
  • Last login:March 14, 2013, 07:04:31 pm
    • The Ultimate 80's Tribute Band
Re: 1p vs 2pm games in MAME
« Reply #14 on: January 21, 2010, 12:19:35 pm »
go with the both joys mapped to player one, but add the guts from one of those electric shock games to the shaft of the joysticks, have a relay that connects the ouput of the shocker to the oposite joystick that's in use at the time, then if you buddy's try to mess your game up, they pay for it   >:D

I like this solution best of all.  :lol

Haze

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1296
  • Last login:October 04, 2023, 08:30:02 am
  • I want to build my own arcade controls!
    • MAME Development Blog
Re: 1p vs 2pm games in MAME
« Reply #15 on: January 21, 2010, 02:10:51 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.

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.

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

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: 1p vs 2pm games in MAME
« Reply #16 on: January 21, 2010, 06:56:10 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.

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.

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.

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.
Robin
Knowledge is Power

saurian333

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 284
  • Last login:June 10, 2014, 07:58:21 pm
  • "They must've spent tens of dollars on this."
    • My b(uild)log
Re: 1p vs 2pm games in MAME
« Reply #17 on: January 22, 2010, 06:03:42 am »
[...] 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.

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

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 146
  • Last login:December 29, 2015, 06:36:55 pm
  • Keep it Smooth...
Re: 1p vs 2pm games in MAME
« Reply #18 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

saurian333

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 284
  • Last login:June 10, 2014, 07:58:21 pm
  • "They must've spent tens of dollars on this."
    • My b(uild)log
Re: 1p vs 2pm games in MAME
« Reply #19 on: January 22, 2010, 09:33:18 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

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.

JohnEDollar

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 146
  • Last login:December 29, 2015, 06:36:55 pm
  • Keep it Smooth...
Re: 1p vs 2pm games in MAME
« Reply #20 on: January 23, 2010, 10:45:35 am »
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.

saurian333:  Good Point! I didn't think of that initially.  ???

An option to restore the 2P simultaneous gameplay would be to add another SPDT switch to the mix.

This would be on the ground (common) connection for both joysticks directional switches.

One position of the switch would allow for normal Player 1 & Player 2 joystick input.
Flip the switch to the other position, and the ground connection would run the SPDT switch scenario described above.

Some extra wiring would be needed, but this option *could* and should work.  :)

Best option is as you suggested though - just play 'hotseat' and trust your buddy won't move the joystick when it's your turn.  ;D

- John

saurian333

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 284
  • Last login:June 10, 2014, 07:58:21 pm
  • "They must've spent tens of dollars on this."
    • My b(uild)log
Re: 1p vs 2pm games in MAME
« Reply #21 on: January 23, 2010, 01:47:54 pm »
Best option is as you suggested though - just play 'hotseat' and trust your buddy won't move the joystick when it's your turn.  ;D

Hrm?  lol
By "hotseat," I mean you switch seats when your turn comes around.  Don't have to worry about the moving joystick thing.

I honestly think that's the best option, unless you're on a cocktail as mentioned earlier.