If you want to build your arcade with a Raspberry Pi, you can add extra buttons and assign them to special functions. Here's how it works.
On a Raspberry Pi, you have several GPIO ports, from GPIO2 to GPIO26:
When you want to connect a button, you must connect it between a GPIOxx port and a GND port. Please note that GPIO numbers are used, not PIN numbers (1 to 40)!
/recalbox/share/system/recalbox.conf
:# Uncomment to enable custom GPIO script feature
system.rpi.gpio=enable
/recalbox/share/system/configs/retroarch/retroarchcustom.cfg
file and add this line:network_cmd_enable = true
/recalbox/share/system/configs/rpi-gpio.ini
(see the available commands below).You have to start with [GPIOxx] and replace xx
by the GPIO number in question.
Then add these 4 lines :
quick=
standard=
hold=
release=
quick
is an action that will be performed if you press and release the button quickly.
standard
is an action that will be performed if you hold and release the button for about 1 second.
hold
is an action that will be performed if you hold the button for a long time (more than 2 seconds).
release
is an action that will be executed if you release the button after a hold
event.
All actions are optional. If you don't want to assign a function, just leave a blank after =
.
Example:
[GPIO26]
quick=VOLUP
standard=VOLDOWN
hold=VOLMUTE
release=
[GPIO16]
quick=RESET
standard=QUIT
hold=
release=