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

js2 & js3 controlled by same controller



  • I have a Raspberry Pi 4B with original power supply and heatsink + ventilators.
    I recently bought 2 ControlBlock's from Petrockblock, to use 2 NES controllers and 2 SNES controllers.
    Seperatly they work great. Also the powerswitch + led are working.
    Only when I stack both boards on each other, I had some problems.

    The latest problem I have and I can't figure out what's wrong:
    js0 & js1 (NES) are working.
    js2 & js3 (SNES) are both controlled by the same controller-port (already switched the 2 controllers from the different ports)
    So I have one controller which uses both js2 & js3

    I've checked multiple times the connections to the control-board, so this doesn't seems the issue...

    Underneath I'll explain what I've done from the start untill where I'm now:

    First Hardware configuration:

    • SNES ControlBlock with power switch, LED and 2 controllers (both working), jumpers SJ1:0, SJ2:0
    • NES ControlBlock with 2 controllers (both working), jumpers SJ1:1, SJ2:0

    First (small) problem I had was when I connected the NES controllers to the second board. The config file didn't mention the possibility to put the controller to NES. I think it works though, but to be sure, I changed the NES controller board to the first. Changed the config (JS and controller)
    -> If this isn't a problem, maybe change the config text

    After reboot I had issues with the power switch. Even though I had bent the neccesary GPIO pins, the Pi still was booting and directly shutting down. Because it worked with the other board as power-board, I've changed the hardware that the first board also has jumpers SJ1:0, SJ2:0.
    -> It's possible that this wasn't really an issue, because when I tried some other stuff to fix the last option, I had the same thing when I changed the config and did a shutdown from the emulationstation-menu

    New (and still) hardware configuration:

    • NES ControlBlock with power switch, LED and 2 controllers, jumpers SJ1:0, SJ2:0
    • SNES ControlBlock with 2 controllers , jumpers SJ1:1, SJ2:0

    As mentioned earlier, the power works fine, and controllers 1 - 3 are recognised, only controller 4 is the same as controller 3.

    I've also tested what it would do when I changed the config and set all the controllers as SNES, but still the same result...

    I dont't know if I've given all the info you want, so ask and I'll add an update

    Anyone some ideas?



  • Update: even a fresh re-install of the complete retropie didn't do the trick... (format + clean image)
    Is this a valid hardware-configuration or did I miss something in the install/configuration-file?

    Is it possible that the board isn't working as it should be?


  • Global Moderator

    Ok, I have prepared a 4-player hardware setup with a Raspberry Pi 4 at my site now with the most recent version of RetroPie (4.6).

    The lower ControlBlock has jumper configuration SJ1:1 SJ2:0;
    The upper ControlBlock has jumper configuration SJ1:0, SJ2:0.

    The USB micro power is connected to the lower ControlBlock, as is the power switch.

    I have installed the ControlBlock driver with the RetroPie setup, but the instructions for directly installing the driver as given at https://github.com/petrockblog/ControlBlockService2/tree/bugfix/powerswitch-broken#quick-installation should also work.

    With this arcade configuration (/etc/controlblockconfig.cfg) all four controllers are working as expected:

    {
            "controlblocks" : [
                    {
                            "enabled" : true,       
                            "address" : {          
                                    "SJ1" : 0,        
                                    "SJ2" : 0         
                            },
                            "gamepadtype" : "arcade", 
                            "onlyOneGamepad" : false, 
                            "powerswitchOn" : true    
                    },
                    {
                            "enabled" : true,         
                            "address" : {              
                                    "SJ1" : 1,        
                                    "SJ2" : 0         
                            },
                            "gamepadtype" : "arcade",   
                            "onlyOneGamepad" : false  
                    }
            ]
    }
    

    BTW: Thanks for pointing out the missing configuration items. I have updated the README and default configuration file now.

    Could you try and see if you can reproduce my observations with this arcade configuration? You would only need to change the gamepad types to arcade and connect ground with any input pin to see if the corresponding arcade button is working.

    Another idea: The ControlBlock driver creates a log file at /tmp/controlblock.log. Could you copy and paste its contents here?



  • Hey Florian,

    I've made the 4-player setup with the controlblock configured as arcade-gamepad.
    Everything is the same as you discribed, unless the jumpers:
    The lower ControlBlock has jumper configuration SJ1:0 SJ2:0;
    The upper ControlBlock has jumper configuration SJ1:1, SJ2:1.

    I've tested all the connections in arcade mode and every button works fine.
    So it looks like the connection to the RPi is working well...

    The log-file is copied after I've done the arcade-mode testing, but it doesn't look strange (to me).

    2020-05-29 17:14:50.441 DEBUG [467] [Logger::logMessage@18] Starting ControlBlock driver.
    2020-05-29 17:14:50.448 DEBUG [467] [Logger::logMessage@18] Created configuration. isEnabled: true, address: 0, pad type: arcade, power switch: true, only one gamepad: false
    2020-05-29 17:14:50.449 DEBUG [467] [Logger::logMessage@18] Created configuration. isEnabled: true, address: 6, pad type: arcade, power switch: false, only one gamepad: false
    2020-05-29 17:14:50.504 DEBUG [467] [Logger::logMessage@18] Enabled power signal.
    2020-05-29 17:14:50.504 DEBUG [467] [Logger::logMessage@18] Created PowerSwitch. doShutdown: 1
    2020-05-29 17:14:50.504 DEBUG [467] [Logger::logMessage@18] Starting gamepad polling ... 
    
    

    I've also taken a copy of the log-file when in NES/SNES-mode, this one you can see below:

    2020-05-29 17:10:43.833 DEBUG [457] [Logger::logMessage@18] Starting ControlBlock driver.
    2020-05-29 17:10:43.841 DEBUG [457] [Logger::logMessage@18] Created configuration. isEnabled: true, address: 0, pad type: nes, power switch: true, only one gamepad: false
    2020-05-29 17:10:43.841 DEBUG [457] [Logger::logMessage@18] Created configuration. isEnabled: true, address: 6, pad type: snes, power switch: false, only one gamepad: false
    2020-05-29 17:10:43.881 DEBUG [457] [Logger::logMessage@18] Enabled power signal.
    2020-05-29 17:10:43.881 DEBUG [457] [Logger::logMessage@18] Created PowerSwitch. doShutdown: 1
    2020-05-29 17:10:43.881 DEBUG [457] [Logger::logMessage@18] Starting gamepad polling ... 
    
    

  • Global Moderator

    @KSack Ok, thanks for that. I agree, the logs do not look strange. Also, good to hear that Arcade is working.
    Now we can focus on the NES/SNES controllers part.

    Do you have two NES controllers attached to one ControlBlock and the two SNES controllers attached to another ControlBlock?
    Or one NES and one SNES controller on one ControlBlock?

    I will try and reproduce the exact same behaviour here then.



  • @petrockblog
    Both controllers are connected to one ControlBlock, so 2 NES to one ControlBlock, 2 SNES to the other ControlBlock.
    I've also tried to change the position: NES top, SNES bottom / SNES top, NES bottom.
    Also I've tried to connect with only the 2 controllers I wanted to test at a time, so only the SNES testing, then unplug SNES controllers and only the NES controllers testing. (with off/on of the RPi)

    When using only 2 controllers, it works fine, so I know the controllers are working as they should do... (these are originals, but I don't think that's a case)

    I hope you can figure it out!



  • @petrockblog
    Is it possible that one (or both) ControlBlocks don't work as they should or do you think it's a firmware issue because of the relatively new RPi4? I suppose that the HW-configuration wasn't tested yet, because of the new RPi4?


  • Global Moderator

    Ok, I did some tests myself. "Unfortunately", I am not able to reproduce it. Here is my hardware setup:

    • I am using a Raspberry Pi 4.
    • Two ControlBlocks stacked upon each other.
    • The lower one has solder jumper configuration SJ1=1, SJ2=0.
    • The user one has solder jumper configuration SJ1=0, SJ2=0.
    • Power button, USB micro, status LED are connected to the lower ControlBlock.
    • The two signal pins (GPIO pins 11 and 12) from the lower ControlBlock are removed so that the upper ControlBlock is not affected by the power signals.
    • The NES controllers are connected to the lower ControlBlock, the SNES controllers are connected to the upper ControlBlock.

    This is the content of /etc/controlblockconfig.cfg:

    {
    	"controlblocks" : [
    		{
    			"enabled" : true,          
    			"address" : {            
    				"SJ1" : 0,           
    				"SJ2" : 0            
    			},
    			"gamepadtype" : "snes",  
    			"onlyOneGamepad" : false, 
    			"powerswitchOn" : true    
    		},
    		{
    			"enabled" : true,       
    			"address" : {             
    				"SJ1" : 1,         
    				"SJ2" : 0          
    			},
    			"gamepadtype" : "nes",   
    			"onlyOneGamepad" : false  
    		}
    	]
    }
    

    With this setup, the SNES controllers connected with the upper ControlBlock are working separately from each other.
    Maybe this gives some new ideas?



  • @petrockblog
    I've done the whole setup just like you did, but I struggled with some things.
    I think (still not 200% sure) I've narrowed the problem to one of the boards, let me explain:

    First of all I've made the whole setup like you did, one board 0,0, the other 1,0. Exactly the same connection with the controllers, SNES on top, NES on the lower board.
    I changed my controlblockconfig.cfg the same way as you described.
    But here was the first thing I noticed: You've put SNES on board 1 with the powerswitch ON, when the NES board was at the bottom. (just to be sure, is this a valid .cfg?)
    I've tried it that way and even the power-on didn't work.
    So I changed the .cfg with the NES on board 1, but it still didn't work.

    After that I've taken all apart and switched the hardware configuration:
    Only the NES board, changed the .cfgagain: power-on didn't work.

    Only the SNES board, changed the .cfg, … , again: power-on worked, jstest worked for both the controllers

    Put the SNES board at the bottom, NES on top, changed the .cfg: power-on worked!
    jstest:
    the 2 controllers at the bottom working fine,
    the 2 controllers at the top both controlled by the same controller

    I've taken some pictures of the hardware configuration and a video of the jstest, but I can't upload them, so I've send them by mail.


  • Global Moderator

    I changed my setup a bit more and was finally able to reproduce the issue!
    After some time I was also able to get to the cause for the strange behaviour - there was a bug in the ControlBlock driver. I am so sorry for that!

    The fix is already pushed and you can a fetch and reinstall the driver!



  • @petrockblog
    YOU ARE THE BEST!
    Updating the driver made it work.
    Thanks a lot for the time you've put into this


  • Global Moderator

    I am so glad to hear that :-)



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.