Problem running original SNES controller from GPIO on RPi3
-
RaspberryPie 3 Model B
5.1V 2.5A Stontronics psu
RetroPie Ver 4.2.15
retropie-4.2-rpi2_rpi3.img
USB mouse and keyboard connected
1 SNES controller connectedI’m trying to connect an original SNES controller to my RPi via the GPIO pins, I have wired the GPIO to the original controller board ribbon cable, keeping the front SNES controller ports intact (interestingly the red power led works?) but when I run jstest every button is in the on state.
jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (SNES pad) has 2 axes (x, y)
and 8 buttons (BtnX, BtnY, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR).
Testing… (interrupt to exit)
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on 7:onThe SNES to GPIO is wired as follows;
SNES Pin GPIO
1 5V 3.3 Pin 1
2
3
4 D2 – Data GPIO3 Pin 5
5
6 D1 – Data GPIO4 Pin 7
7
8 C1 – Clock GPIO10 Pin 19
9 C2 – Clock GPIO10 Pin 19
10 Latch GPIO11 Pin 23
11 Gnd Gnd Pin 6they go off as soon as the controller is disconnected. I’ve tried two different SNES controllers, both of which work on my functioning SNES, and get the exact same problem. My cabling appears to be ok, tested for any short circuit between any cable using multimeter, all ok, except for being a bit messy.
I have installed the gamecon-gpio-rpi-dkms_1.3_all.deb that i found in this post;
https://retropie.org.uk/forum/topic/11925/gamecon_gpio_rpi-1-3-kernel-4-9-build-fixand have installed snesdev from the RetroPie Setup to a fresh copy of RetroPie. I completed all updates, then installed gamecon 1.3 again.
Does anyone have any ideas where I’ve gone wrong?
I’ll probably end up getting a snes to usb converter, as I think i’ll eventually need the GPIO pins, but I would love to get this solved.
-
I completely messed up the tags and I can't see where to edit the post?
they should have been;SNES, GPIO, SNESDEV, Gamecon, Controller, Gamecondriver,
-
The gamecon and snesdev driver have different wiring. If you want to use the gamecon driver, the correct wiring is the picture from the gamecon driver config screen. I don't have the picture on me to tell if yours is correct. I don't use the snesdev driver because it creates an additional 30sec bootup/shutdown time.
-
@darksavior Just wanted to say thanks for the help. I don't know how I got myself so confused about the 2 drivers?
I uninstalled snesdev and tried again. It helped a little but the controller still wasn't working properly. The thing is, I'd left the wires I'd soldered on quite long, to make moving things around easier, and the wire I'd used wasn't of the best quality. I re-soldered a ribbon cable that was half the length of the old cable I'd used, connected it up as per the gamecon diagram, with just the gamecon driver installed and now everything's working.
Thanks for pointing me in the right direction.
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.