Please do not post a support request without first reading and following the advice in

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

  • 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 when you go into the joystick selection go into option 3 and change it. I had the same problem.

  • @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 try setting the player 2 snes controller as the second player in joystick selection.

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

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

  • @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 it's a fair request. I think I'll sacrifice some Pac'n'Pal sessions to sort it. :-)

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

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

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

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

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.