Joystick buttons not detected properly in SNES only
-
@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:offall buttons and axes works fine
-
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 ? -
@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.
-
@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.
-
One idea that comes to mind - switch the
input_driver
in the.cfg
file fromudev
tosdl2
and see if it makes a difference in-game. -
@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.
-
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?
-
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. ?
-
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.
-
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. -
@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/bEajtw5kEDIT: I forgot to mention that I had also tried "nes" before reinstalling everything and I got the same problem.
-
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.
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.