How to enable Reset function in ControlBlock 2.1?
@petrockblog Do you have this function working? Weekend has past and we're still waiting for the update...
@ortsac Sirry for this delay!
I have worked on the reset function as well as on simplifying the installation process.
I have extended the existing reset function for the "snes" game pad type: It also works now out of the box with the RetroArch emulators! You need to update your driver to the latest version. To do so, you can use the new installation script that I have also added some days ago. The README describes its usage at https://github.com/petrockblog/ControlBlockService2/blob/master/README.md#quick-installation.
Preparing the video needs more time than I expected. I will publish it as soon as it is finished, but I hope that you can make progress already with these information!
@petrockblog Help!!! When I entered this command:
git clone --recursive https://github.com/petrockblog/ControlBlockService2.git
I got this error:
fatal: destination path 'ControlBlockService2' already exists and is not an empty directory
I was re-installing your latest driver from a previous installation.
How do I remove the old installation? It seems that the directory is protected and I do not have the permission to delete any of its contents.
@ortsac The uninstallation routines are described in the repository README as well: https://github.com/petrockblog/ControlBlockService2/blob/master/README.md#uninstalling-the-service-andor-the-binary
You can remove the entire folder with the command "sudo rm -rf ControlBlockService2".
Alternatively you can update the ControlBlock service folder with the command "git pull".
The reset button needs to be attached to Player-1, B and not Player-2.
The recent changes in the driver made that necessary.
@petrockblog Success!!! Great job!!! The "Reset" switch function works!!!! Thanks for spending time to get it to work...
Will the "Reset" driver work for all gamepad setups? Or is it exclusive to NES/SNES gamepads?
Glad to hear that we finally solved the issue :-)
For now, the reset button is only active with "snes" (SNES/NES) gamepad types. In case of "arcade" or "mame", all inputs are already used.
Maybe it would make sense to add some sort of button combinations (e.g., start and coin pressed at the same time to trigger a virtual keypress "ESC"). What do you think?
The reset button functionality could also be added to the "genesis" controller, because in that case there are still spare inputs.
@petrockblog The reset button function is dependent upon unused or unconnected control I/O connection on the ControlBlock. However this does not make it universal for all build scenario since some build like "arcade" and "mame" uses all I/O connections.
I know that the ControlBlock uses a microcontroller(MCU). Since it is not open-source I do not know whether there are available connections to the MCU that you can use as terminal connection, like the power switch, for the reset button. This will make the function more universal for all users. Perhaps a redesign of the board (ControlBlock 3?) to use a larger MCU and use quick connect/release connector for the game buttons as well (the terminal block is a pain to use).
@petrockblog It seems the victory dance on the "Reset" button functionality was premature.
My NES/SNES build is simple:
- Case: 1985 NES console
- Game I/O Interface: ControlBlock 2.1
- Game Controller: NES/SNES Gamepad (1 only) using front panel Player connectors
- Switches: Console Front Panel ON/OFF and Reset switch
- RP1 3 and 5V, 4A power supply housed inside the NES case
- Retropie 4.2 and Comic-Book Theme
- ControlBlock Configuration: SNES with "onegamepad only"
On the original build with the old ControlBlockService2 driver everything was working well except, of course, the "Reset" function of the ControlBlock.
Two days ago, @petrockblog release a new driver for the ContolBlock to fix the non-functioning "reset" button. I updated my build at the time but did not extensively tested its operation until today. Here are my observations:
- Intermittently, when ES boots up, the system will go into the Retropie menu section and hangs. No other button will work but only the Power ON/OFF switch or F4 via keyboard if connected.
- During game play, without pressing the "reset" switch and without pressing SELECT+START on the controller, the system will go into the Retropie menu section and hangs. Again, no other button will work but only the Power ON/OFF switch and sometimes F4 via keyboard if connected but not always.
- None of the games in my build can now be played without hanging-up as in item 2 above.
How do I know that it is the latest ControlBlockService driver that's acting up? I also happen to have a USB SNES game controller, which I do not use in conjunction with the SNES controller. So I reconfigured the service by editing /etc/controlblockconfig.cfg and change the "gametype" to "none". This disables both the NES/SNES controller and the reset function. With the USB controller connected, it becomes active for game play and none of the anomalies and erratic behavior cited above have been observed. All games can be played without premature interruption.
Reset functionality on the ControlBlock is not yet stable or fully debugged.
@ortsac I will take al look into it when I come home this evening. Is it the same in your case when onlyonegamepad is set to false?
@petrockblog Yes. The behavior is the same either way.
@petrockblog What are your findings on this latest issue with the "reset" function? I would like to showcase my build and Retropie to my nephew's bday. Please let me know.
I tested the current version of the driver (c9d0ab3) especially for the gamepad type
snesand "onlyonegamepad" values set to
false. Everything is working as expected: The controllers react as configured and the reset button is also working as intended.
This is the hardware setup that was used for testing - the parts come from an original SNES console:
The SNES controllers are connected to the connectors as described at https://blog.petrockblock.com/gadgets/controlblock-power-switch-game-controllers-and-io-for-the-raspberry-pi/#Using_SNES_Controllers_with_the_ControlBlock.
The reset button is connected to GND and Player 1 - B.
I made a video of that test:
What could be different with your installation? Here is a list of thoughts:
- Unstable wiring: Check the connections
- More than one instance of the ControlBlockdriver is running: You can see this with the
- Old version of the ControlBlock driver: You can always get the latest version of the driver via git with the command
git pullfrom within the ControlBlockService2 folder.
Hope that helps!
What could be different with your installation? Here is a list of thoughts:
Unstable wiring: Check the connections
More than one instance of the ControlBlockdriver is running: You can see this with the top command
Old version of the ControlBlock driver: You can always get the latest version of the driver via git with the command git pull from within the ControlBlockService2 folder
As you have suggested, I will recheck all my connections to the ControlBlock. As I am new to all this, could you please give me the full syntax to the 'top' and to the 'git pull' commands ? Much appreciated.
Show all Running Processing
To see all running processes you can use the
topcommand by executing
topfrom the command line. You get something like this then:
You can exit that screen by pressing
The above screenshot shows one running instance of the ControlBlock driver. Each instance of would have a row on its own.
Update a Git Repository to most Recent Version
Change to the folder to update - in our case via
cd ControlBlockService2. From within that folder execute
git pull. If that executes without an error message you just got the most recent version of the sources.
Thanks. I used the 'top' command and I see only one instance of 'controlblock', but it comes and goes out of the process screen. It is not always shown. Is that normal?
There are a lot of instances of the 'bioset' process though and I do not really know what that is.
@petrockblog After issuing the 'git pull', and executes without error, do I have to recompile?
@ortsac Can you post the output of the
git pullcommand here?
If the sources got updated (when it were not already the newest ones) you need to recompile the driver. You can use the command
sudo ./install.shfor that.
pillbug22 last edited by
Always hate to bring back an old thread to life, but I didn't see a final solution, and I
amwas having a similar situation.
- Using original NES case, front panel LED and buttons
- ControlBlock 2.1
- Power & LED working correctly connected to ControlBlock
- RetroPie, emulators, and original NES controllers working OK
The reset button was the only part not working.
Searching around the web, found multiple people who dropped a RasPi into a NES case before the ControlBlock, so using just the original GPIO pins. All of them had some comments about the LED being wired in a funny way form Nintendo and having to cut part of the board to make a one of the LED wires connect to the metal bracket as a ground.
Got me thinking, so I swapped the +/- wires on the LED pins of the ControlBlock. Now the rest button worked, but not the LED.
My solution was to "cross" the wires on the LED bulb itself. Instead of going straight from the LED bulb into the board, I made the 2 LED wires (on the bulb itself), going into the opposite connection spot than where they originally were on the board.
Now both LED and Reset button are working as I would expect.