RetroUSB SNES to USB Adapter buttons not recognized properly

Discussion of keyboards, gamepads, joysticks and other input related peripherals.
thorr
Top Contributor
Posts: 1099
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 535 times
Been thanked: 252 times

RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by thorr »

Hello,

I have been using a RetroUSB NES to USB adapter without problems. Today I received a RetroUSB SNES to USB adapter. I tested it on my PC and every button works properly and maps to different buttons. When I connect it to my Mister FPGA, the following buttons both act as the same button:
A and B
X and Y
Select and L
Start and R

When I am defining the buttons from the menu, once I press A for example, I can't press B (or A) for any of the following button assignments because it was already defined. Once I press X, and I can't use Y, etc. After mapping, I can press A or B and they both act the same. I tried turning off fast USB polling, but it did not help.

Do you have any suggestions to try to fix this? Thanks!

Update: It is being detected as a two axis, two button gamepad:
/root# dmesg | grep -i usb | grep hid
[ 0.236285] usbcore: registered new interface driver usbhid
[ 0.236292] usbhid: USB HID core driver
[ 1.202921] hid-generic 0003:248A:8367.0001: input,hidraw0: USB HID v1.11 Mouse [Telink Wireless Receiver] on usb-ffb40000.usb-1.2/input0
[ 1.262221] hid-generic 0003:248A:8367.0002: input,hidraw1: USB HID v1.11 Keyboard [Telink Wireless Receiver] on usb-ffb40000.usb-1.2/input1
[ 1.443024] hid-generic 0003:F000:00F1.0003: input,hidraw2: USB HID v1.00 Gamepad [RetroUSB.com SNES RetroPort] on usb-ffb40000.usb-1.4/input0
[ 401.112993] hid-generic 0003:F000:00F1.0004: input,hidraw2: USB HID v1.00 Gamepad [RetroUSB.com SNES RetroPort] on usb-ffb40000.usb-1.3/input0
/dev# jstest /dev/hidraw2
Driver version is 0.8.0.
Joystick (Unknown) has 2 axes and 2 buttons.
Testing ... (interrupt to exit)

jstest: error reading: Invalid argument

Windows sees it as having 8 buttons.

Any help would be appreciated. Thanks!
thorr
Top Contributor
Posts: 1099
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 535 times
Been thanked: 252 times

Re: RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by thorr »

I found this site that shows a similar issue: https://askbot.fedoraproject.org/en/que ... f-buttons/

In his case, the kernel version was affecting the number of buttons showing up.

$ uname -a
Linux localhost 4.16.3-301.fc28.x86_64 #1 SMP Mon Apr 23 21:59:58 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (RetroUSB.com SNES RetroPort) has 2 axes (X, Y)
and 8 buttons (BtnA, BtnB, BtnC, BtnX, BtnY, BtnZ, BtnTL, BtnTR).

$ uname -a
Linux localhost 4.18.16-200.fc28.x86_64 #1 SMP Sat Oct 20 23:53:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (RetroUSB.com SNES RetroPort) has 2 axes (X, Y)
and 4 buttons (BtnA, BtnB, BtnC, BtnX).


In my case, I was looking at the wrong device. Mine actually is showing as having 4 buttons which makes sense because it has 8 and they are paired up giving me 4 usable.
/dev/input# jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (RetroUSB.com SNES RetroPort) has 2 axes (X, Y)
and 4 buttons (BtnX, BtnY, BtnZ, BtnTL).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off

So, I am guessing a Kernel update might fix my issue, but I have no idea.
ajsonofjoe
Posts: 1
Joined: Wed Jul 15, 2020 7:09 pm

Re: RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by ajsonofjoe »

Same problem here. Here’s hoping the right people will see your posts and fix the issue via a kernel update.
BTW, the Raphnet SNES to USB adapter does not have this issue.
paulbnl
Core Developer
Posts: 205
Joined: Sun May 24, 2020 8:48 pm
Has thanked: 18 times
Been thanked: 196 times

Re: RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by paulbnl »

Here is a patch for the kernel to fix the RetroUSB adapters: https://github.com/torvalds/linux/commi ... 31cdeb3d26

Apparently they need the HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE quirk. You can test this by adding usbhid.quirks=0xf000:0x00f1:0x100000 to /linux/u-boot.txt
thorr
Top Contributor
Posts: 1099
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 535 times
Been thanked: 252 times

Re: RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by thorr »

paulbnl wrote: Wed Jul 15, 2020 11:06 pm Here is a patch for the kernel to fix the RetroUSB adapters: https://github.com/torvalds/linux/commi ... 31cdeb3d26

Apparently they need the HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE quirk. You can test this by adding usbhid.quirks=0xf000:0x00f1:0x100000 to /linux/u-boot.txt
Thank you for your help. I tried putting the line you suggested all by itself to take out any other variables, and it did not change anything. I have ordered a ralphnet adapter in the meantime (waiting for it to arrive), but I would still like to get this working just because. Do you have any other suggestions about what to check in order to get the line in the u-boot.txt working correctly?
User avatar
cacophony
Posts: 14
Joined: Sun May 24, 2020 7:45 pm
Has thanked: 3 times
Been thanked: 2 times

Re: RetroUSB SNES to USB Adapter buttons not recognized properly

Unread post by cacophony »

Not sure if something changed on the MiSTer side, but I've been using the RetroUSB SNES to USB adapter to connect a OEM SNES controller to my MiSTer for the past four months and it has worked flawlessly. I didn't have to do anything special.

This is the one I have: https://www.retrousb.com/product_info.p ... ucts_id=29
Post Reply