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

NES controller not working with New ControlBlock2 build



  • Hi everyone, I'm pretty new to Raspberry Pi and the ControlBlock.

    I have a Pi3 running Retropie 4.3 and am using a ControlBlockV2. This is installed in a NES case w/ the NES 7pin controller connectors wired directly to the control block using the petrockblog.com instructions.

    P1VCC (top right - white NES wire)
    P2VCC (same but P2 port on NES)
    P1P2 latch (3rd down on left - orange NES wire)
    P1P2 clock (2nd down on left - red NES wire)
    P1 data (bottom left - yellow NES wire)
    P2 data (same but P2 port on NES)
    .....
    P1 ground (top left - Brown NES wire)
    P2 ground (same but P2 port on NES)

    With my only NES controller plugged into the P1 port:
    When running jstest /dev/input/JS0, i get the following no matter if I am pushing buttons or not:
    Axes: 0:-32767 1:-32767 Buttons: 1: on 2:on 3:on 4:on 5:on 6:on 7:on

    I get the same for JS1, even w/o having anything plugged into the NES P2 port. I can move the controller around and unplug and still get the same for all jstest. Both JS0 & JS1 are listed as SNES controllers when I run jstest so I believe the config is fine.

    Retropie is detecting additional controllers when I only have my keyboard plugged into the USB. Plugging in the NES controller into either port or unplugging makes no difference to what Retropie detects. I cannot map w/ the NES controller in Retropie (holding buttons does nothting).

    My power button and LED (from the NES) are working as they should so that part of the controlblock is fine. Retropie is working w/ my keyboared & an 8bitdo bluetooth controller. I have tried using GPIO pin 2 (5V) for the VCC instead of the Controlboard and get the same results. I have double checked my wiring vs the schematic and also used a multimeter to check continuity of each pin from the controller side of the NES port to the top of the screws on the ControlBoard to make sure everything is connected.

    When I installed the ControlBoard drivers I didn't have any controllers plugged into the NES ports. Problem?

    I don't know enough about how the NES controllers work to troubleshoot any farther and am stuck.

    Thanks,
    -Sledrunner21


  • Global Moderator

    Can you please post a photo of your hardware setup here?

    The ControlBlock driver always shows two gamepads, it does not matter if they are physically attached or not, so that is as expected. Also, it is no problem that you did not have any controllers plugged in during the driver installation.

    Did you adapt the config file in /etc/controlblockconfig.cfgaccordingly?



  • Hardware:
    alt text

    I tried checking the config again, but now there is no text! Not sure what happened as it was fine before and I was able to delete "arcade" and type "snes" into to config previously.
    alt text

    These are the commands I use to get to the config:
    cd ControlBlockService2
    sudo nano /ect/controlblockconfig.cfg

    The power button is still turning the RP3 on and off like it should and the LED is working still.

    Thanks,
    -Sledrunner21



  • Using imgur to host the photos now. Thx



  • I have the exact same problem currently, and it does seem like it's a software problem.

    I have currently TWO Raspberry Pi with ControlBlocks that functioned perfectly up until I tried upgrading to RetroPie v.4.4 and latest ControlBlockService.

    Setup is as follows:

    Unit 1:
    Raspberry Pi 3B+
    ControlBlock v. 2.1
    NES controllers wired according to guide

    Unit 2:
    Raspberry Pi 3B
    ControlBlock v. 2.1
    NES controllers wired according to guide

    With my old setup using a RetroPie from approx 1.5-2 years ago it functioned just perfect, and I just tried an old backup image of the card that also worked fine. But when doing a clean install all I get is the same problem with all Buttons considered "ON" no matter if I push them or not. Nothing is responding in EmulationStation.

    So I believe this must be some kind of error in either ControlBlock2 build or last RetroPie.


  • Global Moderator

    Thanks for the photos.
    In the meantime, I found that there was a bug introduced with the recent driver update. This affects the SNES gamepad type. It will be fixed until tomorrow! Sorry for that!


  • Global Moderator

    I have just released an update for the ControlBlock driver. SNES controllers should work again! Does this solve your issue?



  • @petrockblog Thank you! I will check that out tonight. Awesome support!



  • Unfortunately it seems to be another error in the code right now, I am unable to compile the source:

    [ 74%] Building CXX object src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/SNESGamepad.cpp.o
    /home/pi/ControlBlockService2/src/controlblock/gamepads/SNESGamepad.cpp: In member function ‘virtual void SNESGamepad::update()’:
    /home/pi/ControlBlockService2/src/controlblock/gamepads/SNESGamepad.cpp:79:33: error: redeclaration of ‘IDigitalIO::DIO_Level_e resetLevel’
    IDigitalIO::DIO_Level_e resetLevel = digitalIO.getLevel(IDigitalIO::DIO_CHANNEL_P1_A);
    ^~~~~~~~~~
    /home/pi/ControlBlockService2/src/controlblock/gamepads/SNESGamepad.cpp:66:33: note: ‘IDigitalIO::DIO_Level_e resetLevel’ previously declared here
    IDigitalIO::DIO_Level_e resetLevel = digitalIO.getLevel(IDigitalIO::DIO_CHANNEL_P1_B);
    ^~~~~~~~~~
    src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/build.make:134: recipe for target 'src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/SNESGamepad.cpp.o' failed
    make[2]: *** [src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/SNESGamepad.cpp.o] Error 1
    CMakeFiles/Makefile2:739: recipe for target 'src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/all' failed
    make[1]: *** [src/controlblock/gamepads/CMakeFiles/controlblock-gamepads.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2


  • Global Moderator

    Thanks for the hint. That is fixed now.

    You can call wget -O - https://raw.githubusercontent.com/petrockblog/ControlBlockService2/master/install.sh | sudo bashto reinstall the driver.



  • Hi, I'm still having the same problem w/ the jstest showing all the controller buttons on all the time. I don't think I'm installing the updated driver properly. I'm sure this is real basic but I struggle when I don't have a line-by-line example to follow.
    alt text

    There is a vertical line towards the end of the following command:
    wget -O - https://raw.githubusercontent.com/petrockblog/ControlBlockService2/master/install.sh | sudo bash

    I get a ~ instead of the | when typing into raspberrypi. I then get the following:
    wget -O - https://raw.githubusercontent.com/petrockblog/ControlBlockService2/master/install.sh ~ sudo bash
    alt text

    I also tried it as two separate commands:
    wget -O - https://raw.githubusercontent.com/petrockblog/ControlBlockService2/master/install.sh
    sudo bash -------this changed the directory, otherwise looked similar to the other attempt

    I checked my config again:
    alt text

    Thanks for the help!



  • I am now able to compile and install the driver, however I do not get all buttons functionable anymore. I tried this on two different units that has been functioning with the exact same wiring before, so I am confident it's not a problem with wiring.

    pi@retropie:~ $ jstest /dev/input/js0
    Driver version is 2.1.0.
    Joystick (ControlBlock SNES Gamepad) has 2 axes (X, Y)
    and 8 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart).
    Testing ... (interrupt to exit)
    Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:off 4:on 5:on 6:on 7:off

    This is the output I get from jstest, and as seen here only button 3 (B on a NES controller) and 7 (Start on a NES controller) as well as the axes are responsive. The rest is in a constant "on"-mode.

    The /etc/controlblockconfig.cfg is edited to interpret the controllers as SNES-controllers and both units worked before trying to upgrade.

    It seems like the unit is also very slow in reaction but that could be the jstest command not registering very fast. I haven't moved forward to installing any games before the control-issues are solved. :)



  • @hravnkel said in NES controller not working with New ControlBlock2 build:

    I am now able to compile and install the driver, however I do not get all buttons functionable anymore. I tried this on two different units that has been functioning with the exact same wiring before, so I am confident it's not a problem with wiring.

    pi@retropie:~ $ jstest /dev/input/js0
    Driver version is 2.1.0.
    Joystick (ControlBlock SNES Gamepad) has 2 axes (X, Y)
    and 8 buttons (BtnA, BtnB, BtnX, BtnY, BtnTL, BtnTR, BtnSelect, BtnStart).
    Testing ... (interrupt to exit)
    Axes: 0: 0 1: 0 Buttons: 0:on 1:on 2:on 3:off 4:on 5:on 6:on 7:off

    This is the output I get from jstest, and as seen here only button 3 (B on a NES controller) and 7 (Start on a NES controller) as well as the axes are responsive. The rest is in a constant "on"-mode.

    The /etc/controlblockconfig.cfg is edited to interpret the controllers as SNES-controllers and both units worked before trying to upgrade.

    It seems like the unit is also very slow in reaction but that could be the jstest command not registering very fast. I haven't moved forward to installing any games before the control-issues are solved. :)

    Hi, I have exactly the same issue. The Controlblock worked perfectly until I upgraded my build with a Pi 3b+ and used the 4.4 Image (Previously Pi 3b & 4.3).


  • Global Moderator

    Strange, I will test this on my side with a complete hardware setup and fresh RetroPie 4.4!



  • Hi,
    Im using a old SNES case with Pi3 and Controlblock version 2.1 some time without any Problems.
    Now i also has a similar problem after updating Retropie from 4.3 to 4.4.

    After setting the controblock config to "SNES" Button 1 and 6 on controler port one (js0) are always "on". Controler port two (js1), Power switch and reset button works fine.

    Im made a few tests:

    • I've also testet it with a new Retropie 4.4 Image without update. Exact the same issue.
    • I'm also getting exact this signals without any wires on the controlblock beside the power switch.
    • I'm set the controlbock config to "arcade" according to the Tutorial to check all pins seperat - with success. The Hardware seems fine.

    I'm also noticed that the default controlblock.cfg has no "genesis" entry like the readme on github.

    I hope you can fix this problem.
    Thanks for all the great work.



  • I am having the EXACT same issue as Herzog.
    I actually performed the exact same tests as well before checking this thread, and had the exact same results.


  • Global Moderator

    There was a bug with a recently added additional virtual keyboard button, which is fixed now (finally). Sorry for this bug!

    You can attach any momentary buttons on Player 1 A or B. Pressing the buttons will lead to a simulated press of the ESC or the F1 key.



  • Thanks for your fast response! I will test it the next few days.



  • Thank you for the amazing turn around time! I reinstalled the driver, and everything is working perfect again.



  • Nope...
    After reinstallation of the driver I still have the same problem like Hravnkel.
    Setting: RPI 3b+, 4.4 Image, Controlblock2, SNES Controller.
    Gamepadtype is configured as "snes".
    The powerswitch function works well but if I want to configure the input just the "B" button is recognized...



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.