Homepage Forums RetroPie Project Everything else related to the RetroPie Project How to disable second joystick on GPIO adaptor if no controller connected?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #3239
    smartroad
    Participant

    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?

    #3240
    smartroad
    Participant

    I 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!

    #3242
    petrockblog
    Keymaster

    I think I need to have a look into the sources of the driver. I will report about any progress here!

    #3244
    smartroad
    Participant

    Thanks 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?

    #3245
    smartroad
    Participant

    As a short term fix, how to I configure the software to not install the second port?

    #3270
    petrockblog
    Keymaster

    Just 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.

    #3280
    smartroad
    Participant

    Oops 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 :)

    #3286
    petrockblog
    Keymaster

    All right, thanks for the feedback! The article has bold letter now ;-)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.