Mapping GPIO poru Game-Hat
-
Très bien, c'est un truc intéressant et beaucoup moins cher que mon Freeplay GBA.
Pour le mk_arcade_joystick_rpi.ko je l'utilise aussi pour le moment, mais il y a des touches qui me manquent. J'ai ici encore la source d'une version pour 17 touches et réagissant aussi sur un flanc de tension montant. Pas encore eu le temps de compiler.
Pour le display waveshare existe un driver alternatif beaucoup plus rapide.
fbcp-ili9341. Il permet aussi d'adapter le viewport, important si comme dans le cas du GBA. la carcasse grignote sur les bords. Quake marche très bien sur ces trucs -
Je remets un lien vers le fichier .ko mk_arcade_joystick_rpi.ko
-
Salut a tous
Je tente désespérément de faire marcher recalbox avec mon gamehat car retropie j'adhère pas.
Après avoir remplacer le fichier par celui fourni dans le post, que doit on faire dans la config pour que ça fonctionne ?
Car j'ai tenté de reconfigurer les touches via l'interface de recalbox mais il y a des touches qui ne sont pas reconnues.
Comment remapper le gpio afin de le faire fonctionner ?
Merci ! -
si une personne pourrais prendre le temps d'expliquer la marche a suivre pour faire fonctionner le game hat sous recalbox avec le game hat je dis pas non .
merci d'avance si on nous répond avec l'explication -
Salut,
Il faut déposer le mk_arcade_joystick_rpi.ko dans le dossier comme expliqué plus haut.
Puis dans recalbox.conf il faut configurer le GPIO comme ceci :
controllers.gpio.args="map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"
Enjoy !El
-
merci pour ta réponse le problème que je ne sais pas comment remplacer le fichier je ne trouve pas l'emplacement du fichier /lib/modules/4.4.13-v7/extra/ pourrais tu m'indiquer comment y accéder ? après sa je pense que sa ira .
désoler de t'ennuyer pour si peu
-
It works!!
I have made the following steps:
- Write the latest recalbox image on SD Card.
- Start the recalbox with gamehat and connect to your network.
- Use a FTP Programm (i used WinSCP) and copy the mk_arcade_joystick_rpi.ko on your recalbox to "/recalbox/share/system".
- Log into your Recalbox with SSH (i used Putty)
- Do following commands in your console without quotation mark:
"mount -o remount rw, /" Make the root path writable
"mv /recalbox/share/system/mk_arcade_joystick_rpi.ko /lib/modules/4.4.13-v7/extra/" Move and override the mk_arcade_joystick_rpi.ko file
"nano /recalbox/share/system/recalbox.conf" Edit the recalbox.conf
-
Scroll to "D2 - GPIO Controllers" and override the line "controllers.gpio.enabled=0" to "controllers.gpio.enabled=1"
-
Override the line "controllers.gpio.args=map=1,2" to controllers.gpio.args="map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"
-
Save with crtl + O and enter
Following command: "shutdown -r now" Restart your recalbox
Now it should work.
Thank you for your help!
-
Merci 1000 fois @Elwood69 ca fonctionne nikel !!!
Thanks a lot @Dennis-Müller, it works like a charm
Merci encore -
@dennis-müller
Does not work......mine I had to change the folder to
mv /recalbox/share/system/mk_arcade_joystick_rpi.ko /lib/modules/4.14.62-v7/extra/
to reflect current version.
Assuming this folder change has nothing to do with non-function.
tried both with and without quotation mark.
controllers.gpio.args="map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"
controllers.gpio.args=map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1
any idea why not working??? -
This is my configuration on /recalbox/share/system/recalbox.conf
# ------------ D2 - GPIO Controllers ------------ # ##GPIO Controllers ## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1) controllers.gpio.enabled=1 ## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2) ## controllers.gpio.args=map=1,2 controllers.gpio.args="map=5 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1"
Please ignore Exclamation mark! I had to put it in front of it because the number sign puts the line as headline
-
@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.62I also tried my methods below successful with the other package I downloaded (those bundled with game roms)
4.14.62-v7I 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-buttonsAnother 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-hatI 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,-1Then 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,-1I already made a post at the tester corner, hope the team can read it and fix this before the next release.
Hope this help.
-
Tried this exactly as you wrote but with the current stable build on a Pi3b. What happens is this: https://i.imgur.com/KJeZjIa.jpg
Here is my config:
## GPIO Controllers ## enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1) controllers.gpio.enabled=1 ## mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2) #controllers.gpio.args=map=1,2 controllers.gpio.args=map=5 gpio=5,4,14,22,13,18,21,16,6,20,26,12,-1