Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • smartroad
    Participant
    Post count: 76

    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?

    smartroad
    Participant
    Post count: 76

    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!

    petrockblog
    Keymaster
    Post count: 1827

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

    smartroad
    Participant
    Post count: 76

    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?

    smartroad
    Participant
    Post count: 76

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

    petrockblog
    Keymaster
    Post count: 1827

    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.

    smartroad
    Participant
    Post count: 76

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

    petrockblog
    Keymaster
    Post count: 1827

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.