Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Solved: Setting up Gamecon driver with psx controller



  • 3/3/17 Update: This topic has been solved! Turns out I had the wrong diagram for the PSX controller. The correct ones are the following two pictures:

    alt text
    And here is my wire diagram:
    alt text
    With gamecon_gpio_rpi map=0,0,7,0,0,0 in /etc/modprobe.d/gamecon.conf.


    Hey guys I've run into an issue and I was wondering if anyone could help me.
    I've got a Pi B Rev 2 board I'm using as a test bench running RetroPie 4.1.14.
    I've installed the gamecon driver via RetroPie-Setup script and followed the wiki page here https://github.com/retropie/retropie-setup/wiki/GPIO-Modules. I checked /etc/modules and saw that gamecon_gpio_pri was added. I created a new file /etc/modprobe.d/gamecon.conf and since I am using the rev 2 board and a PSX controller I entered options gamecon_gpio_rpi map=0,0,7,0,0,0 I saved and exited and rebooted.

    I then connected
    physical pins on pi----------PSX Pins
    1, 3.3V---+ 4.7K resistor+---5, VCC
    7, Pad 3------------------------1, Data
    6, GND-------------------------4, GND
    8, PSX_CMD------------------2, Command
    10, PSX_SEL------------------6, Attention (All pinouts say this but the Wiki says PSX_SEL meaning Select?)
    12, PSX_CLK------------------7, Clock

    I also put a 4.7K resistor between 3.3V and VCC.

    After that I start emulationstation and when I go to configure input am not able to press any key on the controller for it to be detected. It says there is one device found but I'm assuming it is the keyboard that I also have attached.

    Is there something I'm doing wrong or a step I'm missing? From the wiki it seems like there is a void as to what happens next.



  • @geneworld im not sure why you are putting a resistor between 3.3 and the vcc on the controller. A psx controller ran on 7.5 volts. You are giving it less than 3.3v using that resistor. You need to use the 5v with no resistor.



  • I followed the Wiki in the link posted above. It talks about this point in the FAQ section on the bottom

    "•Q: PSX pads do not operate reliably or at all

    •A: GPIO pins P1-07 and P1-26 do not have on-board pullup resistors which are required for reliable operation with PSX/PS2 pads. Connect an external pullup resistor (1.8k-4.7k) between the pin and 3.3V (P1-01) if you use it with PSX/PS2 pad."



  • @geneworld so putting a resistor in between 3.3v on the pins and vcc on the controller is wrong. It means some other pin on the controller is going to whatever gpio pin plus 3.3v with a resistor in between that controller pin and the 3.3v. All you did was lower the voltage.



  • @edmaul69 The controller runs on 3.3V its the vibrate motor that runs on 7.5V http://store.curiousinventor.com/guides/PS2



  • @geneworld and looking at what you have you need a resistor in between 3.3v on the gpio and data on the controller. It says to put on pin 7 (data) and pin 26 (not sure if you even are using that pin)



  • @geneworld here is how it needs to be wired:

    physical pins on pi----------PSX Pins
    1, 3.3V--------------------------5, VCC
    1, 3.3V---+4.7k resistor+---1, Data
    7, Pad 3------------------------1, Data
    6, GND-------------------------4, GND
    8, PSX_CMD------------------2, Command
    10, PSX_SEL------------------6, Attention (All pinouts say this but the Wiki says PSX_SEL meaning Select?)
    12, PSX_CLK------------------7, Clock



  • @edmaul69 Well that's something that I misread! Was trying to set this up at 2am so I must have read it wrong! Haha



  • @edmaul69 I'll have to try that when I get home from work , that's for catching my mistake!



  • @geneworld no problem. Glad to help.



  • Ignore this post



  • Well I went home lastnight and made the adjustment with the resistor and that didn't work wither. I then changed /etc/modprobe.d/gamecon.conf to options gamecon_gpio_rpi map=0,0,0,0,7,0 so that I could use game pad 5 and not have to worry about any resistors. I changed my wiring to
    physical pins on pi----------PSX Pins
    1, 3.3V--------------------------5, VCC
    3, Pad 5------------------------1, Data
    6, GND-------------------------4, GND
    8, PSX_CMD------------------2, Command
    10, PSX_SEL------------------6, Attention (All pinouts say this but the Wiki says PSX_SEL meaning Select?)
    12, PSX_CLK------------------7, Clock

    and rebooted with nothing changing.

    I did notice however that on bootup I can turn on the analog led on the ps2 controller on but after the pi boots further the led goes off. I thought it could have been a power issue but nothing changed when I tried several varying power supplies.

    I seem to be at a stand still now. Has anyone got this working or further suggestions?

    I noticed that if I change to options gamecon_gpio_rpi map=0,0,0,0,7,7 When I got into configure inputs in emulationstation and it says there's 2 inputs connected, so the driver is working?



  • From what I understand, you will need the resistor no matter which pad # you plug into. I use a 4.7k ohm resistor between 3.3V and the "Data" line, as well, and everything works great for me.

    Can we get a picture of your setup?



  • @Katemonster Yeah I'll snap a pic tonight after work



  • Hi there,

    I have almost the same problem. Using Rpi3 (with controlblock) and trying to connect a PS2 controller to the GPIO.
    Connected as follows:

    RPI:------------------------PS2
    P1-01 (3.3V) ==== 5 (power/3.3V)
    GPIO14 ---> 2 (command)
    GPIO15 ---> 6 (select)
    GPIO18 ---> 7 (clock)
    GPIO02 <--- 1 (data)
    P1-06 (GND) ==== 4 (ground)

    see GPIO numbers GPIOs

    Here is a pic from my setup:
    alt text

    I can configure the driver to PSX Controller, that is working fine, but when i test the controller, no input is registered.

    I also tried my N64 controller some time ago (its the same driver) and got no signal either.

    Someone any Idea how to fix that?



  • @Jeddo First off, I don't see pull-up resistors in that picture. Are there some integrated into the controlblock? I don't know anything about how that thing functions.

    Secondly, try removing the controlblock from the equation, and hook directly to the Pi. What happens? Also, test the controllers and make sure the analog light comes on when pressed. If not, likely you don't have the power and ground hooked up properly. My problem was always that I counted the pins on the controller backwards. If it's not powering on, that could be the cause.



  • @Katemonster the controlblock should not affect the gpio. It's working for the db9_gpio_rpi driver without any problems. But I will check it without it.
    Regarding the pullups: I always assumed that I don't need those because RPi 3 has internal ones on every pin?! Maybe that's wrong and I need the pullups.
    Controller has power so that is working.



  • Yes you need the pull ups. The driver doesn't try to use any internal pull up resistors because the internal ones are not powerful enough to sway the PSX bus.



  • @Katemonster ok thanks that could explain why my N64 controller isnt working, too. I will try that. Thank you for your help!



  • I don't know how the N64 controller works. I can only speak for the PSX controller, which needs the pull-up resistors.



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.