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

    "retroarch-joyconfig " tool

    Scheduled Pinned Locked Moved Help and Support
    7 Posts 4 Posters 11.7k 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
      moloboo
      last edited by

      Hello, I have a little problem. My retropie project with 3.0 version started to freeze and I decided to reinstall the program using the new version. I have a usb two controller pad ( link ) that I configured with retroarch-joyconfig in the previous version but now I'm not able to find this tool, where is it?...
      Thanks

      herb_fargusH 1 Reply Last reply Reply Quote 0
      • herb_fargusH
        herb_fargus administrators @moloboo
        last edited by herb_fargus

        @moloboo

        Retroarch Controller configurations are automatically generated when you configure your controllers for the first time in emulationstation so there should be no need for you to configure them manually for retroarch.

        It's been a while since last installed RetroPie so you can see this page here to get up to speed on the current installation procedure: https://github.com/retropie/retropie-setup/wiki/First-Installation

        For more controller config info and finding where retroarch joyconfig went:

        You can also learn about reconfiguring controls manually here on the wiki:

        https://github.com/retropie/retropie-setup/wiki/RetroArch-Configuration

        If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

        Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

        1 Reply Last reply Reply Quote 0
        • D
          dsstrainer
          last edited by dsstrainer

          Does anyone know if it is possible to alter these joyconfigs for specific player inputs only?
          For example, when the file is autogenerated with my gamepad "ShanWan Twin USB Joystick"
          I only want that gamepad to be used for player 3 when playing 3-4 player games. But I don't want it to be used for player 1 or 2 during normal 2 player games.

          So the auto config for my "retroarch-joyconfig/ShanWan Twin USB Joystick.cfg" is like this:

          input_device = "ShanWan Twin USB Joystick"
          input_driver = "udev"
          input_r_y_plus_axis = "+3"
          input_l3_btn = "13"
          input_r_x_minus_axis = "-2"
          input_l_btn = "6"
          input_load_state_btn = "6"
          input_start_btn = "11"
          input_exit_emulator_btn = "11"
          input_l_y_minus_axis = "-1"
          input_up_btn = "h0up"
          input_r_y_minus_axis = "-3"
          input_a_btn = "1"
          input_b_btn = "0"
          input_reset_btn = "0"
          input_down_btn = "h0down"
          input_l_x_plus_axis = "+0"
          input_l_y_plus_axis = "+1"
          input_r_btn = "7"
          input_save_state_btn = "7"
          input_r2_btn = "9"
          input_r3_btn = "14"
          

          But could I set it with the player3 value in the name?

          input_player3_device = "ShanWan Twin USB Joystick"
          input_player3_driver = "udev"
          input_player3_r_y_plus_axis = "+3"
          input_player3_l3_btn = "13"
          input_player3_r_x_minus_axis = "-2"
          input_player3_l_btn = "6"
          input_player3_load_state_btn = "6"
          input_player3_start_btn = "11"
          input_player3_exit_emulator_btn = "11"
          input_player3_l_y_minus_axis = "-1"
          input_player3_up_btn = "h0up"
          input_player3_r_y_minus_axis = "-3"
          input_player3_a_btn = "1"
          input_player3_b_btn = "0"
          input_player3_reset_btn = "0"
          input_player3_down_btn = "h0down"
          input_player3_l_x_plus_axis = "+0"
          input_player3_l_y_plus_axis = "+1"
          input_player3_r_btn = "7"
          input_player3_save_state_btn = "7"
          input_player3_r2_btn = "9"
          input_player3_r3_btn = "14"
          

          I tried and while it did stop overriding my player 1 on normal games.. it also didn't work for player 3 in the 3-4 player games.

          Basically I always want my keyboard encoder to be player 1 and 2
          and always want the joypads to be player 3 and 4.
          But since the retroarch-joyconfigs are automatically set to override ALL inputs by default.. I figured if I forced it to player3 and player4 entries only, that should work to prevent that.

          RetroPie v4.2 • RPi3 Model B • 5.1V 2.5A PSU • 8GB SanDisk class 10 microSD • 16GB External USB Thumb Drive
          Roms, images and configs stored in USB and symlinked from normal microsd location
          Xarcade Keyboard encoder + Zero Delay Joystick encoder

          ClydeC 1 Reply Last reply Reply Quote 0
          • ClydeC
            Clyde @dsstrainer
            last edited by

            @dsstrainer This script can assign joysticks to players by usb index or joystick name. Does this help?

            1 Reply Last reply Reply Quote 0
            • D
              dsstrainer
              last edited by dsstrainer

              @clyde said in "retroarch-joyconfig " tool:

              @dsstrainer This script can assign joysticks to players by usb index or joystick name. Does this help?

              Yea I've seen that too and was going to try that but wasn't sure if that would work for me.
              Ultimately I would like the following:

              Mame retroarch.cfg:
              Player 1 and 2 use the joypanel (using the xarcade keyboard encoder) are the first 2 players (plugged into usb port 0)
              Player 3 and 4 get assigned to whatever gamepad is plugged into port 2 and 3 (only needed for 4 player games of course)

              PSX and N64 cfgs
              Player 1 and 2 can use the gamepads or joypanel
              Player 3 and 4 not needed

              If I use that script to assign indexes to certain players at the system level, I don't think it will allow overriding for psx and n64.
              So ultimately I think I want to remove the retroarch-joypanel config overrides and instead put generic player3 and player4 controls in the main retroarch for mame
              input_player3_joypad_index = "2"
              input_player4_joypad_index = "3"

              and alternate ones for the psx and n64 configs using the settings for
              input_player1_joypad_index = "0"
              input_player2_joypad_index = "1"

              This way no matter what brand of gamepad I use, the generic mapping will be for any ps2 style gamepad and should just work. Similar to what I have for my snes gamepad, but with analog values filled in

              # 3 and 4 player USB SNES gamepad
              input_device_p3 = "0"
              input_player3_joypad_index = "2"
              input_libretro_device_p3 = "1"
              input_player3_analog_dpad_mode = "0"
              input_device_p4 = "0"
              input_player4_joypad_index = "3"
              input_libretro_device_p4 = "1"
              input_player4_analog_dpad_mode = "0"
              
              input_player3_b = "nul"
              input_player3_b_btn = "1"
              input_player3_b_axis = "nul"
              input_player3_y = "nul"
              input_player3_y_btn = "3"
              input_player3_y_axis = "nul"
              input_player3_select = "nul"
              input_player3_select_btn = "6"
              input_player3_select_axis = "nul"
              input_player3_start = "nul"
              input_player3_start_btn = "7"
              input_player3_start_axis = "nul"
              input_player3_up = "nul"
              input_player3_up_btn = "nul"
              input_player3_up_axis = "-1"
              input_player3_down = "nul"
              input_player3_down_btn = "nul"
              input_player3_down_axis = "+1"
              input_player3_left = "nul"
              input_player3_left_btn = "nul"
              input_player3_left_axis = "-0"
              input_player3_right = "nul"
              input_player3_right_btn = "nul"
              input_player3_right_axis = "+0"
              input_player3_a = "nul"
              input_player3_a_btn = "0"
              input_player3_a_axis = "nul"
              input_player3_x = "nul"
              input_player3_x_btn = "2"
              input_player3_x_axis = "nul"
              input_player3_l = "nul"
              input_player3_l_btn = "4"
              input_player3_l_axis = "nul"
              input_player3_r = "nul"
              input_player3_r_btn = "5"
              input_player3_r_axis = "nul"
              input_player3_l2 = "nul"
              input_player3_l2_btn = "nul"
              input_player3_l2_axis = "nul"
              input_player3_r2 = "nul"
              input_player3_r2_btn = "nul"
              input_player3_r2_axis = "nul"
              input_player3_l3 = "nul"
              input_player3_l3_btn = "nul"
              input_player3_l3_axis = "nul"
              input_player3_r3 = "nul"
              input_player3_r3_btn = "nul"
              input_player3_r3_axis = "nul"
              input_player3_l_x_plus = "nul"
              input_player3_l_x_plus_btn = "nul"
              input_player3_l_x_plus_axis = "nul"
              input_player3_l_x_minus = "nul"
              input_player3_l_x_minus_btn = "nul"
              input_player3_l_x_minus_axis = "nul"
              input_player3_l_y_plus = "nul"
              input_player3_l_y_plus_btn = "nul"
              input_player3_l_y_plus_axis = "nul"
              input_player3_l_y_minus = "nul"
              input_player3_l_y_minus_btn = "nul"
              input_player3_l_y_minus_axis = "nul"
              input_player3_r_x_plus = "nul"
              input_player3_r_x_plus_btn = "nul"
              input_player3_r_x_plus_axis = "nul"
              input_player3_r_x_minus = "nul"
              input_player3_r_x_minus_btn = "nul"
              input_player3_r_x_minus_axis = "nul"
              input_player3_r_y_plus = "nul"
              input_player3_r_y_plus_btn = "nul"
              input_player3_r_y_plus_axis = "nul"
              input_player3_r_y_minus = "nul"
              input_player3_r_y_minus_btn = "nul"
              input_player3_r_y_minus_axis = "nul"
              input_player3_turbo = "nul"
              input_player3_turbo_btn = "nul"
              input_player3_turbo_axis = "nul"
              input_player4_b = "nul"
              input_player4_b_btn = "1"
              input_player4_b_axis = "nul"
              input_player4_y = "nul"
              input_player4_y_btn = "3"
              input_player4_y_axis = "nul"
              input_player4_select = "nul"
              input_player4_select_btn = "6"
              input_player4_select_axis = "nul"
              input_player4_start = "nul"
              input_player4_start_btn = "7"
              input_player4_start_axis = "nul"
              input_player4_up = "nul"
              input_player4_up_btn = "nul"
              input_player4_up_axis = "-1"
              input_player4_down = "nul"
              input_player4_down_btn = "nul"
              input_player4_down_axis = "+1"
              input_player4_left = "nul"
              input_player4_left_btn = "nul"
              input_player4_left_axis = "-0"
              input_player4_right = "nul"
              input_player4_right_btn = "nul"
              input_player4_right_axis = "+0"
              input_player4_a = "nul"
              input_player4_a_btn = "0"
              input_player4_a_axis = "nul"
              input_player4_x = "nul"
              input_player4_x_btn = "2"
              input_player4_x_axis = "nul"
              input_player4_l = "nul"
              input_player4_l_btn = "4"
              input_player4_l_axis = "nul"
              input_player4_r = "nul"
              input_player4_r_btn = "5"
              input_player4_r_axis = "nul"
              input_player4_l2 = "nul"
              input_player4_l2_btn = "nul"
              input_player4_l2_axis = "nul"
              input_player4_r2 = "nul"
              input_player4_r2_btn = "nul"
              input_player4_r2_axis = "nul"
              input_player4_l3 = "nul"
              input_player4_l3_btn = "nul"
              input_player4_l3_axis = "nul"
              input_player4_r3 = "nul"
              input_player4_r3_btn = "nul"
              input_player4_r3_axis = "nul"
              input_player4_l_x_plus = "nul"
              input_player4_l_x_plus_btn = "nul"
              input_player4_l_x_plus_axis = "nul"
              input_player4_l_x_minus = "nul"
              input_player4_l_x_minus_btn = "nul"
              input_player4_l_x_minus_axis = "nul"
              input_player4_l_y_plus = "nul"
              input_player4_l_y_plus_btn = "nul"
              input_player4_l_y_plus_axis = "nul"
              input_player4_l_y_minus = "nul"
              input_player4_l_y_minus_btn = "nul"
              input_player4_l_y_minus_axis = "nul"
              input_player4_r_x_plus = "nul"
              input_player4_r_x_plus_btn = "nul"
              input_player4_r_x_plus_axis = "nul"
              input_player4_r_x_minus = "nul"
              input_player4_r_x_minus_btn = "nul"
              input_player4_r_x_minus_axis = "nul"
              input_player4_r_y_plus = "nul"
              input_player4_r_y_plus_btn = "nul"
              input_player4_r_y_plus_axis = "nul"
              input_player4_r_y_minus = "nul"
              input_player4_r_y_minus_btn = "nul"
              input_player4_r_y_minus_axis = "nul"
              input_player4_turbo = "nul"
              input_player4_turbo_btn = "nul"
              input_player4_turbo_axis = "nul"
              

              More testing to do.

              Thanks for the help!

              RetroPie v4.2 • RPi3 Model B • 5.1V 2.5A PSU • 8GB SanDisk class 10 microSD • 16GB External USB Thumb Drive
              Roms, images and configs stored in USB and symlinked from normal microsd location
              Xarcade Keyboard encoder + Zero Delay Joystick encoder

              ClydeC 1 Reply Last reply Reply Quote 0
              • ClydeC
                Clyde @dsstrainer
                last edited by

                @dsstrainer said in "retroarch-joyconfig " tool:

                If I use that script to assign indexes to certain players at the system level, I don't think it will allow overriding for psx and n64.

                It has a menu for global and system specific assignment. Maybe you should try it to know if it may be a simple solution for your endeavour, or at least part of it. Its installation is quick and easy, and it registers itself in the Retropie section of Emulation Station for easy access. Nothing to lose but a small amount of your time. :)

                Alas, apart from that, I'm not experienced in joystick configuration, because I didn't need to, yet. My two arcade joysticks are connected via two "DragonRise" usb zero delay encoders. For player 3+4, I have two identical wireless Wii U Pro gamepad clones which connect via a bluetooth dongle from Mayflash. The wired joysticks use the same keymap for all systems, as do the two wireless gamepads.

                1 Reply Last reply Reply Quote 0
                • D
                  dsstrainer
                  last edited by dsstrainer

                  So to update.. Yes it the retroarch-joyconfig idea I had above works :)
                  I finally got my head around the joystick stuff

                  Global style:
                  input_a_btn

                  Individual Player style
                  input _playerx _a_btn

                  So if you only want a certain brand of gamepad to take over for player 3 and 4, you'd edit the retroarch-joypad/mygamepad.cfg file and add the "_player3" bit there. You can add a _player4 copy as well. This will leave player1 and player2 alone and force the gamepads to 3 and 4.

                  Alternatively, if you don't want it to be limited to certain gamepads, you can remove the retroarch-joypad/ files and just put those same lines directly into the main retroarch.cfg file (or per system if you like) and have any gamepad of the same mapping style work. This is good for those generic chinese ps2 style gamepads with the usb dongle.

                  As herb_fargus shows above, follow the usb index and set the indexing in the retroarch.cfg with
                  input_player3_joypad_index = "2"
                  input_player4_joypad_index = "3"

                  Which doesn't necessarily follow the usb ports one for one... but those usb ports assign the default indexing on startup. For example, I have a dongle that supports 2 ps2 gamepads in one, but it still indexes them as 2 and 3 because they are loading up in the system as those indexes, regardless of actual physical usb port.

                  Thx all

                  RetroPie v4.2 • RPi3 Model B • 5.1V 2.5A PSU • 8GB SanDisk class 10 microSD • 16GB External USB Thumb Drive
                  Roms, images and configs stored in USB and symlinked from normal microsd location
                  Xarcade Keyboard encoder + Zero Delay Joystick encoder

                  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.