One Keyboard for two players -> key mapping problems
RetroPie V4.4 on a RaspberryPie 3 using a keyboard to play game with two players.
The mapping for player 1 works like a charm in mame. The mapping for player 2 is totally messed up in mame. All works fine if I call mame directly and not via the lib.
For some reason Retroarch seems to translate the player 2 buttons wrongly. I set up everything in /opt/retropie/configs/all/retroarch.cfg
When I hit button 1 on player 2 it seems like it does two events at the same time and the up/down/left/right doesn't react at all.
Is this not possible anymore with the newer RetroPie versions? Can I only use 2 player mode with usb controllers?
Any suggestions where to look and fix?
Have you tried using
TABafter starting the emulator and map your keyboard through the MAME menu ?
Please add more info about your system - https://retropie.org.uk/forum/topic/3/read-this-first, especially what devices you have connected and what emulator are you using.
@mitu technically I have the adafruit driver converting my arcade buttons and joysticks to a keyboard. For testing I also use a regular usb keyboard attached. As mentioned, this works all fine if I start the mame2003 manually. The settings in the mame itself are mapped as expected (default).
@mitu I think I am a step further. I had to specify these two variables in the retroarch.cfg so player 2 uses the keyboard too.
input_libretro_device_p1 = 3
input_libretro_device_p2 = 3
The Joysticks now work properly. Only the buttons have some strange behaviours. The mapping there still doesn't work. Any other ideas?
I found the problem. Mame seems to define a controller + a keyboard as possible inputs. Since my controller is a device that is mapped through RetroPad the event gets fired twice: once through the keyboard emulation and once through RetroPad. If the mapping is even different in the retroarch.cfg in can cause some strange events overlapping each other.
Solution: I changed the MAME input configuration to only receive one input (RetroPad). That solved it :)