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

    Zero Delay Encoder, USB Hub, Random /dev/input/js*

    Scheduled Pinned Locked Moved Help and Support
    usbudevencoderjs0xboxdrv
    31 Posts 6 Posters 6.5k 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.
    • mituM
      mitu Global Moderator @elarson
      last edited by

      @elarson said in Zero Delay Encoder, USB Hub, Random /dev/input/js*:

      The only problem I have now is that player 1 (red), when I hit the start button it, it exits the game

      That seems like a you've not set the hotkey for that controller and start maps to the exit hotkey. Post the .cfg auto-configuration file for that controller.

      E 2 Replies Last reply Reply Quote 0
      • E
        elarson @mitu
        last edited by elarson

        @mitu

        That's what I was thinking too. I compared it to my blue joystick, which works fine, and they're identical (other than input_device name). I wired each of the controller sets up to the encoders the same way, skipping spots if they didn't have a particular button. But blue and red have the same buttons.

        If I take out input_exit_emulator_btn, then it doesn't exit the emulator when I press red's start. But it also doesn't exit when I press both Select + Start. If I take it out of red's, but leave it in the others, it was exiting the emulator when I pressed Start on another controller (only tried one, not all of them)
        input_exit_emulator_btn = "7"

        input_device = "Joystick Red"
        input_driver = "udev"
        input_l_btn = "5"
        input_load_state_btn = "5"
        input_start_btn = "7"
        input_exit_emulator_btn = "7"
        input_down_axis = "+1"
        input_r_btn = "4"
        input_save_state_btn = "4"
        input_right_axis = "+0"
        input_state_slot_increase_axis = "+0"
        input_select_btn = "6"
        input_left_axis = "-0"
        input_state_slot_decrease_axis = "-0"
        input_up_axis = "-1"
        input_a_btn = "0"
        input_b_btn = "1"
        input_reset_btn = "1"
        input_enable_hotkey_btn = "6"
        input_x_btn = "2"
        input_menu_toggle_btn = "2"
        input_y_btn = "3"
        
        input_device = "Joystick Blue"
        input_driver = "udev"
        input_l_btn = "5"
        input_load_state_btn = "5"
        input_start_btn = "7"
        input_exit_emulator_btn = "7"
        input_down_axis = "+1"
        input_r_btn = "4"
        input_save_state_btn = "4"
        input_right_axis = "+0"
        input_state_slot_increase_axis = "+0"
        input_select_btn = "6"
        input_left_axis = "-0"
        input_state_slot_decrease_axis = "-0"
        input_up_axis = "-1"
        input_a_btn = "0"
        input_b_btn = "1"
        input_reset_btn = "1"
        input_enable_hotkey_btn = "6"
        input_x_btn = "2"
        input_menu_toggle_btn = "2"
        input_y_btn = "3"
        
        1 Reply Last reply Reply Quote 0
        • E
          elarson @mitu
          last edited by

          @mitu

          I may be able to live with it. I over did it with the buttons and can wire a dedicated exit button. I can wire the exit button to player one and modify the config files to not have an exit button.

          If you have any other suggestions, I'd be open. But otherwise, thank you for all your help with this!

          mituM 1 Reply Last reply Reply Quote 0
          • mituM
            mitu Global Moderator @elarson
            last edited by

            The mapping is ok, so Start+Select should exit - I don't know why it wouldn't work. P1 is the only one able to exit or toggle the menu - that's how RetroArch works - but there might be some confusion on the RA's part because of duplicate inputs from the original controller and the virtual (xboxdrv) one.

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              One idea - to hide the original controllers - is to change the permissions on the /dev/input/eventX files corresponding to the original controllers - removing the input group read/write permissions on those devices.
              That would work only if you start xboxdrv as root.

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

                @elarson
                Go with Xarcade's encoder. https://shop.xgaming.com/collections/arcade-parts/products/x-arcade-build-your-own-arcade-control-panel-kit
                It's a keyboard encoder and has a proper harness. $35 (for the 2018 model) and supports a full keyboard of keys which would give enough for 4 players as you can simply map up to 101 keys to movements. It's the same one used in their Tanksticks.

                But don't use the xarcade userdriver found here as that just converts it into a joystick instead of keyboard, but retroarch doesn't allow as many features with joypads as it does with keyboards so its pointless and de-features it. Plus you can default keyboard as the primary device and it won't get confused as "just another gamepad" and get out of order. I did one of my units with that encoder and it's the best encoder I've used.

                My second unit was with 2 ZD's and they work great normally.. its just when plugging in 2 additional gamepads... rpi gets confused suddenly one which is supposed to be index 0 and 1.

                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

                E 1 Reply Last reply Reply Quote 0
                • E
                  elarson @dsstrainer
                  last edited by

                  @dsstrainer

                  How can you hook up 101 inputs? There are only 54 (by my count) male connections, and 11 of those I assume are daisy-chained grounds.

                  1 Reply Last reply Reply Quote 0
                  • E
                    elarson @mitu
                    last edited by

                    @mitu

                    But the /dev/input/event* are random so I can't script it to disable those. I could probably do it for testing. Or if I was better a Linux...

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @elarson
                      last edited by

                      Here'a one-liner that will provide the event device from an joystick input device (here for /dev/input/js0):

                      readlink  -f /dev/input/by-path/`udevadm info /dev/input/js0 | grep ID_PATH= | awk -F= ' { print $2 }'`-event-joystick
                      

                      You can also check with cat /proc/bus/input/devices to see which event device is associated with a /dev/input/jsX device.

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jerrymrivera @mitu
                        last edited by

                        @mitu
                        Any Chance you can break this down.
                        i am new to this and setup 1 set of controls with no problem but when i plug in second it neither one works.
                        noticed that its showing as same.

                        mituM 1 Reply Last reply Reply Quote 0
                        • mituM
                          mitu Global Moderator @Jerrymrivera
                          last edited by

                          @jerrymrivera Please don't bump old forum posts.
                          Create a new topic and explain your problem, adding the relevant info about your setup, as explained in https://retropie.org.uk/forum/topic/3/read-this-first.

                          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.