• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
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.
  • M
    mitu Global Moderator @lproj
    last edited by 26 Feb 2019, 05:00

    @lproj The es_input.cfg is only used by Emulationstation, not by emulators, so there might be some discrepancies. Can you please add more info about your system, as requested in https://retropie.org.uk/forum/topic/3/read-this-first ?
    My guess is that you enabled Save config on Exit in RetroArch and this has the tendency to mess up the controller configurations - you should use the Core/Game input re-mapping if you want to change your controller mappings in RetroArch.

    1 Reply Last reply Reply Quote 0
    • L
      lproj
      last edited by 26 Feb 2019, 16:05

      Hi, the system is Raspberry Pi 3 running the most recent version of retropie. It's a virtual Joystick which works fine with evtest and jstest, providing the following buttons:

      Event code 288 (BTN_TRIGGER)
      Event code 289 (BTN_THUMB)
      Event code 290 (BTN_THUMB2)
      Event code 291 (BTN_TOP)
      Event code 292 (BTN_TOP2)
      Event code 293 (BTN_PINKIE)
      Event code 294 (BTN_BASE)
      Event code 295 (BTN_BASE2)
      Event code 296 (BTN_BASE3)
      Event code 297 (BTN_BASE4)
      Event code 298 (BTN_BASE5)
      Event code 299 (BTN_BASE6)
      

      As I said, I can configure or reconfigure the mapping when emulationstation boots or whenever I want from the ES menu. The mapping in ES works fine. As soon as I start a game, two buttons between A,B,X,Y (I do not remember the exact ones) are "lost", that is the game does not do anything when they are pressed. According to the guidelines in the core button remapping video you pointed out, I checked the game directory: there is nothing which overrides the global options. Do you have any other ideas?

      M 1 Reply Last reply 26 Feb 2019, 16:40 Reply Quote 0
      • M
        mitu Global Moderator @lproj
        last edited by 26 Feb 2019, 16:40

        @lproj How does the jstest reports the joystick ?
        Can you check the auto-configuration profile generated for RetroArch by Emulationstation in /opt/retropie/configs/all/retroarch-joypads? Does it have the correct button codes and all the buttons declared ?

        L 1 Reply Last reply 26 Feb 2019, 16:57 Reply Quote 0
        • L
          lproj @mitu
          last edited by mitu 26 Feb 2019, 16:57

          @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
          • M
            mitu Global Moderator
            last edited by 26 Feb 2019, 17:17

            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 26 Feb 2019, 17:34 Reply Quote 0
            • L
              lproj @mitu
              last edited by 26 Feb 2019, 17:34

              @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.

              M 1 Reply Last reply 26 Feb 2019, 17:39 Reply Quote 0
              • M
                mitu Global Moderator @lproj
                last edited by 26 Feb 2019, 17:39

                @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
                • M
                  mitu Global Moderator
                  last edited by 26 Feb 2019, 19:20

                  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 26 Feb 2019, 20:42 Reply Quote 0
                  • L
                    lproj @mitu
                    last edited by 26 Feb 2019, 20:42

                    @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 27 Feb 2019, 21:30

                      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
                      • M
                        mitu Global Moderator
                        last edited by 27 Feb 2019, 21:33

                        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 27 Feb 2019, 21:48 Reply Quote 0
                        • L
                          lproj @mitu
                          last edited by 27 Feb 2019, 21:48

                          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
                          • M
                            mitu Global Moderator
                            last edited by 27 Feb 2019, 21:57

                            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 27 Feb 2019, 22:19 Reply Quote 0
                            • L
                              lproj @mitu
                              last edited by lproj 27 Feb 2019, 22:19

                              @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 27 Feb 2019, 22:46

                                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
                                16 out of 16
                                • First post
                                  16/16
                                  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.

                                  This community forum collects and processes your personal information.
                                  consent.not_received