Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › How to disable second joystick on GPIO adaptor if no controller connected?
- This topic has 7 replies, 2 voices, and was last updated 11 years ago by petrockblog.
-
AuthorPosts
-
11/23/2013 at 10:47 #3239smartroadParticipant
Finally got the GPIO adaptor installed and working! Yay! But now I have an issue that when I connect only one controller it reads the second controller as having all its buttons pressed.
pi@retropie ~ $ jstest /dev/input/js0 Driver version is 2.1.0. Joystick (SNES pad) 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:off ^C pi@retropie ~ $ jstest /dev/input/js1 Driver version is 2.1.0. Joystick (SNES pad) 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:on 1:on 2:on 3:on 4:on 5:on 6:on 7:on ^C
That is the output from
jstest
when I have a controller on port 1 and not port 2. How can I get it to read port 2’s buttons as OFF when it isn’t connected?11/23/2013 at 10:51 #3240smartroadParticipantI just tried
jstest /dev/input/js0
with no controller attached and it was randomly changing the buttons states. Is there a way to make the driver check for connection?Or have I setup something wrong!
11/23/2013 at 14:49 #3242petrockblogKeymasterI think I need to have a look into the sources of the driver. I will report about any progress here!
11/23/2013 at 15:17 #3244smartroadParticipantThanks for the reply :)
I have been reading http://www.gamefaqs.com/snes/916396-snes/faqs/5395 about the protocol for reading the SNES controller. From what I can gather when the latch is sent high (for 12uS) the Data line also goes high, then the Data pulses low for each button pressed on each Clock pulse.
What I was thinking is if the Data pin is held low by a resistor (say 10k) on the socket, when the Pi sends out its latch pulse (when no controller is attached) the Data line wouldn’t go high. Could it use that to indicate that the controller is missing and stop reading the port until the next cycle?
11/23/2013 at 15:18 #3245smartroadParticipantAs a short term fix, how to I configure the software to not install the second port?
11/24/2013 at 18:58 #3270petrockblogKeymasterJust to make sure: Could it be that you have installed the game con driver and SNESDev? They interfere with each other and I strongly recommend to use SNESDev when using the RetroPie GPIO Adapter.
I updated SNESDev this day – you can configure it now via config file, see https://github.com/petrockblog/SNESDev-RPi#configuring-snesdev-rpi.
11/25/2013 at 19:32 #3280smartroadParticipantOops lol
The way I read the instructions I thought you had to have the gamecon drivers to get the SNESDev running!
While the explanation of kernal and user space is interesting, maybe the guide could be updated to have big bold letters for dimwits like me hehe :)
11/25/2013 at 21:55 #3286petrockblogKeymasterAll right, thanks for the feedback! The article has bold letter now ;-)
-
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.