Help with mapping 4 start buttons for Galaga/Ms. PacMan
bengalsfan88 last edited by
I am using a Pi 3 with RetroPie v4.4 from the premade image. Right now I am just trying to get the software setup, so I only have a keyboard and monitor hooked up to the Pi.
I am using the lr-fbalpha emulator to run the 20th Anniversary edition of Ms. PacMan and Galaga (20pacgal).
I have an original arcade cabinet of the game, but it is broken. So I am trying to use RetroPie to restore it to a working condition. 20pacgal is the only ROM I have on it and is the only game I want to run.
On the original cabinet there are 4 start buttons: Ms. PacMan 1 or 2 player, and Galaga 1 or 2 player. My problem is I haven't been able to replicate this behavior. In the emulator Player 1's start button will begin a single player game of Ms. PacMan, while player 2's start button will begin a 2 player game of Galaga.
I have set the player 3 and player 4 start buttons in the /opt/retropie/configs/arcade/retroarch.cfg but nothing happens in-game. I have tried to use the in game menu to change the controls, but it won't let me set anything for player 3 or 4. Also the in-game menu shows both player 1 and player 2's start buttons as mapped to "Start (left)".
My apologies if anything is unclear. I am totally confused and would appreciate some help.
I have set the player 3 and player 4 start buttons in the /opt/retropie/configs/arcade/retroarch.cfg but nothing happens in-game. I have tried to use the in game menu to change the controls, but it won't let me set anything for player 3 or 4. Also the in-game menu shows both player 1 and player 2's start buttons as mapped to "Start (left)"
I don't think that's needed, the mapping are saved automatically when you configure the gamepad/joypads in Emulationstation. Looking at the source,
lr-fbalphaonly uses 2P controls - since any game is at most 2 players - and has P1 Start right/left mapped to P1/P2 start and P2 Start right/left mapped to P3/P4 start. Do you see these controls in the RGUI when you assign the mappings ?
jmbooth2000 last edited by
I haven't done anything like this but I think what you are trying to do is have the four buttons do the following,
- Btn 1 - Auto Start 1 Player PacMan
- Btn 2 - Auto Start 2 Player PacMan
- Btn 3 - Auto Start 1 Player Galaga
- Btn 4 - Auto Start 2 Player Galaga
Assuming I have the right idea I'd suggest looking up how to bind a keys for volume control. What you are trying to do is similar and rather than calling the script to change volume you would call a script that starts the appropriate game. Starting with a specific number of players is going to be hard. My only thought their is if there is a cheat to specify the number of players you might be able to specify that on the command line.
I'm also guessing you will want any existing game to terminate if you press one of the start buttons. You could do this by having a line something like,
kill `pgrep retroarch` &> /dev/null
Hope this helps
jmbooth2000 last edited by jmbooth2000
@jmbooth2000 You need two things.
- Create four saved games states just after you have started the game and selected the number of players (i.e. pacman 1 player, pacman 2 player, galaga 1 player, and galaga 2 player). You will start retroarch with the saved state vice the rom thus bypassing the need to select the number of players.
- A variation on https://retropie.org.uk/forum/topic/17589/how-to-make-volume-up-and-volume-down-with-buttons/10
where instead of changing the volume your script should kill any existing retroarch instance, then restart retroarch with appropriate game state.
I'm pretty certain this should work. Please reply so I/others can know if this works.
@bengalsfan88 So I tried to take my advice and opened the input mapping interface, but it seems that the
Start (right)(for both players) are not map-able in the RGUI input configuration. Looking at the ROM driver source, I see they it may have some overlapping in the mapping (or I'm just reading the source wrong).
@barbudreadmon - do you know if the
Start (right)input is purposely assigned to the
Coinand it's hidden from the control mapping ? I've tried with the latest RA nighly (v0.2.97.44 9c55533) and I can only map
Start (left)in the RGUI - no matter which device type I choose. Rom is
20pacgal, not one of the clones.
barbudreadmon last edited by
@mitu The layout is unusual, so my algorythm fails mapping all buttons, i'm not too sure how i should deal with this special case, i guess i'll just map extra starts to the Retropad A buttons and let the final user remap as he want.
barbudreadmon last edited by
@mitu Now "Start (left)" is mapped to Retropad start, and "Start (right)" is mapped to Retropad A : https://github.com/libretro/fbalpha/commit/4adb2518645c782ff8d34afe8b9cc0828bc54e69
@barbudreadmon Thanks - I'll give it a shot to see how it works.
@barbudreadmon OK, so it seems to work. As long as I have enough credits (P1 and P2):
P1:Startstarts a 1P Ms Pac-Man
P1:Astarts a 1P Galaga
P2:Startstarts a 2P Galaga
P2:Astarts a 2P Ms Pac-Man
@bengalsfan88 can you give it a try ?-Just update
lr-fbalphafrom source to get the latest modifications added by @barbudreadmon and try using the mapping for Start/A on each player to get the various starting options in the ROM.
EDIT: Ms Pac-Man.
bengalsfan88 last edited by
I'm so sorry I haven't replied, I never checked back in until now because I was expecting to get an email when someone replied but it looks like my notification settings were just wrong. Thank you all so much for the help, I am trying your solution right now. I'll be sure to make a post when the project is complete and the cabinet is restored to her former glory!
I'll be sure to make a post when the project is complete and the cabinet is restored to her former glory!
I'd like to see that, thank you !