From 6e44f74b150ef48080533103e9bbebcb17321e8f Mon Sep 17 00:00:00 2001 From: Vegz78 <> Date: Sat, 18 Dec 2021 06:18:59 +0100 Subject: [PATCH] Recalbox 8 support&fixes -Added 2 installation scripts for Recalbox 8; one for default analog/jack audio and one with fixes for HDMI auido for MakeCode Arcade games -Added systemlist.xml, theme and support files for MCA on Recalbox 8 -Small bugfixes in Recalbox 7.1.1 installation script Not tested yet, appreciate your testing and feedback! --- McAirpos/MakeCode/sd/arcade.cfg | 2 +- .../es_systems.cfg_MakeCode_RB | 0 .../makecode/custom.xml | 0 .../makecode/data/console.svg | 0 .../makecode/data/consolegame.svg | 0 .../makecode/data/controller.svg | 0 .../makecode/data/controls.svg | 0 .../makecode/data/icon_empty.svg | 0 .../makecode/data/icon_filled.svg | 0 .../makecode/data/logo.svg | 0 .../Recalbox8.0/etc/modprobe.d/alsa-base.conf | 4 + .../Recalbox8.0/systemlist.xml_MakeCode_RB | 11 + .../themes/recalbox-next/makecode/custom.xml | 53 + .../recalbox-next/makecode/data/console.svg | 1740 +++++++++++++++++ .../makecode/data/consolegame.svg | 1740 +++++++++++++++++ .../makecode/data/controller.svg | 1 + .../recalbox-next/makecode/data/controls.svg | 1 + .../makecode/data/icon_empty.svg | 1 + .../makecode/data/icon_filled.svg | 1 + .../recalbox-next/makecode/data/logo.svg | 1740 +++++++++++++++++ .../usr/share/alsa/cards/vc4-hdmi.conf | 130 ++ ..._recalbox.sh => install_recalbox_v7.1.1.sh | 9 +- install_recalbox_v8.0.sh | 78 + install_recalbox_v8.0_HDMI-Audio-Fix.sh | 85 + 24 files changed, 5592 insertions(+), 4 deletions(-) rename McAirpos/{Recalbox => Recalbox7.1.1}/es_systems.cfg_MakeCode_RB (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/custom.xml (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/console.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/consolegame.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/controller.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/controls.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/icon_empty.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/icon_filled.svg (100%) rename McAirpos/{Recalbox => Recalbox7.1.1}/makecode/data/logo.svg (100%) create mode 100755 McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf create mode 100755 McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/custom.xml create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/console.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/consolegame.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controller.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controls.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_empty.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_filled.svg create mode 100755 McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/logo.svg create mode 100755 McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf rename install_recalbox.sh => install_recalbox_v7.1.1.sh (88%) mode change 100644 => 100755 create mode 100755 install_recalbox_v8.0.sh create mode 100755 install_recalbox_v8.0_HDMI-Audio-Fix.sh diff --git a/McAirpos/MakeCode/sd/arcade.cfg b/McAirpos/MakeCode/sd/arcade.cfg index 348ba7e..fc7ad51 100755 --- a/McAirpos/MakeCode/sd/arcade.cfg +++ b/McAirpos/MakeCode/sd/arcade.cfg @@ -1,4 +1,4 @@ -SCAN_CODES=/dev/input/event7 +SCAN_CODES=/dev/input/event0 BTN_LEFT=30 BTN_RIGHT=32 BTN_UP=17 diff --git a/McAirpos/Recalbox/es_systems.cfg_MakeCode_RB b/McAirpos/Recalbox7.1.1/es_systems.cfg_MakeCode_RB similarity index 100% rename from McAirpos/Recalbox/es_systems.cfg_MakeCode_RB rename to McAirpos/Recalbox7.1.1/es_systems.cfg_MakeCode_RB diff --git a/McAirpos/Recalbox/makecode/custom.xml b/McAirpos/Recalbox7.1.1/makecode/custom.xml similarity index 100% rename from McAirpos/Recalbox/makecode/custom.xml rename to McAirpos/Recalbox7.1.1/makecode/custom.xml diff --git a/McAirpos/Recalbox/makecode/data/console.svg b/McAirpos/Recalbox7.1.1/makecode/data/console.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/console.svg rename to McAirpos/Recalbox7.1.1/makecode/data/console.svg diff --git a/McAirpos/Recalbox/makecode/data/consolegame.svg b/McAirpos/Recalbox7.1.1/makecode/data/consolegame.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/consolegame.svg rename to McAirpos/Recalbox7.1.1/makecode/data/consolegame.svg diff --git a/McAirpos/Recalbox/makecode/data/controller.svg b/McAirpos/Recalbox7.1.1/makecode/data/controller.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/controller.svg rename to McAirpos/Recalbox7.1.1/makecode/data/controller.svg diff --git a/McAirpos/Recalbox/makecode/data/controls.svg b/McAirpos/Recalbox7.1.1/makecode/data/controls.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/controls.svg rename to McAirpos/Recalbox7.1.1/makecode/data/controls.svg diff --git a/McAirpos/Recalbox/makecode/data/icon_empty.svg b/McAirpos/Recalbox7.1.1/makecode/data/icon_empty.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/icon_empty.svg rename to McAirpos/Recalbox7.1.1/makecode/data/icon_empty.svg diff --git a/McAirpos/Recalbox/makecode/data/icon_filled.svg b/McAirpos/Recalbox7.1.1/makecode/data/icon_filled.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/icon_filled.svg rename to McAirpos/Recalbox7.1.1/makecode/data/icon_filled.svg diff --git a/McAirpos/Recalbox/makecode/data/logo.svg b/McAirpos/Recalbox7.1.1/makecode/data/logo.svg similarity index 100% rename from McAirpos/Recalbox/makecode/data/logo.svg rename to McAirpos/Recalbox7.1.1/makecode/data/logo.svg diff --git a/McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf b/McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf new file mode 100755 index 0000000..34b5d92 --- /dev/null +++ b/McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf @@ -0,0 +1,4 @@ +options vc4 index=0 +options snd_bcm2835 index=1 +options snd-usb-audio index=-2 +options snd slots=vc4,snd_bcm2835 diff --git a/McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB b/McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB new file mode 100755 index 0000000..04d2a0d --- /dev/null +++ b/McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/custom.xml b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/custom.xml new file mode 100755 index 0000000..66c43f3 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/custom.xml @@ -0,0 +1,53 @@ + + 4 + + + + Developer : Microsoft + + + Initial release : January 6, 2020 + + + Website : http://arcade.makecode.com + + + Written in : STS/C++ + + + "Microsoft MakeCode Arcade is a web-based beginner-friendly + + + the hardware of arcade game systems in software + code editor to create retro arcade games ... + + + ... with MakeCode, you can either use blocks[, Python] + + + or JavaScript to build your program ..." + + + Video : "... 160x120 screen showing 16 colors ..." + + + Sound : "... 4-channel retro-appropriate sound system ..." + + + + + + + FF69B4 + + + 36D787 + + + 4B77BE + + + BE90D4 + + + diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/console.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/console.svg new file mode 100755 index 0000000..9a93b08 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/console.svg @@ -0,0 +1,1740 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/consolegame.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/consolegame.svg new file mode 100755 index 0000000..9a93b08 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/consolegame.svg @@ -0,0 +1,1740 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controller.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controller.svg new file mode 100755 index 0000000..3fea990 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controller.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controls.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controls.svg new file mode 100755 index 0000000..fe59622 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/controls.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_empty.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_empty.svg new file mode 100755 index 0000000..8ebfda7 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_empty.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_filled.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_filled.svg new file mode 100755 index 0000000..9503b91 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/icon_filled.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/logo.svg b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/logo.svg new file mode 100755 index 0000000..9a93b08 --- /dev/null +++ b/McAirpos/Recalbox8.0/themes/recalbox-next/makecode/data/logo.svg @@ -0,0 +1,1740 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf b/McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf new file mode 100755 index 0000000..90353b8 --- /dev/null +++ b/McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf @@ -0,0 +1,130 @@ +# +# Configuration for the VC4-HDMI sound card using software IEC958 +# subframe conversion + + +vc4-hdmi.pcm.hdmi.0 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type iec958 + slave { + format IEC958_SUBFRAME_LE + pcm { + type hooks + slave.pcm { + type hw + card $CARD + device 0 + } + hooks.0 { + type ctl_elems + hook_args [ + { + name "IEC958 Playback Default" + interface PCM + optional true + lock true + preserve true + value [ $AES0 $AES1 $AES2 $AES3 ] + } + ] + } + } + } + status [ $AES0 $AES1 $AES2 $AES3 ] +} + +# default with plug +vc4-hdmi.pcm.default { + @args [ CARD ] + @args.CARD { + type string + } + type plug + slave.pcm { + type softvol + slave.pcm { + @func concat + strings [ "hdmi:" $CARD ] + } + control { + name "PCM Playback Volume" + card $CARD + } + } +} + +# default with dmix +vc4-hdmi.pcm.default2 { + @args [ CARD ] + @args.CARD { + type string + } + type asym + playback.pcm { + type plug + slave.pcm { + @func concat + strings [ "dmix:" $CARD ] + } + } +} + + + + +vc4-hdmi.pcm.iec958.0 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type iec958 + slave { + format IEC958_SUBFRAME_LE + pcm { + type plug + slave.pcm { + type hw + card $CARD + } + } + } + status [ $AES0 $AES1 $AES2 $AES3 ] +} + + + +vc4-hdmi.pcm.front.0 { + @args [ CARD ] + @args.CARD { + type string + } + type hw + card $CARD +} diff --git a/install_recalbox.sh b/install_recalbox_v7.1.1.sh old mode 100644 new mode 100755 similarity index 88% rename from install_recalbox.sh rename to install_recalbox_v7.1.1.sh index 22af4c6..00d3e04 --- a/install_recalbox.sh +++ b/install_recalbox_v7.1.1.sh @@ -31,6 +31,7 @@ fi # 3. Set up MakeCode Arcade files cp -r /home/pi/McAirpos/McAirpos/MakeCode/sd / chmod -R 755 /sd +chmod -R 755 /home/pi/McAirpos # 4. Set up EmulationStation # Delete old es_systems.cfg backup file @@ -45,16 +46,16 @@ if [[ -f /etc/emulationstation/es_systems.cfg ]]; then sed -i '//{:a;/<\/system>/!{N;ba;}};/MakeCode<\/name>/d;' /etc/emulationstation/es_systems.cfg # Appending updated MakeCode Arcade system from repository sed -i '$d' /etc/emulationstation/es_systems.cfg - cat /home/pi/McAirpos/McAirpos/Recalbox/es_systems.cfg_MakeCode_RB >> /etc/emulationstation/es_systems.cfg + cat /home/pi/McAirpos/McAirpos/Recalbox7.1.1/es_systems.cfg_MakeCode_RB >> /etc/emulationstation/es_systems.cfg cp /etc/emulationstation/es_systems.cfg /recalbox/share_init/system/.emulationstation/es_systems.cfg # Add MakeCode Arcade carbon theme - cp -r /home/pi/McAirpos/McAirpos/Recalbox/makecode /etc/emulationstation/themes/recalbox-next/ + cp -r /home/pi/McAirpos/McAirpos/Recalbox7.1.1/makecode /etc/emulationstation/themes/recalbox-next/ else echo "Couldn't find the file /etc/emulationstation/es_systems.cfg, continuing script without..." fi # 5. Create MakeCode Arcade games folder for RetroPie, if not present -if [[ -d ./RetroPie/roms/makecode ]]; then +if [[ -d /recalbox/share/roms/makecode ]]; then echo "MakeCode Arcade games folder already present, continuing..." else mkdir -p /recalbox/share/roms/makecode @@ -71,7 +72,9 @@ echo "McAirpos finished installing!" echo "Download MakeCode Arcade .elf game files from https://vegz78.github.io/McAirpos" echo "Run MakeCode Arcade games from RetroPie or from the Linux console/CLI:" ln -s /home/pi/McAirpos/McAirpos/launCharc/launCharc /usr/bin/launCharc +chmod -R 755 /usr/bin/launCharc launCharc +mount -o remount,ro / echo "" echo "For more details, please visit https://github.com/Vegz78/McAirpos" exit 0 diff --git a/install_recalbox_v8.0.sh b/install_recalbox_v8.0.sh new file mode 100755 index 0000000..4989e40 --- /dev/null +++ b/install_recalbox_v8.0.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +# 1. Make sure to start in directory /home/pi +mount -o remount,rw / +mkdir -p /home/pi +cd /home/pi + +if [[ $(pwd) = "/home/pi" ]]; then + echo "Working direcory ok!: $(pwd)" +else + echo "Something wrong with working directory, exiting script..." +exit 1 +fi + +# 2. 1nstall prerequesites and clone McAirpos repository +if [[ -d ./McAirpos ]]; then + echo "McAirpos repository present, countinuing without downloading..." +else + if [[ -f /usr/bin/wget ]] && [[ -f /bin/tar ]]; then + echo "Fetching McAirpos..." + wget https://github.com/Vegz78/McAirpos/archive/master.tar.gz + tar -zxf ./master.tar.gz -C /home/pi + mv /home/pi/McAirpos-master /home/pi/McAirpos + rm -f ./master.tar.gz + else + echo "wget or tar missing, exiting script..." + exit 1 + fi +fi + +# 3. Set up MakeCode Arcade files +cp -r /home/pi/McAirpos/McAirpos/MakeCode/sd / +chmod -R 755 /sd +chmod -R 755 /home/pi/McAirpos + +# 4. Set up EmulationStation +# Delete old es_systems.cfg backup file +if [[ -f /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak ]]; then + rm -f /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak +fi +# Installation of EmulationStation system needed for McAirpos +if [[ -f /recalbox/share_init/system/.emulationstation/systemlist.xml ]]; then + #Backup original es_systems.cfg file + cp /recalbox/share_init/system/.emulationstation/systemlist.xml /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak + # Removing MakeCode Arcade system, if present + sed -i '//{:a;/<\/system>/!{N;ba;}};//d;' /recalbox/share_init/system/.emulationstation/systemlist.xml + # Appending updated MakeCode Arcade system from repository + sed -i '$d' /recalbox/share_init/system/.emulationstation/systemlist.xml + cat /home/pi/McAirpos/McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB >> /recalbox/share_init/system/.emulationstation/systemlist.xml + # Add MakeCode Arcade carbon theme + cp -r /home/pi/McAirpos/McAirpos/Recalbox8.0/themes/recalbox-next/makecode /recalbos/share_init/system/.emulationstation/themes/recalbox-next/ +else + echo "Couldn't find the file /recalbox/share_init/system/.emulationstation/systemlist.xml, continuing script without..." +fi + +# 5. Create MakeCode Arcade games folder for RetroPie, if not present +if [[ -d /recalbox/share/roms/makecode ]]; then + echo "MakeCode Arcade games folder already present, continuing..." +else + mkdir -p /recalbox/share/roms/makecode + chmod -R 755 /recalbox/share/roms/makecode +fi + +# 6. Initialize uinput-mapper +#cd /home/pi/McAirpos/McAirpos/uinput-mapper +#make +#cd /home/pi + +# 7. Finish up +echo "McAirpos finished installing!" +echo "Download MakeCode Arcade .elf game files from https://vegz78.github.io/McAirpos" +echo "Run MakeCode Arcade games from RetroPie or from the Linux console/CLI:" +ln -s /home/pi/McAirpos/McAirpos/launCharc/launCharc /usr/bin/launCharc +chmod -R 755 /usr/bin/launCharc +launCharc +echo "" +echo "For more details, please visit https://github.com/Vegz78/McAirpos" +exit 0 diff --git a/install_recalbox_v8.0_HDMI-Audio-Fix.sh b/install_recalbox_v8.0_HDMI-Audio-Fix.sh new file mode 100755 index 0000000..36f6fa4 --- /dev/null +++ b/install_recalbox_v8.0_HDMI-Audio-Fix.sh @@ -0,0 +1,85 @@ +#!/bin/bash + +# 1. Make sure to start in directory /home/pi +mount -o remount,rw / +mkdir -p /home/pi +cd /home/pi + +if [[ $(pwd) = "/home/pi" ]]; then + echo "Working direcory ok!: $(pwd)" +else + echo "Something wrong with working directory, exiting script..." +exit 1 +fi + +# 2. 1nstall prerequesites and clone McAirpos repository +if [[ -d ./McAirpos ]]; then + echo "McAirpos repository present, countinuing without downloading..." +else + if [[ -f /usr/bin/wget ]] && [[ -f /bin/tar ]]; then + echo "Fetching McAirpos..." + wget https://github.com/Vegz78/McAirpos/archive/master.tar.gz + tar -zxf ./master.tar.gz -C /home/pi + mv /home/pi/McAirpos-master /home/pi/McAirpos + rm -f ./master.tar.gz + else + echo "wget or tar missing, exiting script..." + exit 1 + fi +fi + +# 3. Set up MakeCode Arcade files +cp -r /home/pi/McAirpos/McAirpos/MakeCode/sd / +chmod -R 755 /sd +chmod -R 755 /home/pi/McAirpos + +# 4. Set up EmulationStation +# Delete old es_systems.cfg backup file +if [[ -f /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak ]]; then + rm -f /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak +fi +# Installation of EmulationStation system needed for McAirpos +if [[ -f /recalbox/share_init/system/.emulationstation/systemlist.xml ]]; then + #Backup original es_systems.cfg file + cp /recalbox/share_init/system/.emulationstation/systemlist.xml /recalbox/share_init/system/.emulationstation/systemlist.xml_McAirpos.bak + # Removing MakeCode Arcade system, if present + sed -i '//{:a;/<\/system>/!{N;ba;}};//d;' /recalbox/share_init/system/.emulationstation/systemlist.xml + # Appending updated MakeCode Arcade system from repository + sed -i '$d' /recalbox/share_init/system/.emulationstation/systemlist.xml + cat /home/pi/McAirpos/McAirpos/Recalbox8.0/systemlist.xml_MakeCode_RB >> /recalbox/share_init/system/.emulationstation/systemlist.xml + # Add MakeCode Arcade carbon theme + cp -r /home/pi/McAirpos/McAirpos/Recalbox8.0/themes/recalbox-next/makecode /recalbos/share_init/system/.emulationstation/themes/recalbox-next/ +else + echo "Couldn't find the file /recalbox/share_init/system/.emulationstation/systemlist.xml, continuing script without..." +fi + +# 5. Create MakeCode Arcade games folder for RetroPie, if not present +if [[ -d /recalbox/share/roms/makecode ]]; then + echo "MakeCode Arcade games folder already present, continuing..." +else + mkdir -p /recalbox/share/roms/makecode + chmod -R 755 /recalbox/share/roms/makecode +fi + +# 6. Initialize uinput-mapper +#cd /home/pi/McAirpos/McAirpos/uinput-mapper +#make +#cd /home/pi + +# 7. HDMI-Audio-Fix +cp /etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.conf_McAirpos.bak +cp /usr/share/alsa/cards/vc4-hdmi.conf /usr/share/alsa/cards/vc4-hdmi.conf_McAirpos.bak +cp /home/pi/McAirpos/McAirpos/Recalbox8.0/etc/modprobe.d/alsa-base.conf /etc/modprobe.d/alsa-base.conf +cp /home/pi/McAirpos/McAirpos/Recalbox8.0/usr/share/alsa/cards/vc4-hdmi.conf /usr/share/alsa/cards/vc4-hdmi.conf + + +# 8. Finish up +echo "McAirpos finished installing!" +echo "Download MakeCode Arcade .elf game files from https://vegz78.github.io/McAirpos" +echo "Run MakeCode Arcade games from RetroPie or from the Linux console/CLI:" +ln -s /home/pi/McAirpos/McAirpos/launCharc/launCharc /usr/bin/launCharc +chmod -R 755 /usr/bin/launCharc +launCharc +echo "" +echo "For more details, please visit https://github.com/Vegz78/McAirpos" +exit 0