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

    How is joypad order determined?

    Scheduled Pinned Locked Moved Help and Support
    joypad config
    7 Posts 4 Posters 2.4k 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.
    • J
      jkezar
      last edited by

      Is joypad order (player 1 vs player 2) determined by the joypad vendor in udev or the USB port its plugged into? Any insight on how this works would be helpful. #joypad

      1 Reply Last reply Reply Quote 0
      • stoney66S
        stoney66
        last edited by

        @jkezar I don't know the true answer, but for me when using the same type of hardware it was based on the USB ports that they were plugged into.

        You should try the joystick selection tool (link below), this didn't work for me for hardware named the same (if I moved what was P1 from usb 0 to usb 1 that stick was now player 2 after reboot) but if your sticks are maybe different names then this tool could help.

        https://github.com/meleu/RetroPie-joystick-selection

        1 Reply Last reply Reply Quote 0
        • Solid OneS
          Solid One
          last edited by

          Firsly, Retroarch (and maybe EmulationStation too) has the hotplug functionality. This way, everytime a USB joystick is plugged in, Retroarch automatically detects and configures the plugged controller. Just like a console. In that case, the order is determined on a first-come, first-serve basis: the first plugged joypad is player 1, the second is player 2, and so on.

          However, if you've already plugged two controllers before opening Retroarch, then in that case, if I'm not mistaken, the order is determined by the joypad vendor (assuming it's the "friendly" name the controller has, when plugged in).

          In order to get a better experience, I recommend you to have the same controllers whenever possible. For SNES games, two SNES USB controllers from the same vendor. For Playstation games, a PS2 USB adapter and two PS2 controllers (this way, both controller will be treated as one, having the same vendor, thus automatically being ordered the right way).

          Last, but not least, keep in mind that applies only to Retroarch. Other external games / emulators may work differently. Two examples are ZDoom and Streets of Rage Remake.

          edmaul69E 1 Reply Last reply Reply Quote 0
          • edmaul69E
            edmaul69
            last edited by

            They are ordered by usb port. All usb ports have an order hierarchy. Top left is port 0. Bottom left is port1. Top right is port2. Bottom left is port3. You can use @meleu’s joystick selection to force specific controllers to specific player or systems.

            1 Reply Last reply Reply Quote 0
            • edmaul69E
              edmaul69 @Solid One
              last edited by

              @Solid-One it is not determined by vendor or order they were “plugged in” in retroarch. It is by which usb port it is in. If you are in emulationstation and a device was plugged into usb port 1, then you plug one into usb port0 even though emulationstation sees it by the order it was plugged in retroarch boots it by usb order.

              Solid OneS 1 Reply Last reply Reply Quote 0
              • Solid OneS
                Solid One @edmaul69
                last edited by Solid One

                @edmaul69 I haven't noticed how the usb port position affects the joypad order. That's news to me.

                However, I have a RPI2 with RetroPie and I use it for playing emulators. A few years ago, I've done the following steps:

                1. With my RPI turned off, I've plugged a PS2 USB adapter with two controllers (just for curiosity, the vendor name starts with "Twin USB Joystick...");
                2. Turned my RPI on, and waited for it to load EmulationStation;
                3. Opened Super Bomberman 5, a SNES game with multiplayer support up to 5 players (used Retroarch with lr-snes9x2010 core);
                4. After playing a bit with two players, a friend of mine arrived and joined us, so I simply plugged a third controller on another USB port, without having to close and reopen the emulator (in that case, the vendor name of the 3rd controller starts with "Retrolink...").

                The result: My PS2 controllers stayed as Player 1 and Player 2, and the third controller was automatically associated to Player 3. But at the same time, if I close and reopen the emulator, the third controller was associated to Player 1, and the PS2 USB to Player 2 and Player 3. However, I don't remember which USB port I've used in each controller, so there's the possibility my third controller was plugged in a USB port with smallest order than the other port with my PS2 USB adapter plugged.

                But there's one thing I could confirm from that test: the order of my PS2 controllers wasn't changed after plugging the third controller. They stayed the same, without the first controller suddenly controlling Player 3, and so on.

                edmaul69E 1 Reply Last reply Reply Quote 0
                • edmaul69E
                  edmaul69 @Solid One
                  last edited by

                  @Solid-One yes if you are already in retroarch systems the order wont change but when you exit and go back in it takes usb order as was the case in your situation.

                  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.