Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › Configuring 2-player controls from a single custom USB controller › Reply To: Configuring 2-player controls from a single custom USB controller
[quote=17554]Thanks trimmtrabb. I’ve done some more tweaking and still can’t get player 2 controls to work. The file you mentioned (/opt/retropie/configs/all/retroarch.cfg) seems to only specify the keyboard controls. Then it has these two lines to fetch the configs for my Xin-Mo controller:
input_autodetect_enable = “true”
joypad_autoconfig_dir = “/opt/retropie/emulators/RetroArch/configs/”
I’ve looked in that folder and specifically found the Xin-Mo config which I can edit to my heart’s content. What I’m finding confusing is there seems to be three separate places where I could potentially put the code for player 2. Also I’m not sure whether I need to specify the input_player2_joypad_index, the input_device or the input_driver. I’ve tried putting my player 2 code in all these places to no avail:
/opt/retropie/configs/all/retroarch.cfg
/opt/retropie/emulators/RetroArch/retroarch.cfg
/opt/retropie/emulators/RetroArch/configs/Xin-MoXin-MoDualArcade.cfg
In the interest of completeness here’s the code I’ve been trying:
input_player2_b_axis = “-2″
input_player2_y_btn = “18″
input_player2_select_btn = “19″
input_player2_start_axis = “+3″
input_player2_up_btn = “12″
input_player2_down_btn = “13″
input_player2_left_btn = “11″
input_player2_right_btn = “14″
input_player2_a_axis = “+2″
input_player2_x_axis = “-3″
These inputs are definitely correct as I’ve successfully used them to control player one as a test that everything was working. No dice for player two though.
What am I doing wrong??
[/quote]
Run the joypad config:
sudo chown pi /opt/retropie/configs/all/retroarch.cfg cd /opt/retropie/emulators/RetroArch/installdir/bin sudo ./retroarch-joyconfig -j 0 >> /opt/retropie/configs/all/retroarch.cfg
(should be -j 0, try -j 1 if it doesn’t work)
Then edit retroarch.cfg in configs/all/ and copy player 1 controls but change 1 to 2. Then you need to specify which device player 2 uses, add this above p2 controls:
input_player2_joypad_index =
(should be 1)
To list the registered joystick devices with: ls /dev/input