• 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

RetroPie-joystick-selection - One Controller As Both? Failover?

Scheduled Pinned Locked Moved Help and Support
controllersalternateadd-onscriptretroarch
16 Posts 3 Posters 6.8k 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.
  • O
    obsidianspider
    last edited by 16 Nov 2016, 14:29

    I tried using @meleu's RetroPie-joystick-selection script to allow me to set up an alternate controller to use as Player 1 for MAME (arcade). What I found was that if I only set player 1 to be my "alternate" controller, it ended up controlling both Player 1 and Player 2 inputs. Do I have to explicitly tell it to use the "regular player 1" controller to be player 2?

    Also, and this is why I really was looking into the script in the first place: Can the script handle failover if the specified controller is not connected?

    The reason I ask is this: I'm looking to build an arcade stick for use with MAME, but if I don't have the arcade stick connected, I'd like to have it default back to my Raphnet adapter for use with Super Famicom controllers. In my testing it seems like if the specified controller is not plugged in, you just get nothing, not defaulting to whatever controller is actually plugged in.

    📷 @obsidianspider

    E 1 Reply Last reply 16 Nov 2016, 15:42 Reply Quote 1
    • E
      edmaul69 @obsidianspider
      last edited by 16 Nov 2016, 15:42

      @obsidianspider when you go into the joystick selection go into option 3 and change it. I had the same problem.

      O 1 Reply Last reply 16 Nov 2016, 15:52 Reply Quote 0
      • O
        obsidianspider @edmaul69
        last edited by 16 Nov 2016, 15:52

        @edmaul69 Hmm, it still seems to be not quite what I want. Turning on "option 3" did help with failover, but I'm still seeing the "specific" controller doing both player 1 and 2 simultaneously.

        📷 @obsidianspider

        E 1 Reply Last reply 16 Nov 2016, 15:56 Reply Quote 0
        • E
          edmaul69 @obsidianspider
          last edited by 16 Nov 2016, 15:56

          @obsidianspider try setting the player 2 snes controller as the second player in joystick selection.

          O 1 Reply Last reply 16 Nov 2016, 15:58 Reply Quote 0
          • O
            obsidianspider @edmaul69
            last edited by 16 Nov 2016, 15:58

            @edmaul69 OK, so I can get rid of the "both players" problem if I specifically set player 1 (preferred) and player 2 (regular) controllers. But, if I am in emulationstation, and unplug the "preferred" controller for player 1, the "regular" controller is now doing both players, because it's now the retroarch default, and I told the config program to use it for player 2.

            I understand that if a disconnected controller is there the system is going to use the retroarch default, but it's almost as if there needs to be a way to say "don't also use it for player 2 if you're defaulting to player 1"

            📷 @obsidianspider

            E M 2 Replies Last reply 16 Nov 2016, 17:15 Reply Quote 1
            • E
              edmaul69 @obsidianspider
              last edited by edmaul69 16 Nov 2016, 17:15

              @obsidianspider is your joystick recognized as two controllers? If not do it the old fashion way. Unset everything in joystick selection. Your usb port for the joystick should be in usb port 0 and the 4nes4snes should be in a different usb port. The controller in port 0 will take precedence over ports 1-3 and port 1 takes precedence over ports 2-3.....

              O 1 Reply Last reply 16 Nov 2016, 17:57 Reply Quote 0
              • O
                obsidianspider @edmaul69
                last edited by 16 Nov 2016, 17:57

                @edmaul69 Yeah, it's doing input for both controllers if the controller that was set to player 1 is unplugged. I guess I'll have to mess around with it some more.

                📷 @obsidianspider

                1 Reply Last reply Reply Quote 0
                • M
                  meleu @obsidianspider
                  last edited by 16 Nov 2016, 21:59

                  @obsidianspider said in RetroPie-joystick-selection - One Controller As Both? Failover?:

                  I understand that if a disconnected controller is there the system is going to use the retroarch default, but it's almost as if there needs to be a way to say "don't also use it for player 2 if you're defaulting to player 1"

                  I got what you're saying. I'll try to take a look into this issue when I have enough time. ;-)

                  • Useful topics
                  • joystick-selection tool
                  • rpie-art tool
                  • achievements I made
                  O 1 Reply Last reply 16 Nov 2016, 22:06 Reply Quote 1
                  • O
                    obsidianspider @meleu
                    last edited by 16 Nov 2016, 22:06

                    @meleu thanks! I wasn't sure if I was making sense. Hopefully what I was asking is a reasonable thing for it to do.

                    📷 @obsidianspider

                    M 2 Replies Last reply 16 Nov 2016, 22:32 Reply Quote 0
                    • M
                      meleu @obsidianspider
                      last edited by 16 Nov 2016, 22:32

                      @obsidianspider it's a fair request. I think I'll sacrifice some Pac'n'Pal sessions to sort it. :-)

                      • Useful topics
                      • joystick-selection tool
                      • rpie-art tool
                      • achievements I made
                      1 Reply Last reply Reply Quote 1
                      • M
                        meleu @obsidianspider
                        last edited by 17 Nov 2016, 03:01

                        @obsidianspider I tried to sort it today but the solutions I found would bring an unwanted complexity to the joystick-selection scripts. I'm not sure if I want to go this way...

                        But I have a workaround that will solve your issue for a while. When you have the "one controller as both" issue, invoke RGUI and

                        Main Menu -> Settings -> Input -> Input User 2 Binds -> User 2 Device Index

                        With the cursor on User 2 Device Index press right until it says Disabled. If the Save Config on Exit is turned off (the default on RetroPie) this change won't persist between RetroArch sessions.

                        Is it enough for you?

                        • Useful topics
                        • joystick-selection tool
                        • rpie-art tool
                        • achievements I made
                        O 1 Reply Last reply 17 Nov 2016, 11:55 Reply Quote 1
                        • O
                          obsidianspider @meleu
                          last edited by 17 Nov 2016, 11:55

                          @meleu Thank you so much for looking into it. That workaround does work for a temporary fix. Also, thank you for writing the controller selection utility.

                          📷 @obsidianspider

                          M 1 Reply Last reply 17 Nov 2016, 14:13 Reply Quote 1
                          • M
                            meleu @obsidianspider
                            last edited by meleu 17 Nov 2016, 14:13

                            @obsidianspider
                            You're welcome.

                            Let me share some thoughts about the problems I faced when thinking on a solution for it. I think I'm being a little verbose here, but I know you are a curious guy that likes to know how stuff works. And maybe with a client feedback we can find a satisfactory solution. :)

                            Let's consider the following scenario for our analysis:

                            index = joystick
                            ----------------
                              0   =  joyA
                              1   =  joyB
                            

                            If the user wants to use the joyB for player1 and let the player2 unset, this is what happens:

                            player  =      index      = joystick
                            ------------------------------------
                            player1 =        1        = joyB
                            player2 = *defaults to 1* = joyB
                            

                            And this is what I think that is happening to you.

                            This is an unwanted behavior, but the solutions I'm thinking can bring another unwanted behavior.

                            Example: If the script automatically disables the player2 when this kind of conflict happens, this disabling will persist. And then when I change the player1 from joyB to another joystick, player2 won't recover its default joystick (joyB).

                            I could make this recovering happen using runcommand-onend.sh, but there's no guarantee that the onend script will execute 100% of the time (e.g.: unclean runcommand shutdown). And this results in the script changing configs with no user consent... This is the unwanted complexity/behavior I'm talking about.

                            I think I'll go with this solution:

                            • Add an option to disable player2-4 (disabling player1 is not a good idea).

                            • After finishing the joystick selection for a system (or the global), the script will alert the user about the possible conflicts.

                            • If the user don't want such conflict it needs to choose what to do itself. On our example the user could disable the player2. And this will be a conscious change.

                            What do you think about this approach?

                            • Useful topics
                            • joystick-selection tool
                            • rpie-art tool
                            • achievements I made
                            O 1 Reply Last reply 17 Nov 2016, 20:26 Reply Quote 1
                            • O
                              obsidianspider @meleu
                              last edited by 17 Nov 2016, 20:26

                              @meleu Having it as something that the player is alerted to and gives them the option to accept is a great way to handle it. Thanks again for looking into this. I wasn't trying to give you more work!

                              📷 @obsidianspider

                              M 1 Reply Last reply 21 Mar 2017, 19:01 Reply Quote 1
                              • M
                                meleu @obsidianspider
                                last edited by 21 Mar 2017, 19:01

                                @obsidianspider after 4 months I've finnally took a look at it... :)
                                I've added an option to disable player2-4 (disabling player1 is not a good idea).
                                talked about it here.

                                Thanks for the feedback.

                                • Useful topics
                                • joystick-selection tool
                                • rpie-art tool
                                • achievements I made
                                O 1 Reply Last reply 21 Mar 2017, 19:05 Reply Quote 1
                                • O
                                  obsidianspider @meleu
                                  last edited by 21 Mar 2017, 19:05

                                  @meleu I'll have to give it a try some time! Thanks for looking into it.

                                  📷 @obsidianspider

                                  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.

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