RPi SNS-005 only B button is working, shows as all buttons input on jstest
-
Pi Model or other hardware: Pi Zero W v1.1
Power Supply used: Using 3.1A Anker Fast Charger
RetroPie Version Used: v4.4; retropie-setup build signature a161774abe2e73bc2392223a6d9a5ab4aa5d16b7 (3/10/19)
Built From: Premade image v4.4 from Retropie website, used etcher to write to microSD card, 32Gb Sandisk class 10
USB Devices connected: Logitech wireless USB keyboard
Controller used: SNS-005
Error messages received: None, other than jstest showing a B press as all buttons and nothing from the other buttons
Log found in /dev/shm/runcommand.log (if relevant): n/a
Guide used: https://hackaday.io/project/16288-raspberry-pi-zero-inside-an-snes-controller
File: unknown
Emulator: n/a -- happens at EmulationStation startup for config and for "jstest"
Attachment of config files: from file /etc/modprobe.d/gamecon.conf
"options gamecon_gpio_rpi map=0,0,0,0,0,1" on one line
How to replicate the problem: found another discussion of same issue but with using the controlblock module (https://retropie.org.uk/forum/topic/9981/snes-controller-stopped-working-now-b-button-sends-all-signals), which I am not. I have wired my pad directly to the GPIO and power per the hackaday writeup (though after it did this behavior initially, I rewired it to pull from the 5v instead of 3.3v to see if it was a low volt issue on the SNS-005, same results)So per instruction I have tried using jstest with same results every time. B button triggers all buttons, all other buttons do nothing. I have tried:
- Resoldering the points (with continuity testing GOOD from controller solder to GPIO solder)
- Moving the 3.3v (GPIO-P1) power line to 5v (GPIO-P2)
- Swapping 'clock' and 'latch' lines on GPIO10 (GPIO-P19) and GPIO11 (GPIO-P23); currently is wired with latch to GPIO11 and clock to GPIO10.
- Verified the serial data line is connected to GPIO3 (GPIO-P5) for sure.
- Since I plan to use a battery and powerboost module on this, I am using GPIO-P9 as the controller ground so that GPIO-P6 is available for easier wire routing.
- The powerboost/battery output is connected to GPIO-P4 (+5) and GPIO-P6 (Gnd).
- The controller was verified working properly on a SNES console before this mod.
At a loss for what to check next. The writeup on this site that I referenced mentions that someone was able to replicate this by disconnecting the latch or clock lines, indicating a possible board defect. Not too sure how I could test that out. Any thoughts, besides using a different board? I guess they're only $10 so it's not much but I hate just throwing parts at stuff.
-
Just a bump to see if anyone has any insight on this one?
I'm going to check out the GPIO header for the Pi Zero v1.1 in detail and make sure that the connections match what is intended, will report back once that's done.
-
Phone chargers generally are not great for powering Pi's as they require a steady current and chargers fluctuate. I'd advise getting a dedicated power supply first, then see if that makes any difference here.
-
try changing it to
"options gamecon_gpio_rpi map=0,0,0,0,1,0"
GPIO3(GPIO=P5) -
@Efriim , Tried changing to ..."map=0,0,0,0,1,0"
Did not even get a response with this setting. Switched it back to ..."map=0,0,0,0,0,1" and it does respond. Waiting on a more robust power supply now to eliminate that possibility.
-
@markyh444, as suggested I tried a 5v 2.5A constant dc power supply, not a USB phone charger. USB cable is about 6 inches long, 26AWG power conductors.
-
@auriuman78
You're right, I got the Pad # confused with the GPIO-P# and they are not analogous. However Pad1 and Pad2; the first two numbers are ignored and not used on rev2;; pi zero.Have you updated the firmware on your pi zero? I guess RetroPie 4.4 should be updated. Have you tried jstest on raspbian or another image? There has been changes to the way RetroPie assigns controller numbers, since I don't know when, since 2016 at least probably.
There is an extra scriptmodule from zerojay I thinkScript from meleu to assign joystick 1-4, to assign controller# mayhaps it will work to assign to controller pad 6.Since it is only available for joystick 1-4, I guess maybe you would need to change the jsfuncs.sh
every
"for i in 1 2 3 4"
to
"for i in 1 2 3 4 5 6"
it probably would not work.Do you think since there is only one button function it is because of the clock or because of the underlying operating system?
-
@Efriim I should look at firmware updates. I suppose that could be a possibility; will also check the script mod and check jsfuncs.sh too.
As far as clock or latch data, I have considered this as the issue. Seems another user was able to replicate this issue by disconnecting either clock or latch lines. I guess its possible I have a defect in the pi board gpio header but would be much better if it were an underlying OS issue. Seems strange that a pretty much new Pi zero would have a bad gpio but not out of the question. I'll have to dig around the logs and see if I can figure it out by what I can see on the gpio pins I'm using.
I'm still a youngling to linux distros but I'm willing to give it a shot.
-
@Efriim , I checked out the joystick script. Got it installed, made the changes, etc. but still no joy.
Time to dig around the gpio and see if I can spot any physical defects. Then dig into testing gpio ports in software and/or by scope.
-
@auriuman78
I really didn't think that would work, but I thought the script was worth exploring for its calls and functions.The probability that the board has an actual defect is much lower than operating system being at fault. If you have an extra usb drive or sdcard try a new raspbian image, and get jstest up and running on it. I dont know though.
The update on retropie should work just as well. It is raspbian underneath after all.
-
Turns out it was underlying OS issue. For whatever reason, the update broke the gamecon driver for SNES controller input. After uninstalling the db9 and gamecon drivers, rebooting, reinstalling then rebooting, my pad now works as one would expect!
What cued me into it was while reviewing logs after an update failure I found a gamecon update failed message. Researched it and found this info at the link below.
https://retropie.org.uk/forum/topic/3875/solved-gamecon-installation-fails/10
@Efriim, really appreciate all your help and insight onto this issue. You helped direct me to look more into the software side and that's where it was.
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.