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

    Joystick buttons not detected properly in SNES only

    Scheduled Pinned Locked Moved Help and Support
    joystickgamepadsnes9x2010configs
    16 Posts 2 Posters 1.1k 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.
    • L
      lproj @mitu
      last edited by mitu

      @mitu the only file in that directory is the following virtual-input.cfg:

      input_device = "virtual-input"
      input_driver = "udev"
      input_l_btn = "6"
      input_load_state_btn = "6"
      input_start_btn = "9"
      input_exit_emulator_btn = "9"
      input_down_axis = "+1"
      input_r_btn = "7"   
      input_save_state_btn = "7"
      input_right_axis = "+0"  
      input_state_slot_increase_axis = "+0"
      input_select_btn = "8"
      input_left_axis = "-0"
      input_state_slot_decrease_axis = "-0"
      input_l2_btn = "4"  
      input_up_axis = "-1"
      input_a_btn = "1"
      input_b_btn = "2"   
      input_reset_btn = "2"
      input_enable_hotkey_btn = "8"
      input_r2_btn = "5"
      input_x_btn = "0" 
      input_menu_toggle_btn = "0"
      input_y_btn = "3"
      

      jstest reports it as follows:

      Driver version is 2.1.0.
      Joystick (virtual-input) has 4 axes (X, Y, Rx, Ry)
      and 12 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6).
      Testing ... (interrupt to exit)
      Axes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:offAxes: 0: 0 1: 0 2: 0 3: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off

      all buttons and axes works fine

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

        The auto-configured file looks fine - there are no conflicts between buttons. The jstest output it's a bit ... dynamic to guess if the numbers coincide.
        Does this happen only on the SNES system - i.e. other systems work fine ?

        L 1 Reply Last reply Reply Quote 0
        • L
          lproj @mitu
          last edited by

          @mitu I only have SNES at the moment. Can you suggest another system to install and try? As I developed this virtual input device, I could debug the device in many ways before asking in this forum. I mentioned jstest and evtest because these are the tools everyone knows.

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

            @lproj Well, the NES is a simpler system - so you could try that. But as far as RetroArch is concerned, it should be the same thing - buttons. Can you re-do your button mapping in RetroArch and create a re-map for the core ? This way you can check if RA registers your buttons when mapping them.

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

              One idea that comes to mind - switch the input_driver in the .cfg file from udev to sdl2 and see if it makes a difference in-game.

              L 1 Reply Last reply Reply Quote 0
              • L
                lproj @mitu
                last edited by

                @mitu I switched the input_driver as you said, but nothing changed. I uninstalled RetroPie from the menu and installed the packages again, but now NO buttons are detected at all from within the game (ES still works fine).

                I am going to restart from scratch from a fresh rpi installation.

                1 Reply Last reply Reply Quote 0
                • L
                  lproj
                  last edited by

                  I reinstalled everything from scratch but still no luck. Not all the buttons work in the game, while they are ok in ES. :( Do you have any other ideas?

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

                    How exactly is your joystick built ? You didn't give any details about it - did you wire it to the GPIO, is it a custom USB connector, keyboard etc. ?

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      lproj @mitu
                      last edited by

                      It's a pure software-based udev/uinput device emulating the same buttons/axes as my real USB Dragon something Joystick. From the point of view of the events that it generates and that can be observed by e.g. jstest, this virtual device is no different from the real Joystick. These buttons/axes are controlled by the software based on some real events coming from another host in the LAN which is a PC with a USB Joystick plugged in. I am trying to entirely play games from within a browser where Retropie runs on an headless Rpi (with no display, no speakers, no keyboard, no real controller). But this probably another story, there is another post mentioning this.

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

                        Seems similar to https://github.com/RetroPie/RetroPie-Setup/issues/1936, which was followed by https://github.com/libretro/RetroArch/issues/4780, but without any real solution.
                        Since you're only using SNES right now, I assume you're using a Libretro core (lr-snes2010 maybe). Have you tried re-mapping the buttons in the RGUI (like I mentioned a few posts above) through in the Input menu ?
                        I guess a RetroArch log file (launch the game with verbose logging from the Runcommand launch menu, then get paste the contents of /dev/shm/runcommand.log on pastebin.com) wouldn't hurt, but I'm not sure what would we be looking at.

                        L 1 Reply Last reply Reply Quote 0
                        • L
                          lproj @mitu
                          last edited by lproj

                          @mitu As soon as I enter Retroarch GUI, the same problem occurs: I can only scroll up and down the menu, and press one button, but unfortunately the button required to enter the submenu to do the remapping is not detected.

                          This is the log:
                          https://pastebin.com/bEajtw5k

                          EDIT: I forgot to mention that I had also tried "nes" before reinstalling everything and I got the same problem.

                          1 Reply Last reply Reply Quote 0
                          • L
                            lproj
                            last edited by lproj

                            I found the problem (or just one solution atm). There is something that libretro does not like in the driver implementation. Now I can fully play the Super Mario in the PC browser and on Android Chrome in my smartphone.

                            Sorry for the noise and thanks for your time, but hopefully everyone will benefit from this once I have made a demo.

                            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.