Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord
    1. Home
    2. cheungbx
    3. Best
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 7
    • Best 4
    • Controversial 0
    • Groups 0

    Best posts made by cheungbx

    • Recalbox on Waveshare game hat

      I made a recalbox using Raspberry Pi 3B and waveshare game hat.

      See this youtube video

      https://www.youtube.com/watch?v=ijM91OzCvNI&t=3s

      Figured out how to map the GPIO pins on the waveshare game hatRecalbox on waveshare game hat

      Download the Recalbox 2018 12 24 Xmas beta boot image for Respberry Pi 3B+
      https://forum.recalbox.com/topic/1501...

      Recalbox config Parameters to adjust to make the Game Hat GPIO work:

      mount -o remount, rw /
      cd ~
      vi recalbox.conf

      then change the following

      system.power.switch=PIN56PUSH

      controllers.gpio.enabled=1
      controllers.gpio.arg=map=4 gpio=5,6,13,19,21,4,26,12,23,20,16,18,-1
      kodi.enabled=1
      kodi.atstartup=0
      kodi.xbutton=1
      wifi.enabled=1
      wifi.ssid=yuourssid
      wifi.key=yourpassword

      The boot up script file of the recalbox 2018 Xmas beta (/recalbox/scripts/recalbox-config.sh) cannot take in the second parameter I put into the recalbox.conf file.
      Until this is fixed in a later release, we need to change the following lines to fix this issue so the custom GPIO button pin mapping can take effect.

      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

      posted in Your recalbox
      cheungbx
      cheungbx
    • recalbox-config.sh cannot pass the 2nd parameter for custom GPIO mapping to mk_arcade_joystick_rpi.ko

      Re: [Testers wanted: major system upgrade (Pi3b+](KODI 17 and much more ...))

      I happened to encounter a GPIO issues with 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

      Hope this help.

      posted in Testers's corner
      cheungbx
      cheungbx
    • RE: Mapping GPIO poru Game-Hat

      @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.

      posted in Manettes/GPIO/Encodeurs
      cheungbx
      cheungbx
    • RE: Recalbox on Waveshare game hat

      @cheungbx

      The previous Video link has been deleted.
      Pls view the youtube video here.
      https://www.youtube.com/watch?v=FWdlv_c1_6k&t=78s

      posted in Your recalbox
      cheungbx
      cheungbx