RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    One Keyboard for two players -> key mapping problems

    Scheduled Pinned Locked Moved Help and Support
    keyboard mappin2 player setupmame2003mapping keys
    5 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • schmiddymanS
      schmiddyman
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Have you tried using TAB after 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.

        schmiddymanS 1 Reply Last reply Reply Quote 0
        • schmiddymanS
          schmiddyman @mitu
          last edited by

          @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).

          schmiddymanS 1 Reply Last reply Reply Quote 0
          • schmiddymanS
            schmiddyman @schmiddyman
            last edited by

            @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?

            schmiddymanS 1 Reply Last reply Reply Quote 0
            • schmiddymanS
              schmiddyman @schmiddyman
              last edited by

              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 :)

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

              Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.