@elwood69
I happened to encounter the same issues with the latest version of the recalbox.
Like you, I was also trying to read through this forum and follows suggestions from other posts that may work for the version the poster is having, but only to found that I could not make it work in the version of recalbox I am using.
Then I started looking at the logs and checking which script or config file could have caused the issue. I was only able to find what caused the issue after a week of checking.
This issue happens in both the 2018 Xmas beta and the version before that as well.
There is a bug in the boot up script /recalbox/scripts/recalbox-config.sh that did not pass the second parameter in the recalbox.conf file to the mk_arcade_joystick_rpi.ko.
You can ssh into the recalbox and type this command to check what parameters have been passed to the mk_arcade_joystick_rpi.ko module when the /recalbox/scripts/recalbox-config.sh is run.
cat /recalbox/share/system/logs/recalbox.log | grep gpio
If the parameters are correctly passed, you will see something like this (taken from my recalbox with the 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,-1
But if the parameters are not successfully passed, the module will log an error in this log file.
What version of recalbox are you using ?
you can type this command to find out
uname -r
mine is 4.14.62
I also tried my methods below successful with the other package I downloaded (those bundled with game roms)
4.14.62-v7
I made two posts that you can reference, one for my 2.2" TFT + custom GPIO button set up.
https://forum.recalbox.com/topic/16295/recalbox-2018-xmas-beta-using-2-2-tft-lcd-and-gpio-buttons
Another one for the setup for the custom GPIO pins that comes with the waveshare game hat
https://forum.recalbox.com/topic/16307/recalbox-on-waveshare-game-hat
I don't have to load another version of the mk_arcade_joystick_rpi.ko. I just use the one that comes bundled with the version of recalbox released.
Then edit the recalbox.conf to put in the mapping commands.
e.g. for my waveshare game hat I use the following:
controllers.gpio.enabled=1
controllers.gpio.arg=map=4 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1
Then edit the script file (/recalbox/scripts/recalbox-config.sh) to also pass the second parameter to mk_arcade_joystick_rpi.ko.
mount -o remount, rw /
vi /recalbox/scripts/recalbox-config.sh
While in Vi Search for the line with extra2=“$4” using the command /extra2=“ , then press ENTER and a to add a line after it.
extra3=“$5”
Then Search for the line with map="$extra2” using the command /map=“
Then change it to
map="$extra2 $extra3”
After that, reboot the recall box to take effect of the changes by typing
shutdown –r now
If you just want to test if it works before changing all the files, you can SSH into your recalbox, then manually load the mk_arcade_joystick_rpi.ko module with the parameters for the custom GPIO pins using the following commands:
#unload the GPIO controller module
rmmod mk_arcade_joystick_rpi
#load it with the custom gpio mapping of waveshare game hat,note replace 4.14.62 with the version name you found in command 'uname -r'
insmod /lib/modules/4.14.62/extra/mk_arcade_joystick_rpi.ko map=4 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1
I already made a post at the tester corner, hope the team can read it and fix this before the next release.
Hope this help.