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

    Specific controllers for specific emulators - UDEV rules + indexes?

    Scheduled Pinned Locked Moved Help and Support
    8 Posts 4 Posters 2.2k 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.
    • S
      swd120
      last edited by

      I want to have the same controller always assigned to the same input address, and I want to do this with 8bitdo bluetooth controllers. The reason being - I want specific types of controllers to be player1/player2 in specific emulators - Easiest way I can think to accomplish it is to have static index for each controller, and then I can assign those indexes in an emulators config.

      ex:
      NES30 #1 => js0
      NES30 #2 => js1
      NES30 Pro #1 => js2
      NES 30 Pro #2 => js3

      then in PSX/N64 retroarch.cfg to use Pro controllers instead:
      input_player1_joypad_index = 2
      input_player2_joypad_index = 3

      However, I think I have a misunderstanding of how udev rules work for bluetooth devices. Here's what I've tried intially, but it doesnt seem to be working - the controllers just connect in whatever order. I assume my query is wrong? Is KERNEL=="js?" incorrect because its a bluetooth device?

      KERNEL=="js?", ATTRS{address}=="8e:f0:24:f3:9e:f3", NAME="input/js0"
      KERNEL=="js?", ATTRS{address}=="8e:f0:07:9a:9e:f3", NAME="input/js1"
      KERNEL=="js?", ATTRS{address}=="69:09:07:41:66:07", NAME="input/js2"
      KERNEL=="js?", ATTRS{address}=="69:09:f6:aC:66:07", NAME="input/js3"

      Also - maybe udev rules is the wrong path to achieve what I want?

      Any help appreciated!

      meleuM mediamogulM 2 Replies Last reply Reply Quote 0
      • meleuM
        meleu @swd120
        last edited by

        @swd120 If you do this way I think you'll have problems when using non-libretro emulators.

        Maybe you like to know it: http://github.com/meleu/RetroPie-joystick-selection

        This have the inconvenience to re-run the joystick selection when you want to change the controllers. But at least it's more user-friendly than manual edit the retroarch.cfg.

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        1 Reply Last reply Reply Quote 0
        • mediamogulM
          mediamogul Global Moderator @swd120
          last edited by mediamogul

          @swd120

          @meleu's controller selection utility is really the way to go. I've looked into doing what you want and have come up empty time and again. From what I did manage to find, it appears this was once an option at a system level a few years ago and was removed.

          RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

          1 Reply Last reply Reply Quote 1
          • S
            swd120
            last edited by

            I have the joystick selection app already - but its still not really user friendly... (IE: The wife cant just pick up a controller and use it)

            There has to be some way to achieve what I want - I'm totally fine if it only works for the lib-retro emulators for now. I can work on sorting out the other emulators afterwards...

            meleuM 1 Reply Last reply Reply Quote 0
            • meleuM
              meleu @swd120
              last edited by

              @swd120 I intend to add this functionality in my joystick selection utility (define controllers based on the chosen core). But unfortunately I can't predict a release date... I'll let you know when it's ready.

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              1 Reply Last reply Reply Quote 2
              • S
                swd120
                last edited by

                @meleu Awesome - that's great to hear!

                1 Reply Last reply Reply Quote 0
                • G
                  gogreenman
                  last edited by

                  This option is EXACTLY what I'm looking for!!
                  I have even thought about rewiring a n64 remote to be recognized as a keyboard input so I can map the keys as I want.
                  I have seen someone suggest using multiple SD cards to switch out kinda like switching games but be switching complete pie set up with each card having a set up for each kind of controller and with only that particular emulator and games on it.
                  Not sure if this would work but sounds promising.
                  I'm open to any suggestions.
                  Thanks to all
                  Long time lurker, first time poster.

                  meleuM 1 Reply Last reply Reply Quote 0
                  • meleuM
                    meleu @gogreenman
                    last edited by

                    @gogreenman the joystick-selection tool currently has the hability to configure input joysticks based on specific emulators (libretro cores). Check the link on my signature.

                    • Useful topics
                    • joystick-selection tool
                    • rpie-art tool
                    • achievements I made
                    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.