Start/Stop Button + GPIO 4-player Controls (Gamecon Driver)
-
Re: Start/Stop Button + GPIO Controls
I´m building a Recalbox inside an old NES case with two original snes ports and two original nes ports and would like to be able to use the original power and reset buttons. I have already set up the controllers and now I would like to add the buttons.Would it be possible to use 4-player gamecon when using Start/Stop reset and led?
There would be a conflict on pin03 and pin05
Player 5 and reset pin on the same GPIO pin. Player 6 and power pin on the same GPIO pin.The two I´m talking about are these:
https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
https://github.com/recalbox/recalbox-os/wiki/Gamecon-controllers-(EN) -
@borndead You can edit the power script and change pins
-
@substring
Thank you that would be perfect. Where do I find the script file to edit?
What pins could I change to? -
@borndead I din't know which pins would ve free once you configured what you need. The script sgould be in /recalbox/scripts
-
@substring said in Start/Stop Button + GPIO 4-player Controls (Gamecon Driver):
@borndead I din't know which pins would ve free once you configured what you need. The script sgould be in /recalbox/scripts
I tried GPIO13 and GPIO19. Reset and power off is working, but power on is not working.
-
@substring
I tried changing back rpi-pin356-power.py to original pins and rewired, then reset, power off and power on is working. Must be something special with pin5 (GPIO3).
Do you know anything about changing the pins of player 5 and 6 on the Gamecon Driver? -
@borndead That would require rewriting the driver itself
-
@substring
That´s what I ended up doing, after a lot of trying I successfully got what I wanted by editing gamecon_gpio_rpi.c and rebuilding the driver.
So now I have 4 gamecon gpio controllers, POWER, RESET and LED!- PIN01 | 5V
- PIN06 | GROUND
- PIN19 | CLOCK
- PIN23 | LATCH
- PIN07 | DATA3 (NES1)
- PIN26 | DATA4 (NES2)
- PIN29 | DATA5 (SNES1)
- PIN31 | DATA6 (SNES2)
The code replace in gamecon_gpio_rpi.c:
/* GPIO pins 0, 1, 4, 7, 29, 31 */
static const int gc_status_bit[] = { 0x01, 0x02, 0x10, 0x80, 0x20, 0x40 };
static const int gc_gpio_ids[] = { 0, 1, 4, 7, 29, 31 }; -
@borndead
Sorry for reliving this issue, but I could not reach the solution you explain.
I have the same problem, I want to connect 4 controls (2 snes and 2 nes) and the power off and reset buttons.
The truth is that I don't know how to rebuild the driver.
In this link is version 1.4 of the driver, it is easier to modify the pins, but my problem is in reinstalling the driver
https://github.com/marqs85/gamecon_gpio_rpi/tree/master/gamecon_gpio_rpi-1.4