To add more info in general:
The software consists of a loadable kernel module for interfacing to the Piboy controls. This is normally installed via DKMS. However it can just be build directly using make (needs an appropriate make file for building a lkm of course). Building also requires the Linux Kernel Headers which I assume would be available to anyone customizing Batocera?
The software also consists of an executable called OSD. This is compiled for arm7 and should work on any 32bit RPi Linux. It uses Dispmanx for on screen display and also incorporates some of the safe shutdown code.
The third part is a systemd service that just watches for a software shutdown. If that happens it kills the lkm which indicates to the Piboy the Pi has shutdown so Piboy will then automatically shutdown.
That is about it. If anyone wants to take up this project I am available at email@example.com for any questions. If not, I will eventually get to this as well, probably in couple months.