If you have a Waveshare game hat, the one with a 4" HDMI LCD display and GPIO joysticks on top that works with RaspberryPi3B/B+, you can configure your Batocera to make it work as follows:
Youtube video demonstration:
Note: This instruction has been tested with Batoceria 5.25 (batocera-5.25-rpi3-20200309.img.gz)
If WIFI has not yet been set up for your Batoceria, connect it to a LAN cable first instead of using WIFI.
From your PC/Mac, ssh email@example.com (password for the first time login is linux)
If there is no response, you may want to first "ping batocera.local" to see if there is any response.
Otherwise, try to check your router to find out the ip address of your batocera. (e.g. 192.168.1.32)
then type "ssh firstname.lastname@example.org"
type "nano batocera.conf" to edit the configuration
use Control+W Key command to search for "gpio"
Once found, remove the # and change the following lines
press Control+X to save the file.
type "reboot" to reboot.
Note that the HOT key is being assigned to the same pin 4 as the SELECT key. So, select key will also function as the HOT key.
Once rebooted, the buttons on waveshare gamehat should work right away. You will not need to start the systems menu to configure the controllers.
But in case you need, press "START" button to see if you can see the system menu, then select "Controllers Settings". Then select to configure the controller.
You should see "1 gamecontroller detected"
Then go ahead to configure your game controller by pressing the right buttons.
SELECT button will be configured as the hot key.
If the above does not work, then you might have some typo error in the configuration file.
Pls repeat and check again.
You can also check the log file to see whether mk_arcade has been loaded properly by typing this command.
cat /userdata/system/logs/batocera.log | grep mk_arcade
You should see something like this in the log when the mk_arcade driver has been loaded successfully for waveshare game hat
loading module mk_arcade_joystick_rpi args = map=4 gpio=5,6,13,19,21,4,26,12,23,20,16,18,4