Recalbox Forum

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

    cheungbx

    @cheungbx

    4
    Reputation
    467
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    cheungbx Unfollow Follow

    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

    Latest posts made by 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
    • 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 2018 Xmas beta using 2.2“ TFT LCD and GPIO buttons

      With the 2018 Xmas beta version of recalbox, I made a handheld recalbox game console using 2.2“ TFT LCD and a Raspberry Pi 0 W and GPIO buttons. You can find my youtube video here [https://www.youtube.com/watch?v=q_Xg_Vp2br4](link url)
      0_1546953939042_IMG_7683 1.JPG

      that demonstrated the following steps:

      A. Get all the parts.
      B. Solder the parts together.
      C. Install Recalbox software.
      D. Configure Recalbox for GPIO buttons
      E. Configure Recalbox for TFT and speakers

      A.Get the Parts:

      Most of them available on amazon or aliexpress or from China and Hong Kong Taobao.

      1. Raspberry Pi Zero W
      2. 16G TF card.
      3. 2.2" TFT LCD SPI il9341
      4. 5V USB charger for battery management
      5. 3.7V 1500MaH LIPO battery.
      6. Two mini speakers
      7. 3.5mm headphone jack with switch
      8. Two 10uF capacitor.
      9. 14 silent buttons
      10. 50K VR for LCD brigtness control.
      11. Mini Slide switch
      12. double-sided 7cm x 9cm prototype PCB
      13. 7cm x 9cm Arglic board for back cover.
      14. Four 3mm x 20mm screws to hold the back cover.
      15. 0.2mm or 0.3mm laminated (insulated) wire
      16. mini-HDMI to HDMI convertor plug or cable.
      17. micro-USB to USB convertor plug or cable.

      B. Set up the hardware.

      This project uses a double-sided 7x9 cm prototype PCB as the frame of the game console. We shall refer to this as „the PCB“.
      Solder the buttons as shown in the layout to the front side of the PCB.
      Mount the 2.2“ TFT LCD to the front of the PCB. Insert the pins through the PCB into the 9 pin female header at the other side of the PCB.
      Mount the raspberry pi zero W at the back side of the PCB.
      Using 0.2 or 0.3mm Laminated (insulated) wires, solder up all the connections from the TFT LCD to the Raspberry Pi following the circuit diagram and the pin layout. The LED pin of LCD connects via a 50K VR to the 3V for brightness adjustment.
      Solder one end of the button to ground, and the other end to the right GPIO pin of Raspberrry Pi following the pin layout.
      Solder up the 10 uF capacitors, the headphone jack and the speakers as shown in the circuit diagram.
      Solder up the 5V battery charger circuit board, the sliding switch and the battery to the 5V and ground pins of the Raspberry Pi according to the circuit diagram.
      Cover up the back of the PCB with an argylic board and secure it with screws.

      C. Install Recalbox software to work in default set up.

      Download the Recalbox 2018 12 24 Xmas beta boot image for Respberry Pi 0.
      https://forum.recalbox.com

      https://forum.recalbox.com/topic/15010/testers-wanted-major-system-upgrade-pi3b-kodi-17-and-much-more

      1. The Recalbox boot image already comes with some freeware game roms. Download more Games Roms from the web.
      2. Use Etcher or other Sdcard burner - to burn the Recalbox boot image to 16G TF card.
      3. Insert 16G TF card to the TF card slot of the Raspberry Pi 0 W.
      4. Connect an HDMI screen to the mini HDMI port of the Raspberry Pi 0W through a mini HDMI to HDMI convertor.
      5. Connect a USB keyboard to the USB port of the Raspberry Pi trhough a microUSB to USB convertor.
      6. Connect the Micro USB power cable to the 5V battery charger.
        Switch on the slide switch to power it up.
      7. Check that the recalbox splash screen appear and the startup music is played on the speaker. Otherwise, power it down and recheck all the connections.
      8. The following keys on the keyboard is mapped to the joystick buttons for initial set up:
        A=(to proceed), S=(to go back), ENTER/Return as START, Space as SELECT.
        Arrow keys Up/Down/left/right are mapped to the D-PAD‘s up/down/left/right.
      9. Press ENTER to get to system menu. Use arrow keys to go to the Network Settings, and press A.
      10. Once in WIFI menu, use arrow keys and A keys to enable WIFI, input the SSID and password of your WIFI network. Make sure proper upper/lower case is used. Lastly select CLOSE and press A to enable WIFI.
      11. Go back to the Network Settings screen, and record the IP address assigned to the Recalbox.

      D. Modify Recalbox configurtions for GPIO controller buttons

      1. From your PC or Mac, SSH to the ip address of the recalbox.
        ssh root@192.168.1.170
        Or you can try ssh root@recalbox.local

      2. Login using the id of root and the default root password of “recalboxroot”

      3. Type the following commands to set up the GPIO buttons and other parameters for the TFT LCD.
        mount -o remount, rw /
        cd ~
        vi recalbox.conf

      4. While in vi, use “/pattern” to search for the word. then press ENTER to jump there.
        Press A key to turn into edit mode.
        Type in required values (using arrow keys, backspace/delete keys where required).
        Once editing of that line is finished, then press “ESC” key to go back to read-only mode.
        Continue to search for the other parameters.
        Once all done, press “ESC” to go back to read-only mode.
        Press x:! To save and exit.

      system.power.switch=PIN56PUSH

      controllers.gpio.enabled=1
      controllers.gpio.arg=map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12

      1. 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”

      1. After that, reboot the recall box to take effect of the changes by typing

      shutdown –r now

      1. After the recal box has boot up., use the keys on the keyboard to press ENTER to go to the main menu. Then select controller settings and press A. Select configure a controller and press A. press A a second time to confirm.
      2. You will see a screen to ask you to press and hold one of your joystick keys. Press and hold the A button on your recalbox (not the keyboard) until you see the next screen. If this does not work, the button connections may have something wrong, pls check the connections again.
      3. If all is good, you will be asked to press the button for each of the joystick keys laid out on the screen. First press the D-pad keys, up, down, left, right, etc. When you come to joystick-1, joystick-2, press Down button on the recalbox to skip these buttons as they are not provided on the GPIO controllers. When you come to L1/page up, press L1 button, L2/pagedown, press R1 button. For L2, R2, L3, R3, there are not provided by the GPIO controllers, skip these buttongs. Lastly, press Hot Key (HK) for the hotkey button.
      4. Finally press the B button to accept the new buttons configured.
      5. You will be back to the main menu. Test the up down left right and other buttons on the GPIO controllers.
      6. If it‘s all good, you can proceed to the TFT screen configuraiton.

      E. Modify Recalbox configurations for TFT Screen and speakers.

      1. From your PC or Mac, SSH to the ip address of the recalbox.
        ssh root@192.168.1.170
        Or you can try ssh root@recalbox.local
      2. Login using the id of root and the default root password of “recalboxroot”
      3. Type the following commands to set up the TFT LCD and speaker.

      mount -o remount, rw /boot
      vi /boot/config.txt

      While in vi, use the down arrow to go all the way to the bottom of the file.
      Press A key to turn into edit mode.
      Type in the following lines, then press “ESC” key to go back to read-only mode.
      Press x:! To save and exit.

      enable GPIO TFT

      hdmi_group=2
      hdmi_mode=87
      hdmi_cvt=320 240 60 1 0 0 0
      dtparam=spi=on
      dtparam=i2c1=on
      dtparam=i2c_arm=on
      dtoverlay=pitft22,rotate=270,speed=64000000,fps=30

      enable GPIOs analog audio

      dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

      1. Type the following commands to set up the other parameters for the TFT LCD.
        mount -o remount, rw /
        cd ~
        vi recalbox.conf

      2. While in vi, use “/pattern” to search for the word. then press ENTER to jump there.
        Press A key to turn into edit mode.
        Type in required values (using arrow keys, backspace/delete keys where required).
        Once editing of that line is finished, then press “ESC” key to go back to read-only mode.
        Continue to search for the other parameters.
        Once all done, press “ESC” to go back to read-only mode.
        Press x:! To save and exit.
        system.fbcp.enabled=1
        global.videomode=default
        audio.device=jack

      3. After that, reboot the recall box to take effect of the changes by typing

      shutdown –r now

      1. After the recal box has boot up., the TFT screen should dipslay the splash screen and the welcome music will be played on the speakers drivien by the GPIO pins. if you do not get that after 1 minute or more, then somethings wrong. Power down the box and check the connections again.

      2. If all goes well, you can start playing a game.

      3. That‘s all the steps you need to set this up. Good luck with retro gaming.

      4. DONE 🙂

      posted in Your recalbox
      cheungbx
      cheungbx
    • RE: Xmas Beta cannot take in custom GPIO pin mapping as additional parameters when loading module mk_arcade_joystick_rpi.ko.

      @cheungbx
      Note: the last two lines in the recalbox.conf appeared as two lines on this forum but is actually one single line.

      posted in Testers's corner
      cheungbx
      cheungbx
    • Xmas Beta cannot take in custom GPIO pin mapping as additional parameters when loading module mk_arcade_joystick_rpi.ko.

      I built a recalbox portable console with Pi 0 W; 2.2" il9341 TFT LCD with SPI using GPIO 9,10,11,25 supported by the adafruit drivers and GPIO controllers ( mk_arcade_joystick_rpi.ko) and the PWM 2 channel audio output using GPIO 18, 13. As the LCD and Audio GPIO overlaps with the default GPIO pins map parameters of
      mk_arcade_joystick_rpi.ko module. i.e. "map=1" or "map =3", I have to create a custom pin mapping using the parameter of "map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12" to avoid the conflicts of pins used by the joystick buttons , LCD and audio output.
      I found that the boot up script file (/recalbox/scripts/recalbox-config.sh) cannot take in the second parameter I put into the recalbox.conf file:
      controllers.gpio.enabled=1
      controllers.gpio.arg=map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12

      To fix the issue, please help to consider the following in the new release.
      add the following lines to the top of the /recalbox/scripts/recalbox-config.sh. file to take in one additional parameter as $extra3.
      extra3=$5

      Change the line in the section for GPIO controllers
      from
      map="$extra2"
      to
      map="$extra2 $extra3"

      Once the above is done, I can happily make my recalbox console works with TFT LCD; GPIO buttons soldered onto my circuit board, and stereo analog audio output driven by PWM through GPIO pin 13 and 18 and Ground.

      Here are the parameters I used in the config files to make this work. With the modification I mentioned about for the recalbox-config.sh to take in one extra parameter for GPIO controllers.

      mount -o remount, rw /boot

      vi /boot/config.txt

      add this to the end of the /boot/config.txt file to enable GPIO TFT

      hdmi_group=2
      hdmi_mode=87
      hdmi_cvt=320 240 60 1 0 0 0
      dtparam=spi=on
      dtparam=i2c1=on
      dtparam=i2c_arm=on
      dtoverlay=pitft22,rotate=270,speed=64000000,fps=30

      also need to edit recalbox.conf to set system.fbcp.enabled=1 and global.videomode=default

      #add this to end of the /boot/config.txt file to enable GPIOs analog audio
      dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4

      # edit recalbox.conf to enable fbp and TFT LCD and GPIO controllers

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

      change the following parameters as follows

      #Tips for using vi: use “/word” to search for the word.
      then press ENTER to jump to the first match.
      then press "a" to add or modify. ESC to stop and “:x!” to save

      system.fbcp.enabled=1
      global.videomode=default

      system.power.switch=PIN56PUSH
      controllers.gpio.enabled=1
      controllers.gpio.arg=map=4 gpio=21,24,26,19,5,6,22,4,20,17,27,16,12

      posted in Testers's corner
      cheungbx
      cheungbx