Homepage › Forums › RetroPie Project › GPIO Adapter, ControlBlock etc. › SNES gamepad does not work using ControlBlock
Tagged: ControlBlock SNES
- This topic has 55 replies, 10 voices, and was last updated 9 years, 2 months ago by petrockblog.
-
AuthorPosts
-
03/15/2015 at 21:30 #91416dotarjParticipant
Hi,
I’m having trouble using the SNES controllers with the ControlBlock for my Raspberry Pi 2. It looks like I have done all necessary steps to enable the SNES controllers, but somehow it doesn’t work (the power switch and led do work).
I have wired the ControlBlock according to description here: https://www.petrockblock.com/2014/12/29/controlblock-power-switch-and-io-for-the-raspberry-pi/#Using_SNES_Controllers_with_the_ControlBlock. I used the RetroPie image (Raspberry Pi 2), and afterwards I installed the ControlBlockService (clone from github, and install using make install and make installservice). Then I edited controlblockconfig.cfg and set the gamepadtype to snes, and rebooted. EmulationStation detects 2 gamepads, but when I hold the A button nothing happens.
When it didn’t work, I re-wired everything to make sure that the wiring was ok, but still no luck. The soldering looks ok.
Is there something that I missed?
Arjen
03/15/2015 at 21:45 #91525petrockblogKeymasterCan you post some pictures of your setup here? This usually helps quite a lot to better analyst the problem.
03/16/2015 at 20:05 #91625dotarjParticipantHi Florian,
Thanks for the quick reply! I have attached some photo’s. Unfortunately all wires are black, but take from me that it is properly wired (I’ve checked 4 times…). :)
03/16/2015 at 20:06 #91628dotarjParticipantand two more photo’s…
03/17/2015 at 07:17 #91683petrockblogKeymasterOk. a next step could be to check if we can manually communicate with the GPIO expander components (The two black block in the middle of the ControlBlock).
They are using a communication interface that is called I2C. What is the output of the commands
sudo i2cdetect -y 0 sudo i2cdetect -y 1
?
These commands look for any attached I2C device.
03/17/2015 at 20:14 #91788dotarjParticipantHi Florian,
This is the output of the commands:
pi@retropie ~ $ sudo i2cdetect -y 0
Error: Could not open file/dev/i2c-0' or
/dev/i2c/0′: No such file or directo ry
pi@retropie ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 03 — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —03/17/2015 at 21:22 #91806petrockblogKeymasterSorry, I did not think about this before. You need to disable the controlblockservice before this test. You can simply do this with these commands run from within the ControlBlockService folder:
sudo make uninstallservice
Does the output ofsudo i2cdetect -y 1
look different then? If the GPIO expanders are recognized correctly, we will see a line
20: 20 -- -- -- -- -- -- 27
03/18/2015 at 20:24 #91932dotarjParticipantHi Florian,
No problem. This is the output now:
pi@retropie ~ $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: 20 — — — — — — 27 — — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —So the GPIO expanders are reconized correctly?
03/18/2015 at 20:52 #91936dotarjParticipantSome more information:
When EmulationStation is started, it shows a message “2 gamepads detected. Hold A button on your device to configure it.”. It always shows this message, even when no gamepads are connected. When there is a gamepad connected, pressing buttons does not start configuring the gamepad.
I just found out that when no gamepads are connected and I connect a gamepad when this message is displayed, it starts the configuration of the gamepad, but again no buttons respond.
03/19/2015 at 07:13 #91982petrockblogKeymaster[quote=91932]
So the GPIO expanders are reconized correctly?
[/quote]
Yes, the GPIO expanders are recognized correctly. Maybe there are other services running that make use of the I2C interface. What doesservice --status-all
show after a boot?Also, how many controllers are registered? You can see this with the commands
ls /dev/input/
.ControlBlockService, the driver for ControlBlock, polls the GPIO expanders and maps the inputs to two virtual gamepads. This is done independently of the fact that controllers are connected or not to the CB.
03/19/2015 at 09:07 #91996dotarjParticipantThis is the output of the 2 commands:
pi@retropie ~ $ service –status-all
[ – ] SNESDev
[ ? ] alsa-utils
[ – ] asplashscreen
[ ? ] binfmt-support
[ + ] bluetooth
[ – ] bootlogs
[ ? ] bootmisc.sh
[ ? ] checkfs.sh
[ ? ] checkroot-bootclean.sh
[ – ] checkroot.sh
[ – ] console-setup
[ + ] controlblockservice
[ + ] cron
[ + ] dbus
[ ? ] dphys-swapfile
[ ? ] fake-hwclock
[ – ] hostname.sh
[ ? ] hwclock.sh
[ + ] ifplugd
[ – ] kbd
[ – ] keyboard-setup
[ ? ] killprocs
[ ? ] kmod
[ – ] motd
[ ? ] mountall-bootclean.sh
[ ? ] mountall.sh
[ ? ] mountdevsubfs.sh
[ ? ] mountkernfs.sh
[ ? ] mountnfs-bootclean.sh
[ ? ] mountnfs.sh
[ ? ] mtab.sh
[ ? ] networking
[ + ] ntp
[ ? ] plymouth
[ ? ] plymouth-log
[ – ] procps
[ ? ] raspi-config
[ ? ] rc.local
[ – ] rmnologin
[ – ] rsync
[ + ] rsyslog
[ + ] samba
[ ? ] screen-cleanup
[ ? ] sendsigs
[ + ] ssh
[ – ] sudo
[ ? ] switch_cpu_governor
[ + ] triggerhappy
[ + ] udev
[ ? ] udev-mtab
[ ? ] umountfs
[ ? ] umountnfs.sh
[ ? ] umountroot
[ – ] urandom
[ – ] x11-common
pi@retropie ~ $ ls /dev/input
event0 event1 js0 js1 mice03/20/2015 at 21:11 #92118dotarjParticipantJust to make sure the wiring is not the problem, I have rewired the controller ports using different (thicker) wires, but still no response from the gamepads. Is there another way to debug the GPIO input?
03/20/2015 at 21:41 #92119petrockblogKeymasterOk, SNESDev is also running. This might be a cause for the problems. You can disable SNESDev with the RetroPie-Setup Script or directly from within the downloaded SNESDev-Rpi repository that you can get from https://github.com/petrockblog/SNESDev-RPi. Within the SNESDev-Rpi folder you can call
sudo make uninstallservice
to uninstall the SNESDev service.03/21/2015 at 11:48 #92154stantonParticipantJust wanted to echo that I am experiencing precisely the same issue after attempting to setup a Pi 2 last night. I confirmed that my GPIO expanders are being recognized correctly. Like dotarj, when EmulationStation is started, two controllers are said to be recognized, but no button hold will start the gamepad configuration. The power switch functionality works as intended.
03/21/2015 at 19:37 #92204dotarjParticipantI have uninstalled the SNESDev service, but still no response from the gamepads.
03/22/2015 at 10:20 #92250petrockblogKeymasterOne way to debug the GPIO ports is the following:
- Set the gamepad type in the configuration file of the ControlBlock service to “arcade”. after changing the configuration you need to restart the ControlBlock service, e.g., with the command “sudo service controlblockservice restart”.
- Connect a (jump) wire to one of the Ground terminals of the ControlBlock.
- Use the tool”jstest” to test each of the GPIO pins. To test the pins on the player 1 side use the command “sudo jstest /dev/input/js0”. Use the wire to pull the pins to Ground one after another. Jstest should register this and show a state change for the corresponding button or axis. Pulling the pins to Ground with this configuration means for the ControlBlock driver in this configuration that a button was pressed. To exit the jstest tool press Ctrl-C. To test the pins on the player 2 side use the command “sudo jstest /dev/input/js1” and repeat the above procedure.
Can you observe these virtual button presses?
03/23/2015 at 03:02 #92335stantonParticipantFor Player 1, all of the buttons instantly change to an on state and remain there. I see the same behavior from Player 2, except for buttons 2 and 3. They do not instantly turn on and do show a state change when I pull them to ground.
pi@retropie ~ $ sudo jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (ControlBlock Arcade Gamepad) has 2 axes (X, Y)
and 12 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing … (interrupt to exit)
Axes: 0: 0 1: 0 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0:-32767 1: 0 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on
Axes: 0:-32767 1:-32767 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on 7:on 8:on 9:on 10:on 11:onpi@retropie ~ $ sudo jstest /dev/input/js1
Driver version is 2.1.0.
Joystick (ControlBlock Arcade Gamepad) has 2 axes (X, Y)
and 12 buttons (BtnX, BtnY, BtnZ, BtnTL, BtnTR, BtnTL2, BtnTR2, BtnSelect, BtnStart, BtnMode, BtnThumbL, BtnThumbR).
Testing … (interrupt to exit)
Axes: 0: 0 1: 0 Buttons: 0:on 1:off 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:off 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:off 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:of
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0:-32767 1: 0 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on
Axes: 0:-32767 1:-32767 Buttons: 0:on 1:on 2:off 3:off 4:on 5:on 6:on 7:on 8:on 9:on 10:on 11:on03/24/2015 at 07:11 #92446petrockblogKeymasterDoes it work, when you use
sudo raspi-config
, choose “Advanced Options”, and enable I2C from there? Enable the ARM I2C interface from there and also enable the automatic loading of the I2C kernel module by default.03/25/2015 at 14:39 #92546dotarjParticipantAll pins seem to respond correctly (I have only tested it with I2C enabled). They all instantly turn on when I pull them to ground and off when released. I will rewire the SNES controller ports and test again using the controllers.
03/27/2015 at 21:11 #92854dotarjParticipantI have rewired the controller ports and still get no response from the controllers.
03/30/2015 at 20:55 #93191NoFloParticipantSame problem here. Any new information / ideas regarding this?
04/01/2015 at 19:59 #93383NoFloParticipantsome (maybe useful) information I collected @petrockblog, using a Raspberry Pi 2 B
– The wiring in your guide shows another pin setup of the SNES controller as anywhere else (switched 5V/VCC and Ground) – inadvertently or intentionally?
– All the connections are working (tested as “arcade controller” with jstest as described above)
– With the controlblockconfig setting SNES, jstest shows all buttons as “off” if no controller is connected. After connceting a controller, all of the buttons switch to the “on” state and stay “on”.
– When overclocking (“Pi2” setting), the abovementioned behaviour changes and all buttons are shown as “on”, no matter if a controller is connected or not.
any ideas?
04/07/2015 at 06:59 #94054dotarjParticipantHi Florian,
Any news on the SNES controller problem?
04/07/2015 at 21:10 #94116petrockblogKeymasterNoFlo was right – thanks for that hint. The pinout diagram of the SNES connector is wrong. VCC and GND have to be swapped! I have gone through the assembly description and I could reproduce the erroneous behavior. Swapping GND and VCC solves the problem. Sorry for this wring pinout diagram, I have replaced it now.
04/08/2015 at 07:24 #94150stantonParticipantI can confirm that a VCC and GND swap resolves the issue for me.
Thanks for following up!04/10/2015 at 13:10 #94379NoFloParticipantThank you for your information regarding the VCC and GNC connection.
Unfortunately, even after switching those two I cannot get the SNES controller to work. The strange behaviour when overclocking is solved, but the following persists:
– With the controlblockconfig setting SNES, jstest shows all buttons as “off” if no controller is connected. After connceting a controller, all of the buttons switch to the “on” state and stay “on”.
I have no idea, what I could do to solve this problem. Maybe you can tell me something, I can try…
jstest output with no controller connected:
Driver version is 2.1.0.
Joystick (ControlBlock SNES Gamepad) has 2 axes (X, Y)
and 8 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR).
Testing … (interrupt to exit)
Axes: 0: 0 1: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:offjstest output with controller connected:
Driver version is 2.1.0.
Joystick (ControlBlock SNES Gamepad) has 2 axes (X, Y)
and 8 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR).
Testing … (interrupt to exit)
Axes: 0:-32767 1:-32767 Buttons: 0:on 1:on 2:on 3:on 4:on 5:on 6:on 7:on04/11/2015 at 22:04 #94600petrockblogKeymasterMaybe you could post a picture with your hardware setup here?
04/12/2015 at 01:15 #94621interstate90ParticipantI had this same issue and was able to reproduce it when using an overclock that pushes the core to 500Mhz (Turbo & Pi2). I would check your overclock settings and change it to “None” for the time being.
It seems that pushing the core to 500Mhz causes some issues with the Original NES Controllers?
04/13/2015 at 12:53 #94717NoFloParticipantUnfortunately the overclocking settings do not affect the behaviour. At all settings, the buttons are “off” with no controller connected, and “on” with a connected controller.
I also tried to use another power supply, but that did not help either.Attached are a few pictures of my setup. The wires are all black, but I checked the wiring many times and the controller pins are connected as documented.
Even though the Controller Pins are soldered on the circuit board, I ensured that there are no connections between the pins and they are all isolated from the remaining parts.As mentioned before, when switching the controller type to arcade, all buttons are working (“on” when connected to GND, “off” when not)
Edit: @dotarj did you find a solution?
04/14/2015 at 06:55 #94825dotarjParticipant@NoFlo: I still didn’t get it working. I’ll try reinstalling and reconfiguring RetroPie and see if it works then.
04/14/2015 at 15:12 #94852NoFloParticipant[quote=94825] @NoFlo: I still didn’t get it working. I’ll try reinstalling and reconfiguring RetroPie and see if it works then.[/quote]
For me, this did not work. Installed Retropie on another SD Card to make sure the problems are not related to the current installation but it did not change anything.
Also, I tried version 2.6 and version 3 BETA with no success.I am curious about your experiences with a fresh installation :)
05/01/2015 at 18:33 #96608sudobarnParticipantHi there guys,
having the same problem. – Have run jstest as above, all fine.
Have disabled SNESDEV and enabled I2C.
Running 3.0 Beta on a Raspberry Pi 1 (B+)
Emulation Station starts, says 2 gamepads detected (even if they aren’t), but no input on either pad has any effect.
Any thoughts on how to get snes gamepads working?
05/15/2015 at 01:29 #97665richParticipantI got my controlblock today and I am having the same issues – which is absolutely infuriating as I only bought it for this functionality.
I have followed all installation steps correctly, set up the service, snesdev is not installed and the soldering and wiring is decent and correctly done. I have followed all troubleshooting steps. It still does not work.
I have tried it with both an official SNES pad and an unofficial one. Emulation station detects the controlblock as active but then does not register any button presses during the initial controller configuration. When I unplug the controller the software goes mad and assigns two buttons by itself and continues to attempt to do so in a cycle.
Not happy.
05/15/2015 at 11:45 #97684richParticipantAlso in addition, the power switch does not function correctly. It turns the system off and shuts down correctly, but then the LED does not turn off. I also cannot get the switch to turn the Pi on.
05/17/2015 at 15:21 #97786richParticipantdisregard my last two posts. reinstalled retropie and now it works fine! ha, what the hell.
very happy now. got wifi installed too along with bluetooth. works like a dream.
-
AuthorPosts
- The forum ‘GPIO Adapter, ControlBlock etc.’ is closed to new topics and replies.