This device tree overlay removes the need for the userspace daemon retrogame
to process button press on GamePi43, reducing input latency and removes a point of failure (I don't really trust that daemon from Adafruit to be error-free).
To compile the dts, install dtc
and then run
dtc -I dts -O dtb -o gamepi43.dtbo gamepi43.dts
To install the overlay, copy the resulting gamepi43.dtbo
to /boot/overlays/
, and then add
dtoverlay=gamepi43
to /boot/config.txt
.
Remember to delete the retrogame
daemon that is included with the official "driver" of GamePi43 (/usr/local/bin/retrogame
, also remember to delete all instances of retrogame in /etc/rc.local
).
In addition, to make the buttons work with RetroArch emulators, put the following content to /etc/udev/rules.d/10-gamepi.rules
SUBSYSTEM=="input", ATTRS{name}=="GamePi43 GPIO Keypad", ENV{ID_INPUT_KEYBOARD}="1"