Recalbox is compiled with the mk_arcade_joystick_gpio
driver which allows you to manage a controller connected directly to the GPIOs of the Raspberry Pi. If you plan to build a Bartop, an arcade cabinet or a portable arcade stick, you don't need to invest in a usb controller.
The driver can handle up to 2 controllers each consisting of a 4-way joystick and 9 buttons.
If you are using an RPi1 revision B, refer to the mk_arcade_joystick
pinout.
Use of GPIO on Raspberry PI 5 is not compatible.
You must use USB encoders to connect your buttons.
Let's take as an example a 7 button panel with this layout:
. ↑ Ⓨ Ⓧ Ⓛ
← → Ⓑ Ⓐ Ⓡ Ⓗ
↓
With
Ⓡ = Right trigger = TR | Ⓛ = Left trigger = TL | Ⓗ = HK = Hotkey
On RPI 1B+, RPI2 and RPi3, you have to connect your buttons following this pinout :
The bottom of the image corresponds to the side of the Raspberry Pi where the USB ports are located.
You can connect your buttons directly to ground, since the driver enables gpio internal pullups.
controllers.gpio.enabled
to 1: controllers.gpio.enabled=1
and you are ready to play!GPIOs are configured out the box in the interface and the different emulated systems.