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

    autoconfig confusion

    Scheduled Pinned Locked Moved Help and Support
    controls setupjoystick
    8 Posts 2 Posters 743 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.
    • A
      AtomArne
      last edited by AtomArne

      Hey Lads,

      I have been troubleshootin on this for abit, and i need some help
      .

      I have two Microntek USB Joystick controllers, one for each player.

      For some reason the joysticks a messing with me, when i setup my gamepads correctly (Gamepad1 & 2), after a reboot of the retropie, one of the players "sticks/joypads" gets inverted.

      Here is the autoconfig from configs\all\retroarch\autoconfig:

      input_device = "Microntek USB Joystick "
      input_driver = "udev"
      input_enable_hotkey_btn = "3"
      input_l_btn = "2"
      input_load_state_btn = "2"
      input_up_axis = "-1"
      input_left_axis = "-0"
      input_state_slot_decrease_axis = "-0"
      input_select_btn = "8"
      input_select_btn_label = "Select"
      input_right_axis = "+0"
      input_state_slot_increase_axis = "+0"
      input_r_btn = "6"
      input_save_state_btn = "6"
      input_y_btn = "1"
      input_x_btn = "0"
      input_x_btn_label = "1"
      input_menu_toggle_btn = "0"
      input_down_axis = "+1"
      input_start_btn = "9"
      input_start_btn_label = "Start"
      input_exit_emulator_btn = "9"
      input_b_btn = "5"
      input_reset_btn = "5"
      input_a_btn = "4"

      As you can see the axis are clearly wrong. So player 1 is working ok, but player 2 is inverted. So i go into the "Configure input", and remap Gamepad 2 since the stick is inverted, volia, everything is fine.

      Here is the new file in autoconfig which is now updated correctly:

      input_device = "Microntek USB Joystick "
      input_driver = "udev"
      input_enable_hotkey_btn = "3"
      input_l_btn = "2"
      input_load_state_btn = "2"
      input_up_axis = "+1"
      input_left_axis = "+0"
      input_state_slot_decrease_axis = "+0"
      input_select_btn = "8"
      input_select_btn_label = "Select"
      input_right_axis = "-0"
      input_state_slot_increase_axis = "-0"
      input_r_btn = "6"
      input_save_state_btn = "6"
      input_y_btn = "0"
      input_x_btn = "1"
      input_menu_toggle_btn = "1"
      input_down_axis = "-1"
      input_start_btn = "9"
      input_start_btn_label = "Start"
      input_exit_emulator_btn = "9"
      input_b_btn = "5"
      input_reset_btn = "5"
      input_a_btn = "4"

      Reboot the pie..... and its apeshit again. So now playerone/gamepad1 is inverted, but the autoconfig is fine. Is this hardware or software related?

      Build:
      Pie 4
      RP Version: 4.8.2
      USB devices Microntek Zero Delay

      A 1 Reply Last reply Reply Quote 0
      • A
        AtomArne @AtomArne
        last edited by

        @AtomArne and, if i remap gamepad 1, it will now invert gamepad 2.

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

          This looks like the different wiring is between the 2 controllers. You should only have to configure one of the controllers and the configuration would apply to both inputs. Or maybe the wiring is ok - but the encoder messes up the inputs.

          A 2 Replies Last reply Reply Quote 0
          • A
            AtomArne @mitu
            last edited by AtomArne

            @mitu Thank you for the reply!

            So, i will doublecheck the wiring. But how should i troubleshoot this? Change one of the USB encoders?

            1 Reply Last reply Reply Quote 0
            • A
              AtomArne @mitu
              last edited by AtomArne

              @mitu my man.

              I just swapped out the wires from the joystick tot he USB controller, AND i swapped out the the USB controller with another. Same issue!
              I just tried with one USB encoder attached, its still doing weird stuff....

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

                Maybe the joystick orientation has affects the axis direction ?
                The easiest way to test how the joystick behaves is using jstest, from the command line (exit EmulationStation).
                To test P1 joystick:

                jstest /dev/input/js0
                

                and to test P2 joystick:

                jstest /dev/input/js1
                

                Move the joystick and see what the direction it's reported - should be the same for both.
                Interrupt the test by pressing Ctrl+C.

                A 2 Replies Last reply Reply Quote 0
                • A
                  AtomArne @mitu
                  last edited by AtomArne

                  @mitu Hey mitu,

                  OK so this is very interresting.

                  Tests from js0

                  Axes:
                  UP: -32767
                  DOWN: 32767
                  LEFT: -32767
                  RIGHT: 32767

                  Test from js1:

                  UP: 32767
                  DOWN: -32767
                  LEFT: 32767
                  RIGHT: -32767

                  As suspected, inverted.

                  So i have turned my joystick the wrong way when i mounted it in the machine? Are you sh.... me? :P

                  1 Reply Last reply Reply Quote 0
                  • A
                    AtomArne @mitu
                    last edited by

                    @mitu error 404 confirmed... jesus :)

                    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.