SNES Controller Issues
-
I'm in the process of putting a Pi inside an SNES shell, and I'm having a hard time getting the controllers to work. I'm about at the limits of my diagnostic abilities, so I'm looking for some help.
Basically, I've got the ControlBlock installed physically, installed the driver, and the power switch and original SNES LED work perfectly. With the controller type set to snes in the config, I can get the reset button working, but nothing else.
I've got the wires soldered to the back of the original board, I've triple-checked that it matches the pinout and the photo on the ControlBlock page. I've checked with a multimeter to make sure there's connectivity between the screw on the ControlBlock's terminal and the matching pin to the port. I've even dismantled the plug on an old SNES controller with a cracked housing and run jumper wires from the controller wires to the ControlBlock, and nothing. The input config in EmulationStation does show 3 controllers connected, and pushing the reset button does trigger it to set up a SNES controller, but the actual controller buttons do nothing.
I wiped my SD card and reloaded a fresh RetroPie image, did the appropriate updates, and installed & configured the driver again, and still get the same results. Setting it to arcade mode and using a jumper wire on the screws WILL activate the inputs. But once I set it to SNES and connect those wires, I get no response (other than 6 & 7 being set off when I hit reset, otherwise X and Y stay at -32767 and all buttons are off).
There are only two oddities I found while trying to diagnose it. One if that my wireless keyboard (with USB receiver) comes up as js0, so the ControlBlock is on js1 and js2 instead of 0/1. The other is that I can't use the GPIO test script. If I run it while the ControlBlock is connected, the Pi instantly reboots. If I disconnect the ControlBlock and run it, I do get the message, but the system starts shutting down right after the message comes up, so I can't actually test anything.
I have been getting the lightning bolt a bit as well, but it doesn't seem to work even when the bolt isn't there.
This is on a Pi 3, running a fresh RetroPie 4.2 image with absolutely nothing other than the ControlBlock service installed, and the ControlBlock (v2.1) and the keyboard's 2.4ghz receiver are the only things connected.
-
@TVsIan said in SNES Controller Issues:
I have been getting the lightning bolt a bit as well, but it doesn't seem to work even when the bolt isn't there.
First you need to solve this issue. Your power supply is inadequate for your setup and that the power is fluctuating even if the "lightning bolt" indicator is sometimes not shown. It could be corrupting your Retropie image build. Also, the SNES controller requires power and the supply just could not keep up with the demands of your setup. Try getting a power supply that has 3A or more. Then rebuild the Retropie image with a very stable power supply.
Secondly, how sure are you that the SNES controller is not defective? When you simulated an "arcade" setup using jumper wires the inputs were activated and therefore Retropie was OK, but when the SNES controller was selected the problem became apparent.
-
@ortsac I'll try swapping the power supply when I get home to see if that makes a difference. I've tried a couple already and it didn't change, but I had also been going through a powered USB hub because at one point I was using a hard drive. I'll be dumping that in favor of a flash drive, so I can go directly into the ControlBlock with it.
As far as the controller, I'm not 100% sure they're good, but I've used 3 separate controllers on 2 ports each, plus a fourth controller direct from the wires to the ControlBlock. It seems unlikely that I'd have that many that are completely non-functional. But if nothing changes after swapping the power supply, I'll hook up a SNES and try the controllers on it to make sure.
-
@TVsIan What are the ratings (Voltage and Current) on your power supplies? Are they specific for use with RPi or are they for charging mobile devices? Mobile device units are not reliable.
-
I switched to the Canakit 5V, 2.5A power supply and ditched the hub, it's plugged directly into the ControlBlock now. The lightning bolt is totally gone.
It still didn't work, so I formatted the MicroSD, reloaded a fresh 4.2 image, and reinstalled the ControlBlock2 service. Same thing, the reset button is the only input it picks up.
I did test the controllers on an actual SNES, and they work.
-
I've got the wires soldered to the back of the original board
Can you post an image of your hardware setup here that shows the wiring?
I've even dismantled the plug on an old SNES controller with a cracked housing and run jumper wires from the controller wires to the ControlBlock, and nothing.
Sounds as if that is a better suiting hardware setup for debugging this. Maybe you can also send an image of this setup with the wiring?
The input config in EmulationStation does show 3 controllers connected, and pushing the reset button does trigger it to set up a SNES controller, but the actual controller buttons do nothing.
What about the output of jstest?
I wiped my SD card and reloaded a fresh RetroPie image, did the appropriate updates, and installed & configured the driver again, and still get the same results. Setting it to arcade mode and using a jumper wire on the screws WILL activate the inputs.
That shows that the hardware and the ControlBlock driver are working correctly
There are only two oddities I found while trying to diagnose it. One if that my wireless keyboard (with USB receiver) comes up as js0, so the ControlBlock is on js1 and js2 instead of 0/1.
That should not be a problem. However, I would try to attach as few devices as possible for debugging this issue. Maybe you have a USB keyboard with a cable?
The other is that I can't use the GPIO test script. If I run it while the ControlBlock is connected, the Pi instantly reboots. If I disconnect the ControlBlock and run it, I do get the message, but the system starts shutting down right after the message comes up, so I can't actually test anything.
Sounds like you must stop the ControlBlock driver service via
sudo service controlblockservice stop
before running the test script.I have been getting the lightning bolt a bit as well, but it doesn't seem to work even when the bolt isn't there.
The lighting bolt indicates a low supply voltage. That might lead to an unstable communication with the ControlBlock. I agree with the comments above that this issue should (also) be solved. I would try and start with a USB keyboard with cable to get rid of the bluetooth receiver. We made very good experiences with the official Raspberry Pi power supply.
Hope that gives some ideas for further steps.
-
Sorry, I overhead your last post. Great that the lighting bolt is gone. Then we can concentrate on the wiring.
-
Well, this is a bit embarrassing - turned out to be an ID10T error on my part.
While cleaning up some of the wiring to make it presentable for a picture, I realized I had been wiring it into the Player 1 side of the ControlBlock rather than the Player 2. I think the reset button being on the Player 1 side threw me.
So I swapped them over to the correct side and it kicked right in.
Thanks for your assistance, if I hadn't double checked after your post, I probably would have just kept on doing it backwards.
-
@petrockblog Why would wiring the controller to Player 1 cause this issue? Unless @TVsIan exclusively configured Player 1 as Reset button only. One should be able to use both controller (Players 1 & 2) with the reset switch connected as well without any problems.
-
@TVsIan Glad to hear that it is working for you now!
@ortsac The driver polls the terminal pins on the player 2 side of the board and that's really all: If the SNES controllers are not connected to those specific pins, no data can be read out.
I will prepare a schematic for that part of the ControlBlock soon. Basically, the driver communicates with the two GPIO expander components on the ControlBlock via SPI. Nothing more fancy happens there.
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.