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

Connecting NES original socket to Raspberry Pi 3b



  • Hi guys,

    I'm trying to connect my NES sockets (original) to my raspberry pi 3B but somehow the sockets don't get detected by retropie. Steps i've done (i'm using a breadboard btw for testing):

    I'm using this image as pin mapping:
    0_1490731508148_pi3_gpio.png

    I'm using this as reference for the pin out on the socket print:
    alt text

    1. I've connected the 3.3V and GND to the + and - of the breadboard
    2. I've connected the white cable coming from the NES socket to the + (3.3V pin 01)
    3. I've connected the brown cable coming from the NES socket to the - (GND pin 06)
    4. I've connected the yellow (gelb) cable from the NES socket to GPIO2 (pin 03)
    5. I've connected the orange cable from the NES socket to GPIO26 (pin 37)
    6. I've connected the red (rot) cable from the NES socket to the GPIO13 (pin 33)

    After doing this I installed the gamecon_gpio_rpi driver through the manage packages menu in retropie following the retropie guide here:
    https://retropie.org.uk/docs/GPIO-Modules/

    Here are the photo's of the cables connected through the breadboard:

    0_1490732115096_20170328_221121.jpg

    0_1490732169583_20170328_221138.jpg

    So am i connecting the wires wrong or is my controller / socket broken?

    Thx!



  • Right so I figured I was looking at the picture wrong since it's only 26 pins in the example of retropie instead of 40 pins I have on the Raspberry Pi 3. I just installed the adafruit prototyping plate kit:
    https://www.adafruit.com/products/801

    And installed the wires like this:

    1. NES socket white cable to 3.3V
    2. NES socket brown cable to GND
    3. NES socket red cable to MOSI
    4. NES socket orange cable to SCLK
    5. NES socket yellow cable to SDA

    Still retropie doesn't detect the NES gamepad through the socket :(



  • So was looking at the documentation and came across this....just to confirm did you do the following?:

    • Add the text gamecon_gpio_rpi to the file /etc/modules then save the file. This loads the driver on boot.

    • Add the text options gamecon_gpio_rpi map=#,#,#,#,#,# to the file /etc/modprobe.d/gamecon.conf. This configures the driver. (What does your command look like in the gamecon.conf file?)

    If you confirmed everything looks good, then theres a probability that your gamepad might not work with 3.3V and thus have to look into supplying it with 5V by either of the latter two bullets:

    Q: NES pads only report A-button correctly, or do not react at all

    A: NES controllers are designed to be used with 5V supply, and are not guaranteed to work directly with 3.3V supply. Based on various reports, pads tested seem to fall into 3 categories:

    • Fully 3.3V compliant. The pads falling into this category can be powered directly from 3.3V supply as described above, and do not need any extra hardware.

    • 3.3V logic level compatible. These pads need to be powered from 5V supply (pin P1-02 on the RPi pin header) for correct operation, but RPi output pins (NES_CLK, NES_LTC) can be directly connected to corresponding pad input pins. A protection circuit is strongly recommended between pad output data pin and RPi input pin (PAD1-4), since output logic level is now 5V and input pins are not 5V-tolerant. The clamp circuit can be built from a 3.3V zener diode and ~200ohm resistor. Alternatively, a logic IC such as 74LVC245 can be used for level conversion.

    • Only 5V compliant. Otherwise same as previous, but NES_CLK and NES_LTC must be converted to 5V logic level to be recognizable by the pad. That can be done with 74HCT244 - see this post for more info.



  • @iggy I only installed the driver through the manage packages menu following the steps in this guide and rebooted:
    https://retropie.org.uk/docs/GPIO-Modules/

    I forgot to check the FAQ below the manual I must say (was kinda late last night). Anyways the controller doesn't respond at all but i'll check out the configuration once I get home. I remember that I made one mistake connecting the + to the 5.5V on the breadboard once thus connecting the NES socket to the 5.5V could that do any harm to the raspberry pi?



  • Hmmm hard to say....it quite possible. If you connected 5.5v to the controller then it might have indirectly sent 5.5v to the 3.3v data pins. Only way to really know if they still work is to make those pins (GPIO 2, 13, 26) input pins via a quick python script and hook up a button to see if you get any response. Make sure to use a ~10k pull up/down resistor when testing. Use this as a guide:

    http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/buttons_and_switches/



  • Right so I checked my gamecon.conf and it was wrongly configured it's now:
    0,0,0,0,2,0

    This works but it doesn't detect the gamepad on 3.3V and only the A button on 5V (with the clamp circuit). So I guess I have to order the 74HCT244 and see if that will work :)



  • Right so i've got a 74HCT244 and hooked it up, but still only the A button is working. I checked on my original NES if the controller is functioning and it's working fine so it's not the controller. What I did:

    1. NES socket white wire on +5V of Raspberry Pi 3
    2. NES socket brown wire on GND of Raspberry Pi3
    3. NES socket yellow wire through the clamp circuit on PAD 1 of the Raspberry pi3
    4. NES socket orange wire on the 74HCT244 port 18
    5. NES socket red wire on the 74HTC244 port 16

    Then I've hooked up the 74HCT244 as follows:

    1. port01 on 74HCT244 is connected to the GND of the Raspberry Pi 3
    2. port02 on 74HCT244 is connected to the GPIO10 of the Raspberry Pi3
    3. port04 on 74HCT244 is connected to the GPIO11 of the Raspberry Pi3
    4. port10 on 74HCT244 is connected to the GND of the Raspberry Pi3
    5. port20 on 74HCT244 is connected to the +5v of the Raspberry Pi3
    6. port18 on 74HCT244 is connected to the orange wire of the NES socket
    7. port16 on 74HCT244 is connected to the red wire of the NES socket

    Is it a problem that the NES socket i'm trying to connect to is still attached to the original circuit board from my french NES (the small circuit board which has the colored wires attached to it?)

    This is the chip I got:
    http://www.datasheet.hk/view_download.php?id=1241663&file=0138\m74hct244ttr_1270896.pdf



  • @Tripwire I haven't done what you are doing myself, just looking at the guide, so keep that in mind.

    You said that you connected the, 'NES socket yellow wire through the clamp circuit on PAD 1 of the Raspberry pi3.'

    Looking at https://retropie.org.uk/docs/GPIO-Modules/.... mid-way down, it has this blurb:

    IMPORTANT: Gamepad1 & Gamepad2 are only available on the Raspberry Pi B. Future versions of the Raspberry Pi have hidden these GPIO connections, i.e. no physical pin exists. If you are using a Raspberry Pi B+, 2 or 3 you will NOT use Gamepad1 or Gamepad2 connections and they must be assigned ‘0’ as their controller type in the gamecon.conf file

    I don't know if this will help any, but good luck with your project!



  • @Tripwire Also, if you think that your controller isn't 3.3V compliant (like Iggy mentioned), I'd suggest finding a 3.3V compliant controller vs trying to add extra hardware, unless if you have experience in doing so. If you do decide to add the extra hardware, just be mindful of static electricity, you could easily destroy your chip if you aren't careful.



  • This post is deleted!


  • @Wulf

    Your totally right! Should've figured that out myself! I'll put the data wire on pad 3 and change my cfg I'll let you know if it works :)



  • So i've switched to the Pad 3 pin on my Raspberry Pi 3 (GPIO4) and it's still not working... It again recognizes the A button being pressed but that's it nothing more. I've used the Clamp circuit again as that is the only way I got retropie to actually recognize the NES gamepad at all. I've tried using the 74HCT244 bit shifter but that doesn't help as well. I've now ordered 2 second hand original NES controllers to see if those work. Otherwise maybe the NES sockets i'm using are broken, or maybe the circuitry that is attached to the NES socket is broken...



  • So i've finally got further with this issue. I've removed retropie from my SD card and reinstalled it. Added the correct driver and set every GPIO pin in de conf file to 2 so my config now looks like this: gamecon_gpio_rpi map=0,0,2,2,2,2
    Interesting enough now all of my controllers seem to work without the 5v mod or extra wires whatsoever. I've attached the NES pad to the PAD 4 pin. The only thing not working right now is in-game. The NES controller works in the menus of retropie and emulation station but not in an actual NES game. Going to figure that out next!



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.