Here is a way to select joystick for players 1-4 (global or emu specific)
-
@Rion said in Here is a way to select input for RetroArch players 1-4:
Also when launching a game and pressing the "a" button using the run command so I can choose what controller is P1 & P2 and so on for that particular game/system?
the configuration is made launching the joystick selection tool in retropiemenu, but now it can be done for a particular system.
-
Hi @meleu . I was able to install & interact with the script via the Emulation Station GUI.
After executing for the first time, the controllers appeared to be set correctly but again once I started a game the "default" controllers went back to port 0 & 1. I went back to your script and it appeared to have reset the player index numbers.
This is the same thing that happens if I manually change the input_player1_joypad_index = "0" line in a systems retroarch.cfg file. Basically once I launch the game, the retroarch.cfg file appears to go back to default.
If all your script is doing is saving me the manual step of setting the joypad index in each retroarch.cfg file, then it appears my issue is that this file is reset to default on game launch.
Thoughts?
-
@mlengland It seems that you
config_save_on_exit
is on...
Are you used to use RGUI to configure RetroArch stuff? -
@mlengland said in Here is a way to select input for RetroArch players 1-4:
Hi @meleu . I was able to install & interact with the script via the Emulation Station GUI.
After executing for the first time, the controllers appeared to be set correctly but again once I started a game the "default" controllers went back to port 0 & 1. I went back to your script and it appeared to have reset the player index numbers.
This is the same thing that happens if I manually change the input_player1_joypad_index = "0" line in a systems retroarch.cfg file. Basically once I launch the game, the retroarch.cfg file appears to go back to default.
If all your script is doing is saving me the manual step of setting the joypad index in each retroarch.cfg file, then it appears my issue is that this file is reset to default on game launch.
Thoughts?
As a test I turned off global save on exit for RetroArch and then put the controller settings in again per your script. I just reset the system and then took a look at the SNES retroarch.cfg and it stuck!
So I booted Emulation Station. Launched a rom. And once again, the SNES controllers wouldn't work. Only the USB port 1 & 2 controllers were recognized.
I sudo nano the retroarch.cfg file and your script changes are still showing up. They are in fact sticking. But on game launch for some reason the emu always wants to use the controllers in port 0 & 1 even though the cfg file says otherwise.
So, now, I'm stumped...
EDIT: @meleu looks like we posted at the same time. Either, or. GUI or terminal. To turn off 'save on exit' I did that via terminal/command line in the ALL folder.
-
@mlengland
I think you messed up yourretroarch.cfg
files while using theconfig_save_on_exit
set to true...
If you really really wanna know whats happening I would suggest you to check where the#include
line is at your SNESretroarch.cfg
(for example). But if you want a fast solution, look if you have theretroarch.cfg.rp-dist
files in your systems directory and use it as theretroarch.cfg
(to "restore the factory settings"). -
@meleu ugh. For some reason the changes were happening after the #input line. I just manually moved them and all is working now!
Thank you so much for your help and awesome script.
-
@mlengland said in Here is a way to select input for RetroArch players 1-4:
@meleu ugh. For some reason the changes were happening after the #input line.
I think you mean
#include
...Recently the
runcommand.sh
was changed to always put the#include
line at the end of the file, as you can see in this thread: https://retropie.org.uk/forum/topic/3285/i-think-we-finally-have-a-solution-for-rgui-fans -
@meleu I did. Sorry phone typo. A million thanks. Seriously. This was driving me crazy.
-
I tested a little more and I'm satisfied (for a while). I've just merged the selectionbyname branch into the master.
I updated the first post of this thread talking about the new features and put some screenshots.Some guys who have shown interest and/or asked to be informed:
@chan , @Synopsis , @briankross , @swd120 , @ralph-Bing , @octubrq , @unibiggle , @lumberg , @white_gecko , @Rion , @mattrixk , @skrapps914 , @mediamogul -
This is fantastic! It really has been great watching this evolve. On a side note, work has been killing my free time as of late, but I haven't forgotten about our net play game. Until we can arrange a time, I'll be sharpening my Contra skills.
-
nm. ran it again and it worked
-
@edmaul69
I glad you get it running, but let me take a few notes about your original post.- I merged the selectionbyname branch into the master. In other other words, you don't have to use the
-b selectionbyname
option in the command line anymore, just
git clone https://github.com/meleu/RetroPie-joystick-selection
-
After install, there's no need to reboot the system. Only restart the emulationstation to see it in RetroPie menu.
-
when using the selection by name method (and only in this condition) this tool uses the
runcommand-onstart.sh
to set some configs, but it does nothing in the actual runcommand menu (that one where you can choose the emulator, launch netplay, etc.). [oh. It made me think that would be really cool if there was anruncommand-onmenu.sh
to be executed if the user select it from the runcommand menu. But I think it will not happen anytime soon.] -
the
joystick-selection.cfg
files are created on demand, and only when the selection by name method is active.
Cheers!
- I merged the selectionbyname branch into the master. In other other words, you don't have to use the
-
@meleu there wouldnt by some chance be a way that if the selected controller isnt detected that it would use the one detected is there? The ps 3 controller is the only reason i need this since it is always set as the last controller when wireless. When testing i had to turn on the ps3 controller to exit the game. Its fine if i have to just go into the joystick setup and change in advance. Just curious though. But thank you for this. Finally a way to use the ps3 controller on bluetooth. Both my pi 3's are built inside a console with their own controller ports wired up.
-
@edmaul69 said in Here is a way to select joystick for players 1-4 (global or emu specific):
if the selected controller isnt detected that it would use the one detected is there?
Sorry, I'm not sure what you mean...
When the selected controller isn't connected/detected, it uses the RetroArch defaults.
(...) When testing i had to turn on the ps3 controller to exit the game.
As far as I know the player1 is the only one that can use hotkeys (save state, reset the game, quit emulator, access RGUI, etc).
I didn't understand what exactly you need/want.
-
@meleu so for me it didnt use default retroarch setting. When i set the ps3 controller as the first controller it worked great. I rebooted with the ps3 controller turned off. Then i went into a game and the controls didnt work. I had to turn the ps3 controller on to do anything. I will test more thoroughly tomorrow
-
@edmaul69 said in Here is a way to select joystick for players 1-4 (global or emu specific):
@meleu so for me it didnt use default retroarch setting
Oh... If it's a bug, let's investigate it so I can fix it...
(...) I rebooted with the ps3 controller turned off. Then i went into a game and the controls didnt work.
Please, describe the complete scenario.
When you rebooted with the ps3 controllers turned off, how many other controllers were connected to your raspi?
-
@meleu so i have 2 controllers on 1 circuit. Its called "ultimate pc interface" or upci. It is inside my modified intellivision flashback. So i install the joystick selector and immidiedly set the ps3 controller wirelessly as first joystick since unlike normal bluetooth devices it is always the last controller. (Controller 3 for me) So i go into an emulator and test that the ps3 controller and works and exits the emulator. So then i turn the system off and i turn it back on after the ps3 controller shuts off. So then i go into an emulator and i have no controls (maybe i only tried to exit but i thought i tried other controls) and nothing. So i turn on the ps3 controller and use it to exit. I will test some more when i wake up.
-
@edmaul69
Oh! I think I know what's happening!
You didn't turn on the selection by name method. -
@meleu you sir are correct about that. I will try the name selection method and see how it goes.
-
@edmaul69 when using by-index method it works like a manual editing of the file. The only advantage is that you can see the index to joystick correspondence during the configuration process. But once it is finished, it puts only the index in the
retroarch.cfg
.
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.