• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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

Here is a way to select joystick for players 1-4 (global or emu specific)

Scheduled Pinned Locked Moved Help and Support
retroarchinputcontrollerjoystickjoypad index
154 Posts 28 Posters 133.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.
  • M
    mattrixk @meleu
    last edited by mattrixk 28 Jul 2017, 05:32

    @meleu Darn. Any ideas? Either what it might be, or how to test out what it might be?

    Edit: I was able to update retropie via the setup script without issue, so I should be connected to the net.

    My ES themes: MetaPixel | Spare | Io | Indent

    M 1 Reply Last reply 28 Jul 2017, 05:38 Reply Quote 0
    • M
      meleu @mattrixk
      last edited by 28 Jul 2017, 05:38

      @mattrixk
      Can you ping github.com?

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      M 2 Replies Last reply 28 Jul 2017, 05:44 Reply Quote 0
      • M
        mattrixk @meleu
        last edited by 28 Jul 2017, 05:44

        @meleu
        ping: unkown host github.com

        I had just followed https://www.modmypi.com/blog/how-to-give-your-raspberry-pi-a-static-ip-address-update to set up a static IP address. Maybe that has interfered with something...

        My ES themes: MetaPixel | Spare | Io | Indent

        1 Reply Last reply Reply Quote 0
        • M
          mattrixk @meleu
          last edited by 28 Jul 2017, 05:50

          @meleu That was the problem. I deleted the lines from /etc/dhcpcd.conf and I was able to install your script without a problem. Cheers.

          Also I'll point out, on your github page (and just a few posts above this) you have:
          curl https://raw.githubusercontent.com/meleu/RetroPie-joystick-selection/master/install.sh -o install.sh

          But in your update on the first post of this thread it just has:
          curl https://raw.githubusercontent.com/meleu/RetroPie-joystick-selection/master/install.sh

          My ES themes: MetaPixel | Spare | Io | Indent

          M 1 Reply Last reply 28 Jul 2017, 05:56 Reply Quote 1
          • M
            meleu @mattrixk
            last edited by 28 Jul 2017, 05:56

            @mattrixk You're right. Thanks!
            I've just fixed it in the OP too.

            • Useful topics
            • joystick-selection tool
            • rpie-art tool
            • achievements I made
            1 Reply Last reply Reply Quote 1
            • P
              PeriodicLogic @meleu
              last edited by 5 Nov 2017, 02:14

              @meleu said in Here is a way to select joystick for players 1-4 (global or emu specific):

              added the possibility to invoke the tool in runcommand menu and configure the joystick input for the system that is about to be launched (thanks BuZz for adding such a cool feature on runcommand).

              Are there any instructions on how to utilize the ability to put joystick selection on the "push A Button" menu when launching particular ROMs?

              I thought at one time I saw it on my installation (when I wasn't looking for it), but now I am looking for it and can't find it.

              I'm running RetroPie 4.3.3 and have updated the joystick selection add-on from source.

              Or have I misconstrued the bullet point above?

              Thanks in advance,
              Rob

              P 1 Reply Last reply 5 Nov 2017, 03:01 Reply Quote 0
              • P
                PeriodicLogic @PeriodicLogic
                last edited by 5 Nov 2017, 03:01

                @periodiclogic @meleu [Solved!]

                For some reason, my "/opt/retropie/configs/all/runcommand-menu" directly was named "/opt/retropie/configs/all/runcommand-menu." I deleted the erroneous period at the end of the name, and then updated joystick-selection from source.

                That appears to have automatically added the "select joystick.sh" command to the correct folder, and I should be all set now.

                1 Reply Last reply Reply Quote 1
                • K
                  KingBeetle
                  last edited by 18 Dec 2017, 03:12

                  Great tool! I messed around with config files for a good 20 minute with no luck before I stumbled across your tool. Made it a snap to reconfigure.

                  Thanks!

                  1 Reply Last reply Reply Quote 0
                  • P
                    partTimeNinja
                    last edited by 24 Dec 2017, 12:11

                    I see you can choose the order of 4 different "joysticks" but my question is a little different. I have one set of arcade controls plugged in through an ipac so it shows up as a keyboard, and then I have a BT dongle with a PS3 controller. I have it set as the arcade is P1 and PS3 is set for P2, but what if I want to change those on the fly?

                    I saw you can go launch a rom and then go into the menu, settings, input, and check what is bound to P1 or P2. I guess my question could be, can I set the keyboard as an autoconfig so it auto configs when I select it from the menu?

                    Sorry if that seems like rambling. Not sure the best way to word everything. Thanks!

                    1 Reply Last reply Reply Quote 0
                    • F
                      Furluge @meleu
                      last edited by 24 Mar 2019, 06:07

                      @meleu said in Here is a way to select joystick for players 1-4 (global or emu specific):

                      And now the install.sh creates a gamelist.xml entry for joystick_selection.sh. So there is no problem when the "PARSE GAMELISTS ONLY" is set to "ON".

                      Can anyone tell me exactly what this entry should say? A gamelist.xml entry wasn't created when I ran the install.sh

                      M 1 Reply Last reply 24 Mar 2019, 06:10 Reply Quote 0
                      • M
                        mitu Global Moderator @Furluge
                        last edited by 24 Mar 2019, 06:10

                        @Furluge It's called Joystick Selection.

                        N 1 Reply Last reply 20 Aug 2019, 13:18 Reply Quote 0
                        • N
                          nvr wrks 1st try @mitu
                          last edited by nvr wrks 1st try 20 Aug 2019, 13:18

                          @meleu So I know this topic is old but I was having a problem with joystick configuration and everyone says this is the thing to do but after going into the f4 menu and typing install.sh and it says I don't have it how do I go about download that or am I just doing something wrong, I'm sorry if this is really obvious I am painfully new.

                          M 1 Reply Last reply 20 Aug 2019, 16:10 Reply Quote 0
                          • M
                            meleu @nvr wrks 1st try
                            last edited by 20 Aug 2019, 16:10

                            @nvr-wrks-1st-try The first post of this thread has a section called "Installation" where you can see the instructions to install the tool.

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            N 2 Replies Last reply 21 Aug 2019, 00:47 Reply Quote 0
                            • N
                              nvr wrks 1st try @meleu
                              last edited by 21 Aug 2019, 00:47

                              @meleu I'm still having a problem where it says:

                              0curl: (6) Could not resolve host: raw.githubusercontent.com
                              
                              M 1 Reply Last reply 21 Aug 2019, 05:33 Reply Quote 0
                              • N
                                nvr wrks 1st try @meleu
                                last edited by 21 Aug 2019, 01:15

                                @meleu it is similar to the problem @mattrixk had

                                1 Reply Last reply Reply Quote 0
                                • M
                                  meleu @nvr wrks 1st try
                                  last edited by 21 Aug 2019, 05:33

                                  @nvr-wrks-1st-try said in Here is a way to select joystick for players 1-4 (global or emu specific):

                                  @meleu I'm still having a problem where it says:

                                  0curl: (6) Could not resolve host: raw.githubusercontent.com
                                  

                                  Looks like your raspi is offline. You should solve it first.

                                  • Useful topics
                                  • joystick-selection tool
                                  • rpie-art tool
                                  • achievements I made
                                  N 1 Reply Last reply 21 Aug 2019, 14:55 Reply Quote 0
                                  • N
                                    nvr wrks 1st try @meleu
                                    last edited by 21 Aug 2019, 14:55

                                    @meleu so I downloaded this packages because of a problem I was having where the two USB joysticks would be seen as one because they are identical setups but after successfully downloading and updating the package the problem persisted and the two joysticks did not separate even though on the joystick selector it was seen as two usb gamepads and I set one joystick for player one and the other as player 2. Any thoughts?

                                    1 Reply Last reply Reply Quote 0
                                    • K
                                      kenno7
                                      last edited by 21 Dec 2019, 15:10

                                      Hello, the "Joystick Selection" app has helped me out with swapping the default Player 1 / Player 2 of my Xin-mo dual arcade controller. It's great! :) However, the issue I am having is that if I don't have the Xin-mo gamepad plugged in and am trying to use my PS3 controller instead, it works through emulationstation menus but when I launch a retorarch emulator it does not register as Player 1 / does nothing even though it is the only gamepad plugged in! Is there a way to still set Player 1 / Player 2 if the Xin-mo is plugged in but if not plugged in to then just use whatever gamepad is available for Player 1 / Player 2? Or what are my other options besides "Joystick Selection" to get this to work? Thanks in advance to the Retropie community, you've been quite helpful so far throughout my Retropie project :)

                                      1 Reply Last reply Reply Quote 0
                                      • D
                                        derebo
                                        last edited by 4 Apr 2020, 14:03

                                        Sorry, I was looking for a solution such as this one to managing multiple controllers. So big thanks to @meleu !
                                        How come it is not part of RetroPie by default yet? Or I am unable to locate it in Retro-Pie Setup Script.

                                        Regards,

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          derebo
                                          last edited by derebo 30 Apr 2020, 15:35

                                          @meleu I have tested it and I must say it works perfect with my SNES Compatible USB controller and PS3 Compatible Wirless controller. So congratulations!

                                          However, I am having a hard time trying to get Retropie and/or joystick-selection to allow to change the order when I am using my controllers remapped to be able to play computer system videogames such as MSX in which physical keys (characters and/or numbers) in a keyboard must be pressed to gameplay to start eg. 1 Redefine keys; 2 Joystick; 3 Keyboard; SPACE Start...

                                          For such remapping, I have followed the guide Universal Controller Calibration & Mapping Using xboxdrv. With the support of @mitu in topic how to configure PS3 Compatible wireless controller? (Universal Controller xboxdrv) I have been able to get my PS3 controller detected by RetroPie. I have managed to get my SNES controller detected as well:

                                          pi@retropie:~ $ evtest 
                                          No device specified, trying to scan all of /dev/input/event*
                                          Not running as root, no devices may be available.
                                          Available devices:
                                          /dev/input/event0:	usb gamepad           
                                          /dev/input/event1:	VIRTUAL-SNES2XBOX-CONTROLLER - Keyboard Emulation
                                          /dev/input/event2:	VIRTUAL-SNES2XBOX-CONTROLLER
                                          Select the device event number [0-2]: ^C
                                          

                                          Retropie detects event0 and event2. However, even though joystick-selection allows changing the joystick order - I would need VIRTUAL-SNES2XBOX-CONTROLLER configured in port #0 -

                                          Retropie > Configuration > Joystick selection > Selection by name OFF
                                          System-specific joystick selection (MSX)
                                          1 UNSET
                                          2 UNSET
                                          3 UNSET
                                          4 UNSET
                                          Available are:
                                          0 usb gamepad #1
                                          1 VIRTUAL-SNES2XBOX-CONTROLLER

                                          So VIRTUAL-SNES2XBOX-CONTROLLER is set to 1. 2,3,4 are left UNSET

                                          SNES Compatible controller can navigate EmulationStation and Retroarch. When entering RetroPie > Retroarch...
                                          usb gampead configured in port #0
                                          VIRTUAL-SNES2XBOX-CONTROLLER configured in port #1

                                          Retroarch > Settings > Input >
                                          Port 1 Binds VIRTUAL-SNES2XBOX-CONTROLLER
                                          Port 2 Binds usb gamepad

                                          Entering MSX videogame shows text boxes at the botton left of the screen...

                                          usb gampead configured in port #0
                                          VIRTUAL-SNES2XBOX-CONTROLLER configured in port #1

                                          Controller is irresponsive. However, Select+Start (exit emulator) works at least and I can return to EmulationStation.

                                          Controller is configured at system start-up:

                                          pi@retropie:~ $ cat /etc/rc.local 
                                          sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv \
                                                  --evdev /dev/input/by-id/usb-0810_usb_gamepad-event-joystick \
                                                  --silent \
                                                  --detach-kernel-driver \
                                                  --force-feedback \
                                                  --deadzone-trigger 15% \
                                                  --deadzone 4000 \
                                                  --device-name "VIRTUAL-SNES2XBOX-CONTROLLER" \
                                                  --evdev-absmap ABS_X=dpad_x,ABS_Y=dpad_y \
                                                  --evdev-keymap BTN_THUMB=a,BTN_THUMB2=b,BTN_TRIGGER=x,BTN_WEST=y \
                                                  --evdev-keymap BTN_BASE3=back,BTN_BASE4=start \
                                                  --evdev-keymap BTN_TOP2=lb,BTN_PINKIE=rb \
                                                  --dpad-only \
                                                  --ui-axismap lt=void,rt=void \
                                                  --ui-buttonmap y=KEY_SPACE \
                                          	--ui-buttonmap lb=void,rb=KEY_0 \
                                          	&
                                          
                                          exit 0
                                          

                                          Truly, I do not know what the issue may be, but pressing Y button on SNES controller should be understood as pressing SPACE on a physical keyboard and so start gameplay.

                                          Since Retroarch shows
                                          usb gampead configured in port #0
                                          VIRTUAL-SNES2XBOX-CONTROLLER configured in port #1

                                          May it be that it is not correctly detecting VIRTUAL-SNES2XBOX-CONTROLLER for Player1 as I would expect?

                                          Thank you indeed for your attention.

                                          Edit: forgot to add:

                                          pi@retropie:~ $ sudo cat /opt/retropie/configs/msx/retroarch.cfg
                                          # Settings made here will only override settings in the global retroarch.cfg if placed above the #include line
                                          
                                          input_remapping_directory = "/opt/retropie/configs/msx/"
                                          
                                          input_player1_joypad_index = "1"
                                          
                                          #include "/opt/retropie/configs/all/retroarch.cfg"
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • V vwgolfman referenced this topic on 1 Dec 2021, 01:40
                                          • 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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received