diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a28ce8ce6..eabf8e8e7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,6 +42,7 @@ jobs: toolchain: - tg5040 - tg5050 + - my355 steps: - name: Checkout @@ -64,6 +65,7 @@ jobs: toolchain: - tg5040 - tg5050 + - my355 core: ${{ fromJson(needs.core-matrix.outputs.cores) }} steps: - name: Checkout @@ -124,6 +126,18 @@ jobs: env: PLATFORM: tg5050 + - name: Download Cores (my355) + uses: actions/download-artifact@v4.3.0 + with: + path: workspace/my355/cores/output/ + pattern: core-my355-* + merge-multiple: true + + - name: Build (my355) + run: make my355 + env: + PLATFORM: my355 + - name: Special run: make special diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6d33aaf68..4a371d664 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,6 +61,7 @@ jobs: toolchain: - tg5040 - tg5050 + - my355 steps: - name: Checkout @@ -83,6 +84,7 @@ jobs: toolchain: - tg5040 - tg5050 + - my355 core: ${{ fromJson(needs.core-matrix.outputs.cores) }} steps: - name: Checkout @@ -143,6 +145,18 @@ jobs: env: PLATFORM: tg5050 + - name: Download Cores (my355) + uses: actions/download-artifact@v4.3.0 + with: + path: workspace/my355/cores/output/ + pattern: core-my355-* + merge-multiple: true + + - name: Build (my355) + run: make my355 + env: + PLATFORM: my355 + - name: Special run: make special diff --git a/makefile b/makefile index fed3da9f6..ae659ecae 100644 --- a/makefile +++ b/makefile @@ -12,7 +12,7 @@ endif ifeq (,$(PLATFORMS)) #PLATFORMS = miyoomini trimuismart rg35xx rg35xxplus my355 tg5040 zero28 rgb30 m17 gkdpixel my282 magicmini -PLATFORMS = tg5050 tg5040 +PLATFORMS = tg5040 tg5050 my355 endif ########################################################### @@ -50,12 +50,12 @@ export MAKEFLAGS=--no-print-directory deploy: setup $(PLATFORMS) special package adb push ./build/BASE/MinUI.zip /mnt/SDCARD && adb shell reboot -all: setup $(PLATFORMS) special package done - +all: setup $(PLATFORMS) special package + shell: make -f $(TOOLCHAIN_FILE) PLATFORM=$(PLATFORM) -name: +name: @echo $(RELEASE_NAME) build: @@ -78,7 +78,7 @@ endif system: make -f ./workspace/$(PLATFORM)/platform/makefile.copy PLATFORM=$(PLATFORM) - + # populate system ifneq ($(PLATFORM), desktop) cp ./workspace/$(PLATFORM)/keymon/keymon.elf ./build/SYSTEM/$(PLATFORM)/bin/ @@ -95,7 +95,6 @@ ifneq ($(PLATFORM), desktop) cp ./workspace/all/libgametimedb/build/$(PLATFORM)/libgametimedb.so ./build/SYSTEM/$(PLATFORM)/lib cp ./workspace/all/gametimectl/build/$(PLATFORM)/gametimectl.elf ./build/SYSTEM/$(PLATFORM)/bin/ cp ./workspace/all/gametime/build/$(PLATFORM)/gametime.elf ./build/EXTRAS/Tools/$(PLATFORM)/Game\ Tracker.pak/ -endif cp ./workspace/$(PLATFORM)/libmsettings/libmsettings.so ./build/SYSTEM/$(PLATFORM)/lib cp ./workspace/all/nextui/build/$(PLATFORM)/nextui.elf ./build/SYSTEM/$(PLATFORM)/bin/ cp ./workspace/all/minarch/build/$(PLATFORM)/minarch.elf ./build/SYSTEM/$(PLATFORM)/bin/ @@ -103,31 +102,43 @@ endif cp ./workspace/all/clock/build/$(PLATFORM)/clock.elf ./build/EXTRAS/Tools/$(PLATFORM)/Clock.pak/ cp ./workspace/all/minput/build/$(PLATFORM)/minput.elf ./build/EXTRAS/Tools/$(PLATFORM)/Input.pak/ cp ./workspace/all/settings/build/$(PLATFORM)/settings.elf ./build/EXTRAS/Tools/$(PLATFORM)/Settings.pak/ +endif + ifneq (,$(filter $(PLATFORM),tg5040 tg5050)) cp ./workspace/all/ledcontrol/build/$(PLATFORM)/ledcontrol.elf ./build/EXTRAS/Tools/$(PLATFORM)/LedControl.pak/ - cp ./workspace/all/bootlogo/build/$(PLATFORM)/bootlogo.elf ./build/EXTRAS/Tools/$(PLATFORM)/Bootlogo.pak/ +endif + ifeq ($(PLATFORM), tg5040) # Limbo fix cp ./workspace/$(PLATFORM)/poweroff_next/build/$(PLATFORM)/poweroff_next.elf ./build/SYSTEM/$(PLATFORM)/bin/poweroff_next endif -endif + ifneq (,$(filter $(PLATFORM),tg5040 tg5050 my355)) + cp ./workspace/all/bootlogo/build/$(PLATFORM)/bootlogo.elf ./build/EXTRAS/Tools/$(PLATFORM)/Bootlogo.pak/ + # Audio resampling cp ./workspace/all/minarch/build/$(PLATFORM)/libsamplerate.* ./build/SYSTEM/$(PLATFORM)/lib/ # ROM decompression and SRM support cp ./workspace/all/minarch/build/$(PLATFORM)/libzip.* ./build/SYSTEM/$(PLATFORM)/lib/ cp ./workspace/all/minarch/build/$(PLATFORM)/libbz2.* ./build/SYSTEM/$(PLATFORM)/lib/ - cp ./workspace/all/minarch/build/$(PLATFORM)/liblzma.* ./build/SYSTEM/$(PLATFORM)/lib/ - cp ./workspace/all/minarch/build/$(PLATFORM)/libzstd.* ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/liblzma.so.* ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/libzstd.so.* ./build/SYSTEM/$(PLATFORM)/lib/ # libchdr and libcrypto for RetroAchievements cp ./workspace/all/minarch/build/$(PLATFORM)/libchdr.so.* ./build/SYSTEM/$(PLATFORM)/lib/ cp ./workspace/all/minarch/build/$(PLATFORM)/libcrypto.so.* ./build/SYSTEM/$(PLATFORM)/lib/ -ifeq ($(PLATFORM), tg5040) +ifneq (,$(filter $(PLATFORM),tg5040 my355)) # liblz4 for Rewind support - cp -L ./workspace/all/minarch/build/$(PLATFORM)/liblz4.so.1 ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/liblz4.* ./build/SYSTEM/$(PLATFORM)/lib/ +endif + +ifeq ($(PLATFORM), my355) + cp ./workspace/all/minarch/build/$(PLATFORM)/libcrypto.* ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/libtinyalsa.* ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/libsqlite3.* ./build/SYSTEM/$(PLATFORM)/lib/ + cp ./workspace/all/minarch/build/$(PLATFORM)/libffi.* ./build/SYSTEM/$(PLATFORM)/lib/ endif endif @@ -146,7 +157,6 @@ cores: # TODO: can't assume every platform will have the same stock cores (platf cp ./workspace/$(PLATFORM)/cores/output/picodrive_libretro.so ./build/SYSTEM/$(PLATFORM)/cores cp ./workspace/$(PLATFORM)/cores/output/snes9x_libretro.so ./build/SYSTEM/$(PLATFORM)/cores cp ./workspace/$(PLATFORM)/cores/output/pcsx_rearmed_libretro.so ./build/SYSTEM/$(PLATFORM)/cores - # extras cp ./workspace/$(PLATFORM)/cores/output/a5200_libretro.so ./build/EXTRAS/Emus/$(PLATFORM)/A5200.pak cp ./workspace/$(PLATFORM)/cores/output/prosystem_libretro.so ./build/EXTRAS/Emus/$(PLATFORM)/A7800.pak @@ -175,7 +185,7 @@ cores: # TODO: can't assume every platform will have the same stock cores (platf endif common: build system cores - + clean: rm -rf ./build make clean -f $(TOOLCHAIN_FILE) PLATFORM=$(PLATFORM) COMPILE_CORES=$(COMPILE_CORES) @@ -184,61 +194,56 @@ setup: name # ---------------------------------------------------- # make sure we're running in an input device tty -s || echo "No tty detected" - + # ready fresh build rm -rf ./build mkdir -p ./releases cp -R ./skeleton ./build - + # remove authoring detritus cd ./build && find . -type f -name '.keep' -delete + cd ./build && find . -type f -name '.gitkeep' -delete cd ./build && find . -type f -name '*.meta' -delete echo $(BUILD_HASH) > ./workspace/hash.txt - + + # dont ship desktop as a platform in the release, it's just for testing + cd ./build && find . -type d -name 'desktop' -exec rm -rf {} + + # copy readmes to workspace so we can use Linux fmt instead of host's mkdir -p ./workspace/readmes cp ./skeleton/BASE/README.txt ./workspace/readmes/BASE-in.txt cp ./skeleton/EXTRAS/README.txt ./workspace/readmes/EXTRAS-in.txt - -done: - # say "done" 2>/dev/null || true special: # setup miyoomini/trimui/magicx family .tmp_update in BOOT mv ./build/BOOT/common ./build/BOOT/.tmp_update -# mv ./build/BOOT/miyoo ./build/BASE/ + mv ./build/BOOT/miyoo ./build/BASE/ mv ./build/BOOT/trimui ./build/BASE/ -# mv ./build/BOOT/magicx ./build/BASE/ -# cp -R ./build/BOOT/.tmp_update ./build/BASE/miyoo/app/ + cp -R ./build/BOOT/.tmp_update ./build/BASE/miyoo/app/ + rm -rf ./build/BASE/miyoo/app/.tmp_update/tg* cp -R ./build/BOOT/.tmp_update ./build/BASE/trimui/app/ -# cp -R ./build/BOOT/.tmp_update ./build/BASE/magicx/ -# cp -R ./build/BASE/miyoo ./build/BASE/miyoo354 -# cp -R ./build/BASE/miyoo ./build/BASE/miyoo355 -#ifneq (,$(findstring my355, $(PLATFORMS))) -# cp -R ./workspace/my355/init ./build/BASE/miyoo355/app/my355 -# cp -r ./workspace/my355/other/squashfs/output/* ./build/BASE/miyoo355/app/my355/payload/ -#endif + rm -rf ./build/BASE/trimui/app/.tmp_update/my355* + cp -R ./build/BASE/miyoo ./build/BASE/miyoo355 +ifneq (,$(findstring my355, $(PLATFORMS))) + cp -R ./workspace/my355/init ./build/BASE/miyoo355/app/my355 + cp -r ./workspace/my355/other/squashfs/output/* ./build/BASE/miyoo355/app/my355/payload/ + cp ./workspace/all/show2/build/my355/show2.elf ./build/BASE/miyoo355/app/my355/payload/bin/ +endif tidy: - rm -f releases/$(RELEASE_NAME)-base.zip + rm -f releases/$(RELEASE_NAME)-base.zip rm -f releases/$(RELEASE_NAME)-extras.zip rm -f releases/$(RELEASE_NAME)-all.zip - # ---------------------------------------------------- - # copy update from merged platform to old pre-merge platform bin so old cards update properly -#ifneq (,$(findstring rg35xxplus, $(PLATFORMS))) -# mkdir -p ./build/SYSTEM/rg40xxcube/bin/ -# cp ./build/SYSTEM/rg35xxplus/bin/install.sh ./build/SYSTEM/rg40xxcube/bin/ -#endif package: tidy # ---------------------------------------------------- # zip up build - + # move formatted readmes from workspace to build cp ./workspace/readmes/BASE-out.txt ./build/BASE/README.txt cp ./workspace/readmes/EXTRAS-out.txt ./build/EXTRAS/README.txt rm -rf ./workspace/readmes - + cd ./build/SYSTEM && echo "$(RELEASE_NAME)\n$(BUILD_HASH)" > version.txt ./commits.sh > ./build/SYSTEM/commits.txt cd ./build && find . -type f -name '.DS_Store' -delete @@ -246,7 +251,7 @@ package: tidy mv ./build/SYSTEM ./build/PAYLOAD/.system cp -R ./build/BOOT/.tmp_update ./build/PAYLOAD/ cp -R ./build/EXTRAS/Tools ./build/PAYLOAD/ - + cd ./build/PAYLOAD && zip -r MinUI.zip .system .tmp_update Tools mv ./build/PAYLOAD/MinUI.zip ./build/BASE @@ -262,20 +267,18 @@ package: tidy # Move renamed .pakz files into base folder mkdir -p ./build/BASE mv $(VENDOR_DEST)/* ./build/BASE/ - + # TODO: can I just add everything in BASE to zip? - # cd ./build/BASE && zip -r ../../releases/$(RELEASE_NAME)-base.zip Bios Roms Saves miyoo miyoo354 trimui rg35xx rg35xxplus gkdpixel miyoo355 magicx em_ui.sh MinUI.zip README.txt - cd ./build/BASE && zip -r ../../releases/$(RELEASE_NAME)-base.zip Bios Roms Saves Shaders Overlays trimui em_ui.sh MinUI.zip *.pakz README.txt + cd ./build/BASE && zip -r ../../releases/$(RELEASE_NAME)-base.zip Bios Roms Saves Shaders Overlays trimui miyoo miyoo355 MinUI.zip *.pakz README.txt cd ./build/EXTRAS && zip -r ../../releases/$(RELEASE_NAME)-extras.zip Bios Emus Roms Saves Shaders Overlays Tools README.txt echo "$(RELEASE_VERSION)" > ./build/latest.txt - # compound zip (brew install libzip needed) + # compound zip (brew install libzip needed) cd ./releases && zipmerge $(RELEASE_NAME)-all.zip $(RELEASE_NAME)-base.zip && zipmerge $(RELEASE_NAME)-all.zip $(RELEASE_NAME)-extras.zip - + ########################################################### .DEFAULT: # ---------------------------------------------------- # $@ @echo "$(PLATFORMS)" | grep -q "\b$@\b" && (make common PLATFORM=$@) || (exit 1) - diff --git a/skeleton/BASE/README.txt b/skeleton/BASE/README.txt index 5f6b965bd..087ca26dd 100644 --- a/skeleton/BASE/README.txt +++ b/skeleton/BASE/README.txt @@ -24,14 +24,6 @@ ALL Preload the "Bios" and "Roms" folders then copy both to the root of your primary card. -MAGICX MINI ZERO 28 - -NextUI is meant to be used with Moss installed on the SD card that goes into the left slot (labeled TF1/INT). Download and flash the latest version: - - https://github.com/shauninman/Moss-zero28/releases - -Copy the "magicx" folder and "MinUI.zip" (without unzipping) to the root of the SD card that goes into the right slot (labeled TF2/EXT). - TRIMUI SMART PRO / TRIMUI BRICK Copy the "trimui" folder and "MinUI.zip" (without unzipping) to the root of the SD card. diff --git a/skeleton/BOOT/miyoo/app/MainUI b/skeleton/BOOT/miyoo/app/MainUI new file mode 100644 index 000000000..90b8bec26 --- /dev/null +++ b/skeleton/BOOT/miyoo/app/MainUI @@ -0,0 +1,16 @@ +#!/bin/sh + +cd $(dirname "$0") + +INFO=`cat /proc/cpuinfo 2> /dev/null` +case $INFO in +*"0xd05"*) + ./my355.sh + ;; +*"sun8i"*) + ./my282.sh + ;; +*"SStar"*) + ./miyoomini.sh + ;; +esac \ No newline at end of file diff --git a/skeleton/BOOT/miyoo/app/keymon b/skeleton/BOOT/miyoo/app/keymon new file mode 100644 index 000000000..c52d3c26b --- /dev/null +++ b/skeleton/BOOT/miyoo/app/keymon @@ -0,0 +1,3 @@ +#!/bin/sh + +exit 0 diff --git a/skeleton/BOOT/miyoo/app/my355.sh b/skeleton/BOOT/miyoo/app/my355.sh new file mode 100644 index 000000000..81a33e20f --- /dev/null +++ b/skeleton/BOOT/miyoo/app/my355.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +cd $(dirname "$0") + +SDCARD_PATH=/mnt/SDCARD +MIYOO_DIR=miyoo355 + +if [ ! -f /usr/miyoo/bin/runmiyoo-original.sh ]; then + if [ -d $SDCARD_PATH/.tmp_update/ ]; then + rm -rf $SDCARD_PATH/.tmp_update/ + fi + my355/init.sh +fi + +export PATH=/usr/miyoo/bin:/usr/miyoo/sbin:/usr/bin:/usr/sbin:/bin:/sbin +export LD_LIBRARY_PATH=/usr/miyoo/lib:/usr/lib:/lib + + +# .tmp_update/updater does the actual installation (and later, updating) +cp -rf .tmp_update $SDCARD_PATH/ +rm -rf "$SDCARD_PATH/$MIYOO_DIR" +sync +$SDCARD_PATH/.tmp_update/updater + +# under no circumstances should stock be allowed to touch this card +poweroff diff --git a/skeleton/EXTRAS/Emus/my355/32X.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/32X.pak/default.cfg new file mode 100644 index 000000000..368a439ab --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/32X.pak/default.cfg @@ -0,0 +1,19 @@ +-picodrive_drc = enabled +-picodrive_sound_rate = 44100 +-picodrive_smstype = Auto +-picodrive_smsfm = off +-picodrive_smsmapper = Auto +-picodrive_ggghost = off + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Mode = SELECT +bind Start = START +bind A Button = Y +bind B Button = X:B +bind C Button = A +bind X Button = B:L1 +bind Y Button = L1:X +bind Z Button = R1 diff --git a/skeleton/EXTRAS/Emus/my355/32X.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/32X.pak/launch.sh new file mode 100644 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/32X.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/A2600.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/A2600.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A2600.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/A2600.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/A2600.pak/launch.sh new file mode 100644 index 000000000..4646f9b42 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A2600.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=stella2014 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/A5200.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/A5200.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A5200.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/A5200.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/A5200.pak/launch.sh new file mode 100644 index 000000000..b42bc170a --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A5200.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=a5200 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/A7800.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/A7800.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A7800.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/A7800.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/A7800.pak/launch.sh new file mode 100644 index 000000000..38fccc181 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/A7800.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=prosystem +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/C128.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/C128.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/C128.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/C128.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/C128.pak/launch.sh new file mode 100644 index 000000000..50a003646 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/C128.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=vice_x128 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/C64.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/C64.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/C64.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/C64.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/C64.pak/launch.sh new file mode 100644 index 000000000..2e8dfeff3 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/C64.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=vice_x64 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/COLECO.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/COLECO.pak/default.cfg new file mode 100644 index 000000000..acd0b6a74 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/COLECO.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/COLECO.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/COLECO.pak/launch.sh new file mode 100644 index 000000000..d18a787eb --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/COLECO.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=gearcoleco +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/CPC.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/CPC.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/CPC.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/CPC.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/CPC.pak/launch.sh new file mode 100644 index 000000000..67edeb06a --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/CPC.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=cap32 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/FBN.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/FBN.pak/default.cfg new file mode 100755 index 000000000..cff2093e2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/FBN.pak/default.cfg @@ -0,0 +1,15 @@ +-fbneo-vertical-mode = disabled +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/FBN.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/FBN.pak/launch.sh new file mode 100755 index 000000000..e739e99e3 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/FBN.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=fbneo +CORES_PATH=$(dirname "$0") +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/FDS.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/FDS.pak/default.cfg new file mode 100644 index 000000000..677c0359b --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/FDS.pak/default.cfg @@ -0,0 +1,20 @@ +fceumm_sndquality = High +fceumm_sndvolume = 10 +-fceumm_aspect = 8:7 PAR +-fceumm_turbo_enable = Player 1 +-fceumm_show_adv_system_options = disabled +-fceumm_show_adv_sound_options = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind Change Disk = L1 +bind Insert Disk = R1 +bind Insert Coin = NONE:R2 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/FDS.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/FDS.pak/launch.sh new file mode 100644 index 000000000..780ad5456 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/FDS.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=fceumm + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/GG.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/GG.pak/default.cfg new file mode 100644 index 000000000..44ce34743 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/GG.pak/default.cfg @@ -0,0 +1,18 @@ +-picodrive_smstype = Game Gear +-picodrive_smsmapper = Auto +-picodrive_sound_rate = 44100 +-picodrive_ramcart = disabled +-picodrive_dacnoise = disabled +-picodrive_input1 = 3 button pad +-picodrive_input2 = 3 button pad +-picodrive_fm_filter = off +-picodrive_audio_filter = disabled +-picodrive_overclk68k = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Button 1 = B +bind Button 2 = A +bind Pause = START \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/GG.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/GG.pak/launch.sh new file mode 100644 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/GG.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/LYNX.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/LYNX.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/LYNX.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/LYNX.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/LYNX.pak/launch.sh new file mode 100644 index 000000000..98b51743d --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/LYNX.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=handy +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/MGBA.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/MGBA.pak/default.cfg new file mode 100644 index 000000000..266d90c20 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/MGBA.pak/default.cfg @@ -0,0 +1,18 @@ +mgba_skip_bios = ON + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind L Button = L1 +bind R Button = R1 +bind L Turbo = NONE:L2 +bind R Turbo = NONE:R2 +bind More Sun = NONE:L3 +bind Less Sun = NONE:R3 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/MGBA.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/MGBA.pak/launch.sh new file mode 100644 index 000000000..598c1ca44 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/MGBA.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=mgba +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/MSX.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/MSX.pak/default.cfg new file mode 100644 index 000000000..acd0b6a74 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/MSX.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/MSX.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/MSX.pak/launch.sh new file mode 100644 index 000000000..706a81460 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/MSX.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=bluemsx +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/NGP.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/NGP.pak/default.cfg new file mode 100644 index 000000000..33f5a6b95 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/NGP.pak/default.cfg @@ -0,0 +1,9 @@ +race_dark_filter_level = 50 + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind A Button = B +bind B Button = A +bind Option = START \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/NGP.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/NGP.pak/launch.sh new file mode 100644 index 000000000..09ec144ee --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/NGP.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=race +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/NGPC.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/NGPC.pak/default.cfg new file mode 100644 index 000000000..7d05719ba --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/NGPC.pak/default.cfg @@ -0,0 +1,7 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind A Button = B +bind B Button = A +bind Option = START \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/NGPC.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/NGPC.pak/launch.sh new file mode 100644 index 000000000..09ec144ee --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/NGPC.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=race +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/P8.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/P8.pak/default.cfg new file mode 100644 index 000000000..73611d3f3 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/P8.pak/default.cfg @@ -0,0 +1,7 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind A Button = A +bind B Button = B +bind Start = START \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/P8.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/P8.pak/launch.sh new file mode 100644 index 000000000..2e6658a91 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/P8.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=fake08 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/PCE.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PCE.pak/default.cfg new file mode 100644 index 000000000..671219086 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PCE.pak/default.cfg @@ -0,0 +1,15 @@ +-pce_fast_turbo_toggle_hotkey = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Run = START +bind I = A +bind II = B +bind III = Y +bind IV = X +bind V = L1 +bind VI = R1 +bind Mode = L2 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/PCE.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PCE.pak/launch.sh new file mode 100644 index 000000000..3d92d15cc --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PCE.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=mednafen_pce_fast +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/PET.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PET.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PET.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/PET.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PET.pak/launch.sh new file mode 100644 index 000000000..e7b71659f --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PET.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=vice_xpet +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/PKM.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PKM.pak/default.cfg new file mode 100644 index 000000000..f6d20d9bb --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PKM.pak/default.cfg @@ -0,0 +1,17 @@ +minarch_screen_scaling = Native + +pokemini_video_scale = 3x +-pokemini_60hz_mode = enabled +pokemini_palette = Old +pokemini_piezofilter = disabled +pokemini_lowpass_filter = enabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind A Button = A +bind B Button = B +bind C Button = R1 +bind Shake = L1 +bind Power = SELECT diff --git a/skeleton/EXTRAS/Emus/my355/PKM.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PKM.pak/launch.sh new file mode 100644 index 000000000..4f9cbbf4d --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PKM.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=pokemini +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/PLUS4.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PLUS4.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PLUS4.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/PLUS4.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PLUS4.pak/launch.sh new file mode 100644 index 000000000..e9851f25e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PLUS4.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=vice_xplus4 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/default.cfg new file mode 100644 index 000000000..b10538a03 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/default.cfg @@ -0,0 +1,18 @@ +prboom-mouse_on = disabled +prboom-find_recursive_on = enabled +prboom-analog_deadzone = 15 +prboom-purge_limit = 16 +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/launch.sh new file mode 100644 index 000000000..d7d8fb54e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PRBOOM.pak/launch.sh @@ -0,0 +1,74 @@ +#!/bin/sh +set -x +PAK_DIR="$(dirname "$0")" +PAK_NAME="$(basename "$PAK_DIR")" +PAK_NAME="${PAK_NAME%.*}" + +EMU_EXE=prboom +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) + +rm -f "$LOGS_PATH/$EMU_TAG.txt" +exec >>"$LOGS_PATH/$EMU_TAG.txt" +exec 2>&1 + +get_doom_version() { + DOOM_VERSION="" + if [ -f "$ROM" ]; then + # get the directory of the file + ROM_DIR=$(dirname "$ROM") + if [ -f "$ROM_DIR/doom.version" ]; then + DOOM_VERSION=$(cat "$ROM_DIR/doom.version") + fi + fi + echo "$DOOM_VERSION" +} + +prep_doom_folder() { + DOOM_VERSION="$1" + + if [ -z "$DOOM_VERSION" ]; then + return + fi + + if [ ! -d "$BIOS_PATH/PRBOOM/$DOOM_VERSION" ]; then + return + fi + + if [ ! -f "$BIOS_PATH/PRBOOM/$DOOM_VERSION/prboom.wad" ] && [ -f "$BIOS_PATH/PRBOOM/prboom.wad" ]; then + cp "$BIOS_PATH/PRBOOM/prboom.wad" "$BIOS_PATH/PRBOOM/$DOOM_VERSION/prboom.wad" + fi + + touch "$BIOS_PATH/PRBOOM/$DOOM_VERSION/prboom.cfg" + mkdir -p "$BIOS_PATH/PRBOOM/prboom" + mount -o bind "$BIOS_PATH/PRBOOM/$DOOM_VERSION" "$BIOS_PATH/PRBOOM/prboom" +} + +cleanup() { + umount "$BIOS_PATH/PRBOOM/prboom" || true +} + +main() { + trap "cleanup" EXIT INT TERM HUP QUIT + + ROM="$1" + mkdir -p "$BIOS_PATH/$EMU_TAG" + mkdir -p "$SAVES_PATH/$EMU_TAG" + HOME="$USERDATA_PATH" + cd "$HOME" || exit 1 + + DOOM_VERSION="$(get_doom_version "$ROM")" + prep_doom_folder "$DOOM_VERSION" + + if [ ! -f "$BIOS_PATH/PRBOOM/prboom/prboom.wad" ] && [ ! -f "$BIOS_PATH/PRBOOM/prboom.wad" ]; then + echo "No prboom.wad found in $BIOS_PATH/PRBOOM or $BIOS_PATH/PRBOOM/prboom" + exit 1 + fi + + minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" +} + +main "$@" diff --git a/skeleton/EXTRAS/Emus/my355/PUAE.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/PUAE.pak/default.cfg new file mode 100644 index 000000000..82f9adce0 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PUAE.pak/default.cfg @@ -0,0 +1,17 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind A / 2nd fire / Blue = A +bind B / Fire / Red = B +bind X / Yellow = X +bind Y / Green = Y +bind Start / Play = START +bind Select = SELECT +bind L / Rewind = L1 +bind R / Forward = R1 +bind L2 = L2 +bind R2 = R2 +bind L3 = L3 +bind R3 = R3 + diff --git a/skeleton/EXTRAS/Emus/my355/PUAE.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/PUAE.pak/launch.sh new file mode 100644 index 000000000..e1aabd29e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/PUAE.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=puae2021 +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/SEGACD.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/SEGACD.pak/default.cfg new file mode 100644 index 000000000..dac408932 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SEGACD.pak/default.cfg @@ -0,0 +1,18 @@ +-picodrive_sound_rate = 44100 +-picodrive_smstype = Auto +-picodrive_smsfm = off +-picodrive_smsmapper = Auto +-picodrive_ggghost = off + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Mode = SELECT +bind Start = START +bind A Button = Y +bind B Button = X:B +bind C Button = A +bind X Button = B:L1 +bind Y Button = L1:X +bind Z Button = R1 diff --git a/skeleton/EXTRAS/Emus/my355/SEGACD.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/SEGACD.pak/launch.sh new file mode 100644 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SEGACD.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/SG1000.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/SG1000.pak/default.cfg new file mode 100644 index 000000000..1daad20e5 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SG1000.pak/default.cfg @@ -0,0 +1,19 @@ +-picodrive_smstype = Auto +picodrive_smsmapper = Auto +-picodrive_ggghost = off +-picodrive_sound_rate = 44100 +-picodrive_ramcart = disabled +-picodrive_dacnoise = disabled +-picodrive_input1 = 3 button pad +-picodrive_input2 = 3 button pad +-picodrive_fm_filter = off +-picodrive_audio_filter = disabled +-picodrive_overclk68k = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Button 1 = B +bind Button 2 = A +bind Pause = START diff --git a/skeleton/EXTRAS/Emus/my355/SG1000.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/SG1000.pak/launch.sh new file mode 100644 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SG1000.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/SGB.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/SGB.pak/default.cfg new file mode 100644 index 000000000..78fdedb28 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SGB.pak/default.cfg @@ -0,0 +1,24 @@ +-mgba_gb_model = Super Game Boy +mgba_skip_bios = ON +-mgba_gb_colors_preset = 2 +-mgba_force_gbp = OFF +-mgba_color_correction = OFF +-mgba_interframe_blending = OFF +mgba_sgb_borders = ON + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind L Button = L1 +bind R Button = R1 +bind L Turbo = NONE:L2 +bind R Turbo = NONE:R2 +bind More Sun = NONE:L3 +bind Less Sun = NONE:R3 \ No newline at end of file diff --git a/skeleton/EXTRAS/Emus/my355/SGB.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/SGB.pak/launch.sh new file mode 100644 index 000000000..598c1ca44 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SGB.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=mgba +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/SMS.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/SMS.pak/default.cfg new file mode 100644 index 000000000..0d2df362d --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SMS.pak/default.cfg @@ -0,0 +1,19 @@ +-picodrive_smstype = Master System +picodrive_smsmapper = Auto +-picodrive_ggghost = off +-picodrive_sound_rate = 44100 +-picodrive_ramcart = disabled +-picodrive_dacnoise = disabled +-picodrive_input1 = 3 button pad +-picodrive_input2 = 3 button pad +-picodrive_fm_filter = off +-picodrive_audio_filter = disabled +-picodrive_overclk68k = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Button 1 = B +bind Button 2 = A +bind Pause = START diff --git a/skeleton/EXTRAS/Emus/my355/SMS.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/SMS.pak/launch.sh new file mode 100644 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SMS.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/SUPA.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/SUPA.pak/default.cfg new file mode 100644 index 000000000..4a77a7b31 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SUPA.pak/default.cfg @@ -0,0 +1,16 @@ +-supafaust_pixel_format = rgb565 +-supafaust_thread_affinity_emu = 0x3 +-supafaust_thread_affinity_ppu = 0xc + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind Y Button = Y +bind X Button = X +bind B Button = B +bind A Button = A +bind L Button = L1 +bind R Button = R1 diff --git a/skeleton/EXTRAS/Emus/my355/SUPA.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/SUPA.pak/launch.sh new file mode 100644 index 000000000..09cc58d7a --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/SUPA.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=mednafen_supafaust +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/VB.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/VB.pak/default.cfg new file mode 100644 index 000000000..a83095a2b --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/VB.pak/default.cfg @@ -0,0 +1,20 @@ +minarch_cpu_speed = Performance + +-vb_3dmode = anaglyph +-vb_right_analog_to_digital = disabled + +bind L. Up = UP +bind L. Down = DOWN +bind L. Left = LEFT +bind L. Right = RIGHT +bind Select = SELECT +bind Start = START +bind A = A +bind B = B +bind L Button = L1 +bind R Button = R1 +bind Low Battery = NONE:X +bind R. Up = NONE:L2 +bind R. Down = NONE:L3 +bind R. Left = NONE:R2 +bind R. Right = NONE:R3 diff --git a/skeleton/EXTRAS/Emus/my355/VB.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/VB.pak/launch.sh new file mode 100644 index 000000000..4094998e9 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/VB.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=mednafen_vb +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Emus/my355/VIC.pak/default.cfg b/skeleton/EXTRAS/Emus/my355/VIC.pak/default.cfg new file mode 100644 index 000000000..48c64810e --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/VIC.pak/default.cfg @@ -0,0 +1,14 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind X Button = X +bind Y Button = Y +bind B Button = B +bind A Button = A +bind L1 Button = L1 +bind L2 Button = L2 +bind R1 Button = R1 +bind R2 Button = R2 diff --git a/skeleton/EXTRAS/Emus/my355/VIC.pak/launch.sh b/skeleton/EXTRAS/Emus/my355/VIC.pak/launch.sh new file mode 100644 index 000000000..1ff5fe536 --- /dev/null +++ b/skeleton/EXTRAS/Emus/my355/VIC.pak/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +EMU_EXE=vice_xvic +CORES_PATH=$(dirname "$0") + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/EXTRAS/Tools/my355/Battery.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Battery.pak/launch.sh new file mode 100644 index 000000000..c7cd4fcde --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Battery.pak/launch.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname "$0") +./battery.elf # &> ./log.txt diff --git a/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/apply.sh b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/apply.sh new file mode 100644 index 000000000..632a1c316 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/apply.sh @@ -0,0 +1,231 @@ +#!/bin/sh +# Boot logo installer for the Miyoo Flip (my355). +# +# Rewrites the boot image on raw NAND. That image also carries rk-kernel.dtb, so +# a bad or interrupted flash can leave the device booting without working +# hardware, or not booting at all. Nothing is written until the rebuilt image has +# been validated, so aborting before the flash leaves the device as it was. + +set -x +set -u + +DIR="$(cd "$(dirname "$0")" && pwd)" +SDCARD_PATH="${SDCARD_PATH:-/mnt/SDCARD}" +USERDATA_PATH="${USERDATA_PATH:-$SDCARD_PATH/.userdata/my355}" +WORK="/tmp/bootlogo" +BACKUP_DIR="$USERDATA_PATH/bootlogo" +BACKUP="$BACKUP_DIR/boot.img.orig" +MIN_BATTERY=30 + +SHOW_PID="" +HEARTBEAT_PID="" + +############################### + +# A write to a fifo with no reader blocks forever, so check the daemon is alive. +notify() { + [ -n "$SHOW_PID" ] || return 0 + kill -0 "$SHOW_PID" 2>/dev/null || return 0 + [ -p /tmp/show2.fifo ] || return 0 + echo "$1" > /tmp/show2.fifo 2>/dev/null + return 0 +} + +step() { + notify "PROGRESS:$1" + notify "TEXT:$2" + echo "== $2" +} + +stop_heartbeat() { + [ -n "$HEARTBEAT_PID" ] && kill "$HEARTBEAT_PID" 2>/dev/null + HEARTBEAT_PID="" + return 0 +} + +fail() { + stop_heartbeat + echo "ERROR: $1" + notify "TEXT:$1" + sleep 8 + notify "QUIT" + exit 1 +} + +# So a slow flash is not mistaken for a hung one. +heartbeat() { + elapsed=0 + while true; do + sleep 5 + elapsed=$((elapsed + 5)) + notify "TEXT:Flashing - DO NOT POWER OFF (${elapsed}s)" + done +} + +############################### + +LOGO_SPLASH="$SDCARD_PATH/.system/res/logo.png" +if [ -f "$SDCARD_PATH/.media/splash_logo.png" ]; then + LOGO_SPLASH="$SDCARD_PATH/.media/splash_logo.png" +fi + +show2.elf --mode=daemon --image="$LOGO_SPLASH" --text="Preparing..." --logoheight=80 --progress=-1 & +SHOW_PID=$! + +############################### + +step 5 "Checking device" + +# Resolve by name: mtd1 is uboot and mtd3 is rootfs, so a wrong index is fatal. +MTD_LINE=$(grep '"boot"$' /proc/mtd 2>/dev/null) +[ -n "$MTD_LINE" ] || fail "No 'boot' partition found in /proc/mtd" + +MTD_NAME=$(echo "$MTD_LINE" | cut -d: -f1) +MTD_DEV="/dev/$MTD_NAME" +MTD_RO="/dev/${MTD_NAME}ro" +MTD_SIZE=$(printf %d "0x$(echo "$MTD_LINE" | awk '{print $2}')" 2>/dev/null) + +[ -c "$MTD_DEV" ] || fail "$MTD_DEV is missing" +[ -c "$MTD_RO" ] || fail "$MTD_RO is missing" +[ -n "$MTD_SIZE" ] && [ "$MTD_SIZE" -gt 0 ] || fail "Could not read boot partition size" + +# A power loss mid-write bricks the device. +CAPACITY=$(cat /sys/class/power_supply/battery/capacity 2>/dev/null || echo 0) +CHARGING=$(cat /sys/class/power_supply/ac/online 2>/dev/null || echo 0) +if [ "$CHARGING" != "1" ] && [ "$CAPACITY" -lt "$MIN_BATTERY" ]; then + fail "Battery too low ($CAPACITY%) - charge to $MIN_BATTERY% or plug in" +fi + +[ -f "$DIR/payload/logo.bmp" ] || fail "payload/logo.bmp is missing" + +############################### + +step 10 "Preparing environment" + +# Leftovers from a previous run would be swept into the resource repack. +rm -rf "$WORK" +mkdir -p "$WORK" || fail "Could not create $WORK" +cp -r "$DIR"/payload/* "$WORK"/ || fail "Could not copy payload to $WORK" +cd "$WORK" || fail "Could not enter $WORK" + +export PATH="$WORK/bin:$PATH" +export LD_LIBRARY_PATH="$WORK/lib:${LD_LIBRARY_PATH:-}" + +############################### + +step 15 "Backing up boot partition" + +mkdir -p "$BACKUP_DIR" || fail "Could not create $BACKUP_DIR" + +# Keep the first backup, or a re-run would overwrite the pristine image. +if [ -f "$BACKUP" ]; then + echo "backup already present, keeping $BACKUP" +else + NEED_KB=$((MTD_SIZE / 1024 + 1024)) + AVAIL_KB=$(df "$SDCARD_PATH" | awk 'NR==2 {print $4}') + [ -n "$AVAIL_KB" ] || fail "Could not check free space on the SD card" + [ "$AVAIL_KB" -ge "$NEED_KB" ] || fail "Not enough free space for a backup (need ${NEED_KB}KB)" + + dd if="$MTD_RO" of="$BACKUP.tmp" bs=131072 || fail "Could not read the boot partition" + sync + BACKUP_SIZE=$(wc -c < "$BACKUP.tmp") + [ "$BACKUP_SIZE" -eq "$MTD_SIZE" ] || fail "Backup is incomplete ($BACKUP_SIZE of $MTD_SIZE bytes)" + [ "$(head -c 8 "$BACKUP.tmp")" = "ANDROID!" ] || fail "Backup does not look like a boot image" + mv "$BACKUP.tmp" "$BACKUP" || fail "Could not store the backup" + sync +fi + +############################### + +step 25 "Extracting boot.img" + +dd if="$MTD_RO" of=boot.img bs=131072 || fail "Could not read the boot partition" +[ -s boot.img ] || fail "Extracted boot.img is empty" +[ "$(head -c 8 boot.img)" = "ANDROID!" ] || fail "Extracted boot.img has no ANDROID! header" + +############################### + +step 40 "Unpacking boot.img" + +mkdir -p bootimg || fail "Could not create bootimg/" +unpackbootimg -i boot.img -o bootimg || fail "Could not unpack boot.img" +[ -s bootimg/boot.img-kernel ] || fail "Unpacked kernel is missing or empty" +[ -s bootimg/boot.img-second ] || fail "Unpacked resource image is missing or empty" + +############################### + +step 50 "Unpacking resources" + +mkdir -p bootres || fail "Could not create bootres/" +cp bootimg/boot.img-second bootres/ || fail "Could not stage the resource image" +cd bootres || fail "Could not enter bootres/" +rsce_tool -u boot.img-second || fail "Could not unpack the resource image" + +# The resource image carries the device tree; never repack a partial unpack. +[ -s rk-kernel.dtb ] || fail "Device tree missing after unpack - aborting" +[ -s logo.bmp ] || fail "logo.bmp missing after unpack - aborting" + +############################### + +step 60 "Replacing logo" + +cp -f "$WORK/logo.bmp" ./logo.bmp || fail "Could not replace logo.bmp" +cp -f "$WORK/logo.bmp" ./logo_kernel.bmp || fail "Could not replace logo_kernel.bmp" + +############################### + +step 70 "Packing updated resources" + +# Clear positional params - they are reused to build the rsce_tool arguments. +set -- +for file in *; do + [ "$(basename "$file")" != "boot.img-second" ] && set -- "$@" -p "$file" +done +rsce_tool "$@" || fail "Could not repack the resource image" +[ -s boot-second ] || fail "Repacked resource image is missing or empty" + +############################### + +step 80 "Packing updated boot.img" + +cp -f boot-second ../bootimg || fail "Could not stage the repacked resource image" +cd "$WORK" || fail "Could not return to $WORK" +rm -f boot.img + +mkbootimg --kernel bootimg/boot.img-kernel --second bootimg/boot-second --base 0x10000000 --kernel_offset 0x00008000 --ramdisk_offset 0xf0000000 --second_offset 0x00f00000 --pagesize 2048 --hashtype sha1 -o boot.img || fail "Could not build the new boot.img" + +# Last gate before anything is written to flash. +[ -s boot.img ] || fail "New boot.img is empty" +[ "$(head -c 8 boot.img)" = "ANDROID!" ] || fail "New boot.img has no ANDROID! header" + +NEW_SIZE=$(wc -c < boot.img) +KERNEL_SIZE=$(wc -c < bootimg/boot.img-kernel) +[ "$NEW_SIZE" -gt "$KERNEL_SIZE" ] || fail "New boot.img ($NEW_SIZE) is smaller than its kernel - aborting" +[ "$NEW_SIZE" -le "$MTD_SIZE" ] || fail "New boot.img ($NEW_SIZE) exceeds the boot partition ($MTD_SIZE) - use a smaller logo" + +############################### + +step 90 "Flashing boot.img" +notify "TEXT:Flashing - DO NOT POWER OFF" + +heartbeat & +HEARTBEAT_PID=$! + +flashcp -v boot.img "$MTD_DEV" +FLASH_RC=$? +stop_heartbeat + +# Partition may be partially written - do not reboot, leave the device reachable. +if [ $FLASH_RC -ne 0 ]; then + fail "Flash FAILED (code $FLASH_RC). Do NOT power off. Backup: $BACKUP" +fi + +sync + +############################### + +step 100 "Rebooting" +sleep 2 +reboot + +exit 0 diff --git a/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/launch.sh new file mode 100644 index 000000000..7f6676f36 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/launch.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname "$0") +./apply.sh > ./log.txt 2>&1 \ No newline at end of file diff --git a/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo-original.bmp b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo-original.bmp new file mode 100644 index 000000000..6162709bf Binary files /dev/null and b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo-original.bmp differ diff --git a/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo.bmp b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo.bmp new file mode 100644 index 000000000..347142c82 Binary files /dev/null and b/skeleton/EXTRAS/Tools/my355/Bootlogo.pak/payload/logo.bmp differ diff --git a/skeleton/EXTRAS/Tools/my355/Clock.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Clock.pak/launch.sh new file mode 100644 index 000000000..7eba99d00 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Clock.pak/launch.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname "$0") +./clock.elf diff --git a/skeleton/EXTRAS/Tools/my355/Files.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Files.pak/launch.sh new file mode 100644 index 000000000..30db9507a --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Files.pak/launch.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +cd $(dirname "$0") + +HOME="$SDCARD_PATH" +CFG="my355.cfg" + + +./NextCommander --config $CFG > launch.log \ No newline at end of file diff --git a/skeleton/EXTRAS/Tools/my355/Files.pak/my355.cfg b/skeleton/EXTRAS/Tools/my355/Files.pak/my355.cfg new file mode 100644 index 000000000..636affec8 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Files.pak/my355.cfg @@ -0,0 +1,6 @@ +disp_width=640 +disp_height=480 +disp_autoscale=1 +disp_autoscale_dpi=1 +disp_ppu_x=3 +disp_ppu_y=3 \ No newline at end of file diff --git a/skeleton/EXTRAS/Tools/my355/Game Tracker.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Game Tracker.pak/launch.sh new file mode 100644 index 000000000..86e09ee15 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Game Tracker.pak/launch.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd "$(dirname "$0")" +./gametime.elf # &> ./log.txt diff --git a/skeleton/EXTRAS/Tools/my355/Input.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Input.pak/launch.sh new file mode 100644 index 000000000..ca0aefe28 --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Input.pak/launch.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $(dirname "$0") +./minput.elf diff --git a/skeleton/EXTRAS/Tools/my355/Settings.pak/launch.sh b/skeleton/EXTRAS/Tools/my355/Settings.pak/launch.sh new file mode 100644 index 000000000..006467eae --- /dev/null +++ b/skeleton/EXTRAS/Tools/my355/Settings.pak/launch.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +SDCARD_PATH="/mnt/SDCARD" +USERDATA_PATH="$SDCARD_PATH/.userdata" +SHARED_USERDATA_PATH="$USERDATA_PATH/shared" + +cd $(dirname "$0") +./settings.elf > settings.log 2>&1 diff --git a/skeleton/EXTRAS/Tools/tg5050/Remove Loading.pak/done.png b/skeleton/EXTRAS/Tools/tg5050/Remove Loading.pak/done.png deleted file mode 100644 index 3615d7147..000000000 Binary files a/skeleton/EXTRAS/Tools/tg5050/Remove Loading.pak/done.png and /dev/null differ diff --git a/skeleton/SYSTEM/my355/bin/governor.sh b/skeleton/SYSTEM/my355/bin/governor.sh new file mode 100755 index 000000000..e3c1eee8d --- /dev/null +++ b/skeleton/SYSTEM/my355/bin/governor.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# governor.sh - CPU governor controller for MY355 +# Usage: governor.sh +# Modes: auto, performance, powersave + +MODE="$1" +[ -z "$MODE" ] && MODE="auto" + +set_policy() { + local policy_path="$1" + local governor="$2" + local max_type="$3" # "second_max", "max", or "mid" + + [ -f "$policy_path/scaling_available_frequencies" ] || return 0 + FREQS=$(cat "$policy_path/scaling_available_frequencies" | tr ' ' '\n' | grep -v '^$' | sort -n) + MIN_FREQ=$(echo "$FREQS" | head -1) + + case "$max_type" in + second_max) + MAX_FREQ=$(echo "$FREQS" | tail -2 | head -1) + ;; + max) + MAX_FREQ=$(echo "$FREQS" | tail -1) + ;; + mid) + COUNT=$(echo "$FREQS" | wc -l) + MID=$(( (COUNT + 1) / 2 )) + MAX_FREQ=$(echo "$FREQS" | sed -n "${MID}p") + ;; + *) + MAX_FREQ=$(echo "$FREQS" | tail -1) + ;; + esac + + echo "$governor" > "$policy_path/scaling_governor" 2>/dev/null || true + echo "$MIN_FREQ" > "$policy_path/scaling_min_freq" + echo "$MAX_FREQ" > "$policy_path/scaling_max_freq" +} + +case "$MODE" in + auto) + # schedutil governor, min freq to one step below max (408-1800 MHz on MY355) + set_policy /sys/devices/system/cpu/cpufreq/policy0 "schedutil" "second_max" + ;; + performance) + # performance governor, max freq (1992 MHz on MY355) + set_policy /sys/devices/system/cpu/cpufreq/policy0 "performance" "max" + ;; + powersave) + # conservative governor, min freq to midpoint max (408-1200 MHz on MY355) + set_policy /sys/devices/system/cpu/cpufreq/policy0 "conservative" "mid" + ;; + *) + echo "governor.sh: unknown mode '$MODE'" >&2 + echo " Valid modes: auto, performance, powersave" >&2 + exit 1 + ;; +esac diff --git a/skeleton/SYSTEM/my355/bin/run_hooks.sh b/skeleton/SYSTEM/my355/bin/run_hooks.sh new file mode 100755 index 000000000..16743daf2 --- /dev/null +++ b/skeleton/SYSTEM/my355/bin/run_hooks.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# run_hooks.sh - shared hook runner for NextUI +# Usage: run_hooks.sh [--sync-only] +# +# dir-name: directory name under $USERDATA_PATH/.hooks/ (e.g. pre-launch.d, boot.d) +# --sync-only: force all scripts to run synchronously +# +# By default, scripts run in the background. Scripts ending in .sync.sh +# always run synchronously. All background scripts are waited on before exit. + +DIR_NAME="$1" +SYNC_ONLY="${2:-}" + +: "${SDCARD_PATH:=/mnt/SDCARD}" +: "${PLATFORM:=my355}" +: "${USERDATA_PATH:=$SDCARD_PATH/.userdata/$PLATFORM}" + +HOOK_DIR="$USERDATA_PATH/.hooks/$DIR_NAME" +[ -d "$HOOK_DIR" ] || exit 0 + +case "$DIR_NAME" in + pre-*) export HOOK_PHASE="pre" ;; + post-*) export HOOK_PHASE="post" ;; + boot*) export HOOK_PHASE="boot" ;; +esac +export HOOK_CATEGORY="$DIR_NAME" + +for script in "$HOOK_DIR"/*.sh; do + [ -f "$script" ] || continue + if [ "$SYNC_ONLY" = "--sync-only" ] || echo "$script" | grep -q '\.sync\.sh$'; then + ( "$script" ) > /dev/null 2>&1 || true + else + ( "$script" ) > /dev/null 2>&1 & + fi +done +wait diff --git a/skeleton/SYSTEM/my355/bin/shutdown b/skeleton/SYSTEM/my355/bin/shutdown new file mode 100755 index 000000000..a9e7808ef --- /dev/null +++ b/skeleton/SYSTEM/my355/bin/shutdown @@ -0,0 +1,8 @@ +#!/bin/sh + +cat /dev/zero > /dev/fb0 +poweroff + +while :; do + sleep 5 +done diff --git a/skeleton/SYSTEM/my355/bin/suspend b/skeleton/SYSTEM/my355/bin/suspend new file mode 100644 index 000000000..f4b0ec490 --- /dev/null +++ b/skeleton/SYSTEM/my355/bin/suspend @@ -0,0 +1,157 @@ +#!/bin/sh +set -uo pipefail +set +e +exec 0<&- + +#logfile="/mnt/SDCARD/.userdata/my355/logs/suspend_$(date +%Y%m%d_%H%M%S).log" +#exec >> "$logfile" 2>&1 + +log() { + >&2 echo "$1" +} + +sleep_retval= + +wifid_running= +bluetoothd_running= + +LID_PATH=/sys/devices/platform/hall-mh248/hallvalue + + +lid_open() { + # No hinge sensor: treat as always open (nothing to gate on). + [ -e "$LID_PATH" ] || return 0 + [ "$(cat "$LID_PATH" 2>/dev/null | tr -d '[:space:]')" = "1" ] +} + +# The rk817 PMIC's IRQ is a shared demux line (power button + charger/ +# battery events) that the kernel always arms as a hw wakeup source, so +# a charger plug-in resumes the SoC with no userspace way to mask just +# that sub-event. Since the lid must be open for a real wake on this +# hinged device, retry suspend for as long as we wake while the lid is +# still closed (e.g. a charger-triggered wake), independent of +# sleep_max_tries. Sets the global sleep_retval. +suspend_until_lid_open() { + while true; do + echo mem > /sys/power/state + sleep_retval=$? + + if [ $sleep_retval -ne 0 ] || lid_open; then + break + fi + + sleep 2 + + # Check the lid one more time in case user opened it during the sleep window + if lid_open; then + break + fi + + log "Woke while lid still closed: retrying suspend" + done +} + +fix_sleep_sound_bug() { + # turn it off and on again + val=$(amixer cget numid=2 | awk -F'values=' '/: values/{print $2}') + # This equals amixer sset 'Playback Path' 'OFF' + amixer cset numid=2 0 + # This equals amixer sset 'Playback Path' 'HP'/'SPK' + amixer cset numid=2 $val +} + +before() { + log "Preparing for suspend..." + + # Run pre-sleep hooks synchronously before services are stopped. + # Subshell ensures a crashing hook cannot block suspend. + ( "$SYSTEM_PATH/bin/run_hooks.sh" pre-sleep.d --sync-only ) >/dev/null 2>&1 || true + + if pgrep bluetoothd >/dev/null 2>&1; then + bluetoothd_running=1 + log "Stopping bluetoothd..." + "$SYSTEM_PATH/etc/bluetooth/bt_init.sh" stop || true + fi + + if pgrep wpa_supplicant >/dev/null 2>&1; then + wifid_running=1 + log "Stopping wpa_supplicant..." + "$SYSTEM_PATH/etc/wifi/wifi_init.sh" stop || true + fi + + touch /tmp/system_suspend +} + +after() { + # Run post-resume hooks in background immediately after wake. + ( "$SYSTEM_PATH/bin/run_hooks.sh" post-resume.d ) >/dev/null 2>&1 & + + log "Restoring brightness" + # TODO save and restore backlight settings + echo 100 > /sys/class/leds/work/brightness + + # Backgrounded: the frontend is blocked in system() until this script + # exits, so it cannot poll input until network bring-up finishes. + ( + if [ -n "$wifid_running" ]; then + log "Starting wpa_supplicant..." + "$SYSTEM_PATH/etc/wifi/wifi_init.sh" start || true + fi + + if [ -n "$bluetoothd_running" ]; then + log "Starting bluetoothd..." + "$SYSTEM_PATH/etc/bluetooth/bt_init.sh" start || true + fi + ) & + + rm /tmp/system_suspend + # fix_sleep_sound_bug + + log "Resumed from suspend." +} + +before + +log "Suspending..." +sync +echo deep > /sys/power/mem_sleep + +sleep_max_tries=5 +for i in $(seq 1 $sleep_max_tries); do + log "Deep sleep attempt $i of $sleep_max_tries" + + sleep_time=$(date +%s) + + suspend_until_lid_open + + log "Deep sleep: kernel returned $sleep_retval" + if [ $sleep_retval -eq 0 ]; then + break + fi + + wake_time=$(date +%s) + time_asleep=$(($wake_time-$sleep_time)) + + # Workaround for a strange false negative case where + # the device sleeps properly but still returns non-zero. + # If unaddressed, the device would sleep again immediately + # after the user tried to wake it. + + # If device has been asleep for longer than a set period, + # ignore the retval and continue with waking the device. + if [ $time_asleep -gt 5 ]; then + log "Deep sleep: averting false negative retval - (sleep for $time_asleep secs)" + sleep_retval=0 + break + fi + + log "Deep sleep failed: retrying in 3 seconds" + sleep 3 +done + +log "Resuming..." + +# Resume services in background to reduce UI latency +after & + +exit $sleep_retval diff --git a/skeleton/SYSTEM/my355/cores/.keep b/skeleton/SYSTEM/my355/cores/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/skeleton/SYSTEM/my355/dat/.keep b/skeleton/SYSTEM/my355/dat/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/skeleton/SYSTEM/my355/etc/bluetooth/bt_init.sh b/skeleton/SYSTEM/my355/etc/bluetooth/bt_init.sh new file mode 100755 index 000000000..60e6f2a31 --- /dev/null +++ b/skeleton/SYSTEM/my355/etc/bluetooth/bt_init.sh @@ -0,0 +1,159 @@ +#!/bin/sh +# Bluetooth initialization script for NextUI +bt_hciattach="hciattach" +DEVICE_NAME="Miyoo Flip (NextUI)" + +reset_bluetooth_power() { + rfkill.elf block bluetooth + sleep 1 + rfkill.elf unblock bluetooth + sleep 1 +} + +start_hci_attach() +{ + h=`ps | grep "$bt_hciattach" | grep -v grep` + [ -n "$h" ] && { + killall "$bt_hciattach" + } + + #echo 1 > /proc/bluetooth/sleep/btwrite + reset_bluetooth_power + + #xradio init + "$bt_hciattach" -n ttyS1 xradio >/dev/null 2>&1 & + + wait_hci0_count=0 + while true + do + [ -d /sys/class/bluetooth/hci0 ] && break + usleep 100000 + let wait_hci0_count++ + [ $wait_hci0_count -eq 70 ] && { + echo "bring up hci0 failed" + exit 1 + } + done +} + +start_bt() { + # Load BT driver module if not loaded + if ! lsmod | grep -q rtk_btusb; then + insmod /lib/modules/rtk_btusb.ko 2>/dev/null + sleep 0.5 + fi + + rfkill.elf unblock bluetooth + + if [ -d "/sys/class/bluetooth/hci0" ];then + echo "Bluetooth init has been completed!!" + else + start_hci_attach + fi + + # Start bluetooth daemon if not running + d=`ps | grep bluetoothd | grep -v grep` + [ -z "$d" ] && { + /etc/init.d/S40bluetooth start + sleep 1 + } + + a=`ps | grep bluealsa | grep -v grep` + [ -z "$a" ] && { + # bluealsa -p a2dp-source --keep-alive=-1 & + bluealsa -p a2dp-source & + sleep 1 + # Power on adapter + bluetoothctl power on 2>/dev/null + + # Set discoverable and pairable + bluetoothctl discoverable on 2>/dev/null + bluetoothctl pairable on 2>/dev/null + + # Set default agent for automatic pairing (no input/output) + bluetoothctl agent NoInputNoOutput 2>/dev/null + bluetoothctl default-agent 2>/dev/null + + # Set adapter name + bluetoothctl system-alias "$DEVICE_NAME" 2>/dev/null + } + +} + +ble_start() { + rfkill.elf unblock bluetooth + + if [ -d "/sys/class/bluetooth/hci0" ];then + echo "Bluetooth init has been completed!!" + else + start_hci_attach + fi + + hci_is_up=`hciconfig hci0 | grep RUNNING` + [ -z "$hci_is_up" ] && { + hciconfig hci0 up + } + + MAC_STR=`hciconfig | grep "BD Address" | awk '{print $3}'` + LE_MAC=${MAC_STR/2/C} + OLD_LE_MAC_T=`cat /sys/kernel/debug/bluetooth/hci0/random_address` + OLD_LE_MAC=$(echo $OLD_LE_MAC_T | tr [a-z] [A-Z]) + if [ -n "$LE_MAC" ];then + if [ "$LE_MAC" != "$OLD_LE_MAC" ];then + hciconfig hci0 lerandaddr $LE_MAC + else + echo "the ble random_address has been set." + fi + fi +} + +stop_bt() { + # stop bluealsa + killall bluealsa 2>/dev/null + + # Stop bluetooth service + d=`ps | grep bluetoothd | grep -v grep` + [ -n "$d" ] && { + # stop bluetoothctl + bluetoothctl power off 2>/dev/null + #bluetoothctl discoverable off 2>/dev/null + bluetoothctl pairable off 2>/dev/null + #bluetoothctl remove $(bluetoothctl devices | awk '{print $2}') 2>/dev/null + killall bluetoothctl 2>/dev/null + killall bluetoothd + sleep 1 + } + + hciconfig hci0 down + t=`ps | grep hcidump | grep -v grep` + [ -n "$t" ] && { + killall hcidump + } + + h=`ps | grep "$bt_hciattach" | grep -v grep` + [ -n "$h" ] && { + killall "$bt_hciattach" + usleep 500000 + } + #echo 0 > /proc/bluetooth/sleep/btwrite + rfkill.elf block bluetooth + echo "stop bluetoothd and hciattach" +} + +case "$1" in + start) + start_bt + ;; + stop) + stop_bt + ;; + restart) + stop_bt + sleep 0.5 + start_bt + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/etc/wifi/wifi_init.sh b/skeleton/SYSTEM/my355/etc/wifi/wifi_init.sh new file mode 100755 index 000000000..e46d3f94c --- /dev/null +++ b/skeleton/SYSTEM/my355/etc/wifi/wifi_init.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +WIFI_INTERFACE="wlan0" +WPA_SUPPLICANT_CONF="/userdata/cfg/wpa_supplicant.conf" + +# The USB wifi adapter is re-enumerated on resume, so wlan0 is gone for a couple +# of seconds. Without waiting, wpa_supplicant binds to a missing interface. +wait_for_interface() { + i=0 + while [ ! -e "/sys/class/net/$WIFI_INTERFACE" ]; do + i=$((i + 1)) + if [ $i -gt 50 ]; then # ~10s + echo "wifi_init: $WIFI_INTERFACE did not appear, continuing anyway" >&2 + return 1 + fi + sleep 0.2 + done + return 0 +} + +start() { + insmod /system/lib/modules/RTL8189FU.ko 2>/dev/null + rfkill.elf unblock wifi + /etc/init.d/S36load_wifi_modules start + wait_for_interface + /etc/init.d/S40network start + /etc/init.d/S41dhcpcd start + + # Start wpa_supplicant if not running + if ! pidof wpa_supplicant > /dev/null 2>&1; then + wpa_supplicant -B -i $WIFI_INTERFACE -c $WPA_SUPPLICANT_CONF -O /var/run/wpa_supplicant -D nl80211 2>/dev/null + sleep 0.5 + fi + + # Start DHCP client to obtain IP address + if ! pidof udhcpc > /dev/null 2>&1; then + udhcpc -i $WIFI_INTERFACE -b 2>/dev/null + fi +} + +stop() { + /etc/init.d/S41dhcpcd stop + /etc/init.d/S40network stop + /etc/init.d/S36load_wifi_modules stop + + rfkill.elf block wifi + + # Kill wpa_supplicant + killall wpa_supplicant 2>/dev/null + + # Kill DHCP client + killall udhcpc 2>/dev/null +} + +case "$1" in + start|"") + start + ;; + stop) + stop + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 +esac \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/lib/.keep b/skeleton/SYSTEM/my355/lib/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/skeleton/SYSTEM/my355/paks/Emus/FC.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/FC.pak/default.cfg new file mode 100755 index 000000000..90365a9d1 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/FC.pak/default.cfg @@ -0,0 +1,20 @@ +fceumm_sndquality = High +fceumm_sndvolume = 10 +-fceumm_aspect = 8:7 PAR +-fceumm_turbo_enable = Player 1 +-fceumm_show_adv_system_options = disabled +-fceumm_show_adv_sound_options = disabled + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind Change Disk = NONE:L1 +bind Insert Disk = NONE:R1 +bind Insert Coin = NONE:R2 diff --git a/skeleton/SYSTEM/my355/paks/Emus/FC.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/FC.pak/launch.sh new file mode 100755 index 000000000..780ad5456 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/FC.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=fceumm + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GB.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/GB.pak/default.cfg new file mode 100755 index 000000000..a5ec62866 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GB.pak/default.cfg @@ -0,0 +1,20 @@ +minarch_screen_scaling = Native + +gambatte_gb_colorization = internal +gambatte_gb_internal_palette = TWB64 - Pack 1 +gambatte_gb_palette_twb64_1 = TWB64 038 - Pokemon mini Ver. +gambatte_gb_bootloader = disabled +-gambatte_audio_resampler = sinc + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind Prev. Palette = NONE:L1 +bind Next Palette = NONE:R1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GB.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/GB.pak/launch.sh new file mode 100755 index 000000000..9b93f4e5d --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GB.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=gambatte + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/default.cfg new file mode 100755 index 000000000..ea76e21f6 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/default.cfg @@ -0,0 +1,14 @@ +-gpsp_save_method = libretro + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind L Button = L1 +bind R Button = R1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/launch.sh new file mode 100755 index 000000000..0ed0b8f3f --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GBA.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=gpsp + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/default.cfg new file mode 100755 index 000000000..c854f885e --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/default.cfg @@ -0,0 +1,17 @@ +minarch_screen_scaling = Native + +gambatte_gb_bootloader = disabled +-gambatte_audio_resampler = sinc + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind A Button = A +bind B Button = B +bind A Turbo = NONE:X +bind B Turbo = NONE:Y +bind Prev. Palette = NONE:L1 +bind Next Palette = NONE:R1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/launch.sh new file mode 100755 index 000000000..9b93f4e5d --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/GBC.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=gambatte + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/MD.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/MD.pak/default.cfg new file mode 100755 index 000000000..dac408932 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/MD.pak/default.cfg @@ -0,0 +1,18 @@ +-picodrive_sound_rate = 44100 +-picodrive_smstype = Auto +-picodrive_smsfm = off +-picodrive_smsmapper = Auto +-picodrive_ggghost = off + +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Mode = SELECT +bind Start = START +bind A Button = Y +bind B Button = X:B +bind C Button = A +bind X Button = B:L1 +bind Y Button = L1:X +bind Z Button = R1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/MD.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/MD.pak/launch.sh new file mode 100755 index 000000000..8ceb019a2 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/MD.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=picodrive + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/PS.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/PS.pak/default.cfg new file mode 100755 index 000000000..c04e29f59 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/PS.pak/default.cfg @@ -0,0 +1,26 @@ +-minarch_thread_video = Off + +-pcsx_rearmed_display_internal_fps = disabled +-pcsx_rearmed_show_input_settings = disabled +minarch_rewind_buffer_mb = 128 +minarch_rewind_granularity = 33 +minarch_rewind_compression_speed = 12 +minarch_rewind_compression = On + +pcsx_rearmed_dithering = enabled + +minarch_gamepad_type = 1 +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind Circle = A +bind Cross = B +bind Triangle = X +bind Square = Y +bind L1 Button = L1 +bind R1 Button = R1 +bind L2 Button = L2 +bind R2 Button = R2 \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/paks/Emus/PS.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/PS.pak/launch.sh new file mode 100755 index 000000000..d15d0b984 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/PS.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=pcsx_rearmed + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/default.cfg b/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/default.cfg new file mode 100755 index 000000000..8100f20a1 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/default.cfg @@ -0,0 +1,12 @@ +bind Up = UP +bind Down = DOWN +bind Left = LEFT +bind Right = RIGHT +bind Select = SELECT +bind Start = START +bind Y Button = Y +bind X Button = X +bind B Button = B +bind A Button = A +bind L Button = L1 +bind R Button = R1 \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/launch.sh b/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/launch.sh new file mode 100755 index 000000000..efbb14e2c --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/Emus/SFC.pak/launch.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +EMU_EXE=snes9x + +############################### + +EMU_TAG=$(basename "$(dirname "$0")" .pak) +ROM="$1" +mkdir -p "$BIOS_PATH/$EMU_TAG" +mkdir -p "$SAVES_PATH/$EMU_TAG" +mkdir -p "$CHEATS_PATH/$EMU_TAG" +HOME="$USERDATA_PATH" +cd "$HOME" +minarch.elf "$CORES_PATH/${EMU_EXE}_libretro.so" "$ROM" > "$LOGS_PATH/$EMU_TAG.txt" 2>&1 diff --git a/skeleton/SYSTEM/my355/paks/MinUI.pak/launch.sh b/skeleton/SYSTEM/my355/paks/MinUI.pak/launch.sh new file mode 100755 index 000000000..615dad965 --- /dev/null +++ b/skeleton/SYSTEM/my355/paks/MinUI.pak/launch.sh @@ -0,0 +1,161 @@ +#!/bin/sh + +export PLATFORM="my355" +export SDCARD_PATH="/mnt/SDCARD" +export BIOS_PATH="$SDCARD_PATH/Bios" +export ROMS_PATH="$SDCARD_PATH/Roms" +export SAVES_PATH="$SDCARD_PATH/Saves" +export CHEATS_PATH="$SDCARD_PATH/Cheats" +export SYSTEM_PATH="$SDCARD_PATH/.system/$PLATFORM" +export CORES_PATH="$SYSTEM_PATH/cores" +export USERDATA_PATH="$SDCARD_PATH/.userdata/$PLATFORM" +export SHARED_USERDATA_PATH="$SDCARD_PATH/.userdata/shared" +export LOGS_PATH="$USERDATA_PATH/logs" +export HOOKS_PATH="$USERDATA_PATH/.hooks" +export DATETIME_PATH="$SHARED_USERDATA_PATH/datetime.txt" +export HOME="$USERDATA_PATH" + +####################################### + +mkdir -p "$BIOS_PATH" +mkdir -p "$ROMS_PATH" +mkdir -p "$SAVES_PATH" +mkdir -p "$CHEATS_PATH" +mkdir -p "$USERDATA_PATH" +mkdir -p "$LOGS_PATH" +mkdir -p "$HOOKS_PATH" +mkdir -p "$SHARED_USERDATA_PATH/.minui" + +export DEVICE="my355" + +export IS_NEXT="yes" + +# clear shadercache unconditionally, until it properly invalidates itself +rm -rf $SDCARD_PATH/.shadercache + +####################################### + +#headphone jack +echo 150 > /sys/class/gpio/export +echo -n in > /sys/class/gpio/gpio150/direction + +#motor +echo 20 > /sys/class/gpio/export +echo -n out > /sys/class/gpio/gpio20/direction +echo -n 0 > /sys/class/gpio/gpio20/value + +#keyboard +echo 0 > /sys/class/miyooio_chr_dev/joy_type + +#backlight, the driver's brightness-levels won't go below 7.8% duty +echo backlight > /sys/bus/platform/drivers/pwm-backlight/unbind +echo 0 > /sys/class/pwm/pwmchip0/export + +# disable system-level lid handling +mv /dev/input/event1 /dev/input/event1.disabled + +####################################### + +export LD_LIBRARY_PATH=$SYSTEM_PATH/lib:/usr/miyoo/lib:$LD_LIBRARY_PATH +export PATH=$SYSTEM_PATH/bin:/usr/miyoo/bin:/usr/miyoo/sbin:$PATH + +#led +echo 100 > /sys/class/leds/work/brightness + +# start stock gpio input daemon +mkdir -p /tmp/miyoo_inputd +miyoo_inputd & + +sh "$SYSTEM_PATH/bin/governor.sh" "auto" + +keymon.elf & # &> $SDCARD_PATH/keymon.txt & +batmon.elf & # &> $SDCARD_PATH/batmon.txt & + +# start fresh, will be populated on the next connect +rm -f $USERDATA_PATH/.asoundrc +audiomon.elf &> $LOGS_PATH/audiomon.txt & + +# wifi handling +wifion=$(nextval.elf wifi | sed -n 's/.*"wifi": \([0-9]*\).*/\1/p') +if [ "$wifion" -eq 0 ]; then + $SYSTEM_PATH/etc/wifi/wifi_init.sh stop > /dev/null 2>&1 & +else + $SYSTEM_PATH/etc/wifi/wifi_init.sh start > /dev/null 2>&1 & +fi + +# BT handling +bluetoothon=$(nextval.elf bluetooth | sed -n 's/.*"bluetooth": \([0-9]*\).*/\1/p') +if [ "$bluetoothon" -eq 0 ]; then + $SYSTEM_PATH/etc/bluetooth/bt_init.sh stop > /dev/null 2>&1 & +else + $SYSTEM_PATH/etc/bluetooth/bt_init.sh start > /dev/null 2>&1 & +fi + +####################################### + +AUTO_PATH="$USERDATA_PATH/auto.sh" +if [ -f "$AUTO_PATH" ]; then + "$AUTO_PATH" # > $LOGS_PATH/auto.txt 2>&1 +fi + +# Composable boot hooks (run after auto.sh for backward compatibility) +"$SYSTEM_PATH/bin/run_hooks.sh" boot.d + +cd $(dirname "$0") + +####################################### +# Hook system + +parse_hook_cmd() { + HOOK_CMD="$1" + HOOK_EMU_PATH=$(echo "$HOOK_CMD" | sed "s/^'\\([^']*\\)'.*/\\1/") + _remainder=$(echo "$HOOK_CMD" | sed "s/^'[^']*'//") + if echo "$_remainder" | grep -q "'"; then + HOOK_TYPE="rom" + HOOK_ROM_PATH=$(echo "$_remainder" | sed "s/.*'\\([^']*\\)'.*/\\1/") + else + HOOK_TYPE="pak" + HOOK_ROM_PATH="" + fi + [ -f /tmp/last.txt ] && HOOK_LAST=$(cat /tmp/last.txt) || HOOK_LAST="" + export HOOK_CMD HOOK_EMU_PATH HOOK_TYPE HOOK_ROM_PATH HOOK_LAST +} + +####################################### + +# kill show2.elf if running +killall -9 show2.elf > /dev/null 2>&1 + +EXEC_PATH="/tmp/nextui_exec" +NEXT_PATH="/tmp/next" +touch "$EXEC_PATH" && sync + +# Enable audio idk why have to do this now +tinymix set 1 SPK + +while [ -f "$EXEC_PATH" ]; do + nextui.elf &> $LOGS_PATH/nextui.txt + # default launched paks to performance, they can change it themselves after launch if they want + sh "$SYSTEM_PATH/bin/governor.sh" "performance" + + if [ -f $NEXT_PATH ]; then + CMD=`cat $NEXT_PATH` + parse_hook_cmd "$CMD" + "$SYSTEM_PATH/bin/run_hooks.sh" pre-launch.d + eval $CMD + "$SYSTEM_PATH/bin/run_hooks.sh" post-launch.d + rm -f $NEXT_PATH + # reset to performance when exiting, UI will reset to auto if needed + sh "$SYSTEM_PATH/bin/governor.sh" "performance" + fi + + if [ -f "/tmp/poweroff" ]; then + shutdown + fi + if [ -f "/tmp/reboot" ]; then + reboot + sleep 60 + fi +done + +shutdown diff --git a/skeleton/SYSTEM/my355/shaders/colorfix.glsl b/skeleton/SYSTEM/my355/shaders/colorfix.glsl new file mode 100644 index 000000000..20a129919 --- /dev/null +++ b/skeleton/SYSTEM/my355/shaders/colorfix.glsl @@ -0,0 +1,21 @@ +#if defined(VERTEX) +attribute vec2 VertexCoord; +attribute vec2 TexCoord; +varying vec2 vTexCoord; + +void main() { + vTexCoord = TexCoord; + gl_Position = vec4(VertexCoord, 0.0, 1.0); +} +#endif + +#if defined(FRAGMENT) +precision mediump float; +uniform sampler2D Texture; +varying vec2 vTexCoord; + +void main() { + vec4 pixel = texture2D(Texture, vec2(vTexCoord.x, 1.0 - vTexCoord.y)); + gl_FragColor = vec4(pixel.a, pixel.b, pixel.g, pixel.r); +} +#endif \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/shaders/default.glsl b/skeleton/SYSTEM/my355/shaders/default.glsl new file mode 100644 index 000000000..539ab8478 --- /dev/null +++ b/skeleton/SYSTEM/my355/shaders/default.glsl @@ -0,0 +1,21 @@ +#if defined(VERTEX) +attribute vec2 VertexCoord; +attribute vec2 TexCoord; +varying vec2 vTexCoord; + +void main() { + // Flip Y-axis in the vertex shader + vTexCoord = vec2(TexCoord.x, 1.0 - TexCoord.y); // Flip Y + gl_Position = vec4(VertexCoord, 0.0, 1.0); +} +#endif + +#if defined(FRAGMENT) +precision mediump float; +uniform sampler2D Texture; +varying vec2 vTexCoord; + +void main() { + gl_FragColor = texture2D(Texture, vTexCoord); +} +#endif \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/shaders/noshader.glsl b/skeleton/SYSTEM/my355/shaders/noshader.glsl new file mode 100644 index 000000000..c7f94f998 --- /dev/null +++ b/skeleton/SYSTEM/my355/shaders/noshader.glsl @@ -0,0 +1,21 @@ +#if defined(VERTEX) +attribute vec2 VertexCoord; +attribute vec2 TexCoord; +varying vec2 vTexCoord; + +void main() { + // Flip Y-axis in the vertex shader + vTexCoord = vec2(TexCoord.x, TexCoord.y); // Flip Y + gl_Position = vec4(VertexCoord, 0.0, 1.0); +} +#endif + +#if defined(FRAGMENT) +precision mediump float; +uniform sampler2D Texture; +varying vec2 vTexCoord; + +void main() { + gl_FragColor = texture2D(Texture, vTexCoord); +} +#endif \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/shaders/overlay.glsl b/skeleton/SYSTEM/my355/shaders/overlay.glsl new file mode 100644 index 000000000..5672d1a90 --- /dev/null +++ b/skeleton/SYSTEM/my355/shaders/overlay.glsl @@ -0,0 +1,20 @@ +#if defined(VERTEX) +attribute vec2 VertexCoord; +attribute vec2 TexCoord; +varying vec2 vTexCoord; + +void main() { + vTexCoord = TexCoord; + gl_Position = vec4(VertexCoord, 0.0, 1.0); +} +#endif + +#if defined(FRAGMENT) +precision mediump float; +uniform sampler2D Texture; +varying vec2 vTexCoord; + +void main() { + gl_FragColor = texture2D(Texture, vec2(vTexCoord.x, 1.0 - vTexCoord.y)); +} +#endif \ No newline at end of file diff --git a/skeleton/SYSTEM/my355/shaders/pixellate.glsl b/skeleton/SYSTEM/my355/shaders/pixellate.glsl new file mode 100644 index 000000000..aa248462f --- /dev/null +++ b/skeleton/SYSTEM/my355/shaders/pixellate.glsl @@ -0,0 +1,143 @@ +// Pixellate Shader +// Copyright (c) 2011, 2012 Fes +// Permission to use, copy, modify, and/or distribute this software for any +// purpose with or without fee is hereby granted, provided that the above +// copyright notice and this permission notice appear in all copies. +// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +// (Fes gave their permission to have this shader distributed under this +// licence in this forum post: +// http://board.byuu.org/viewtopic.php?p=57295#p57295 + +// Parameter lines go here: +#pragma parameter INTERPOLATE_IN_LINEAR_GAMMA "Linear Gamma Weight" 1.0 0.0 1.0 1.0 + +#if defined(VERTEX) + +#if __VERSION__ >= 130 +#define COMPAT_VARYING out +#define COMPAT_ATTRIBUTE in +#define COMPAT_TEXTURE texture +#else +#define COMPAT_VARYING varying +#define COMPAT_ATTRIBUTE attribute +#define COMPAT_TEXTURE texture2D +#endif + +#ifdef GL_ES +#define COMPAT_PRECISION mediump +#else +#define COMPAT_PRECISION +#endif + +COMPAT_ATTRIBUTE vec4 VertexCoord; +COMPAT_ATTRIBUTE vec4 COLOR; +COMPAT_ATTRIBUTE vec4 TexCoord; +COMPAT_VARYING vec4 COL0; +COMPAT_VARYING vec4 TEX0; + +uniform mat4 MVPMatrix; +uniform COMPAT_PRECISION int FrameDirection; +uniform COMPAT_PRECISION int FrameCount; +uniform COMPAT_PRECISION vec2 OutputSize; +uniform COMPAT_PRECISION vec2 TextureSize; +uniform COMPAT_PRECISION vec2 InputSize; + +// vertex compatibility #defines +#define vTexCoord TEX0.xy +#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize +#define outsize vec4(OutputSize, 1.0 / OutputSize) + +void main() +{ + gl_Position = MVPMatrix * VertexCoord; + COL0 = COLOR; + TEX0.xy = TexCoord.xy; +} + +#elif defined(FRAGMENT) + +#if __VERSION__ >= 130 +#define COMPAT_VARYING in +#define COMPAT_TEXTURE texture +out vec4 FragColor; +#else +#define COMPAT_VARYING varying +#define FragColor gl_FragColor +#define COMPAT_TEXTURE texture2D +#endif + +#ifdef GL_ES +#ifdef GL_FRAGMENT_PRECISION_HIGH +precision highp float; +#else +precision mediump float; +#endif +#define COMPAT_PRECISION highp +#else +#define COMPAT_PRECISION +#endif + +uniform COMPAT_PRECISION int FrameDirection; +uniform COMPAT_PRECISION int FrameCount; +uniform COMPAT_PRECISION vec2 OutputSize; +uniform COMPAT_PRECISION vec2 TextureSize; +uniform COMPAT_PRECISION vec2 InputSize; +uniform sampler2D Texture; +COMPAT_VARYING vec4 TEX0; + +// fragment compatibility #defines +#define Source Texture +#define vTexCoord TEX0.xy + +#define SourceSize vec4(TextureSize, 1.0 / TextureSize) //either TextureSize or InputSize +#define outsize vec4(OutputSize, 1.0 / OutputSize) + +#ifdef PARAMETER_UNIFORM +uniform COMPAT_PRECISION float INTERPOLATE_IN_LINEAR_GAMMA; +#else +#define INTERPOLATE_IN_LINEAR_GAMMA 1.0 +#endif + +void main() +{ + vec2 texelSize = SourceSize.zw; + + vec2 range = vec2(abs(InputSize.x / (outsize.x * SourceSize.x)), abs(InputSize.y / (outsize.y * SourceSize.y))); + range = range / 2.0 * 0.999; + + float left = vTexCoord.x - range.x; + float top = vTexCoord.y + range.y; + float right = vTexCoord.x + range.x; + float bottom = vTexCoord.y - range.y; + + vec3 topLeftColor = COMPAT_TEXTURE(Source, (floor(vec2(left, top) / texelSize) + 0.5) * texelSize).rgb; + vec3 bottomRightColor = COMPAT_TEXTURE(Source, (floor(vec2(right, bottom) / texelSize) + 0.5) * texelSize).rgb; + vec3 bottomLeftColor = COMPAT_TEXTURE(Source, (floor(vec2(left, bottom) / texelSize) + 0.5) * texelSize).rgb; + vec3 topRightColor = COMPAT_TEXTURE(Source, (floor(vec2(right, top) / texelSize) + 0.5) * texelSize).rgb; + + if (INTERPOLATE_IN_LINEAR_GAMMA > 0.5){ + topLeftColor = pow(topLeftColor, vec3(2.2)); + bottomRightColor = pow(bottomRightColor, vec3(2.2)); + bottomLeftColor = pow(bottomLeftColor, vec3(2.2)); + topRightColor = pow(topRightColor, vec3(2.2)); + } + + vec2 border = clamp(floor((vTexCoord / texelSize) + vec2(0.5)) * texelSize, vec2(left, bottom), vec2(right, top)); + + float totalArea = 4.0 * range.x * range.y; + + vec3 averageColor; + averageColor = ((border.x - left) * (top - border.y) / totalArea) * topLeftColor; + averageColor += ((right - border.x) * (border.y - bottom) / totalArea) * bottomRightColor; + averageColor += ((border.x - left) * (border.y - bottom) / totalArea) * bottomLeftColor; + averageColor += ((right - border.x) * (top - border.y) / totalArea) * topRightColor; + + FragColor = (INTERPOLATE_IN_LINEAR_GAMMA > 0.5) ? vec4(pow(averageColor, vec3(1.0 / 2.2)), 1.0) : vec4(averageColor, 1.0); +} +#endif diff --git a/skeleton/SYSTEM/my355/system.cfg b/skeleton/SYSTEM/my355/system.cfg new file mode 100644 index 000000000..3d8dda39d --- /dev/null +++ b/skeleton/SYSTEM/my355/system.cfg @@ -0,0 +1,20 @@ +minarch_screen_scaling = Aspect +minarch_nrofshaders = 0 +minarch_shader1 = stock.glsl +minarch_shader1_filter = NEAREST +minarch_shader1_srctype = source +minarch_shader1_scaletype = source +minarch_shader1_upscale = 2 +minarch_shader2 = stock.glsl +minarch_shader2_filter = LINEAR +minarch_shader2_srctype = relative +minarch_shader2_scaletype = relative +minarch_shader2_upscale = 1 +minarch_shader3 = stock.glsl +minarch_shader3_filter = NEAREST +minarch_shader3_srctype = source +minarch_shader3_scaletype = source +minarch_shader3_upscale = screen +minarch_scale_filter = NEAREST +-minarch_prevent_tearing = Strict +-minarch_thread_video = Off diff --git a/skeleton/SYSTEM/tg5050/paks/MinUI.pak/launch.sh b/skeleton/SYSTEM/tg5050/paks/MinUI.pak/launch.sh index ec5a9af56..fd36cd027 100755 --- a/skeleton/SYSTEM/tg5050/paks/MinUI.pak/launch.sh +++ b/skeleton/SYSTEM/tg5050/paks/MinUI.pak/launch.sh @@ -183,6 +183,7 @@ killall -9 show2.elf > /dev/null 2>&1 EXEC_PATH="/tmp/nextui_exec" NEXT_PATH="/tmp/next" touch "$EXEC_PATH" && sync + while [ -f $EXEC_PATH ]; do nextui.elf &> $LOGS_PATH/nextui.txt # default launched paks to performance, they can change it themselves after launch if they want diff --git a/todo.txt b/todo.txt index 1da06e920..8d2667ffb 100644 --- a/todo.txt +++ b/todo.txt @@ -1,59 +1,9 @@ -Changes - -BASE - -- tg3040: removed (merged into tg5040) -- tg5040: improved audio quality (thanks maxbize) -- miyoomini: added rtc support, see README.txt (thanks sinedied) -- all: renamed "Thread Core" to "Prioritize Audio" (describe utility not implementation) - -EXTRAS - -- tg3040: removed (merged into tg5040) -- tg5040: added Files.pak -- rg35xxplus: added Swap Menu.pak (for 34xx, swaps MENU and SELECT buttons) - ---- - minarch can I ignore shortcut combo key input when shortcut is triggered? eg. PAD_cancel(BTN_NAME) the trick is ignoring the release - -h700/a133 - the power/shutdown issues are becoming a nuisance - ry said it fake powered down during auto-poweroff? - also affects paks that attempt to reboot, eg. - panel fix - swap keys - it must have something to do with some control loop not being broken properly - caused by systemd restarting the ui loop? - check dmenu.bin or dmenu_ln - no loop, just calls NextUI.pak/launch.sh directly - check higher, what's changed? - check PLAT_powerOff() - looks fine (breaks MinUI loop and exits) - -it's time to retire some supported devices - this will require some finesse for the Miyoo and Trimui devices - move static boot content from workspace/$@ to skeleton/BOOT - update makefile - devices running SDL1.2 or sub-480 - gkdpixel (no longer manufactured?) - trimuismart - rg35xx (og) - miyoomini (and plus) - m17 - devices that have been superceded - rgb30 (by cubexx) - magicmini (by own zero28?) - what would this look like if I nuked 32bit archs? - h700 has 64bit libs right? - my282 - - finish updating README (don't forget BASE readme!) -tg_040 +tg_*040 can I build my own version of SDL2 to speed up launch times? yes but no, built, no change in launch time :\ currently just getting the rendering context going takes ~500ms versus ~200ms on other devices @@ -61,10 +11,6 @@ tg_040 try to reproduce hung shutdowns and fix doesn't have or use a custom bin/shutdown -boot - another potential way to identify devices - echo `cat /proc/device-tree/model` - my355 firmware update https://www.lomiyoo.com/en/gujianxiazai.html @@ -91,76 +37,13 @@ my355 - exiting to minui displays correctly until first dirty - then padding changes to 640x480 style - who cares - -h700 - video says 64bit system, why is MinUI using 32bit libraries then? - create new 64bit toolchain? - based on debian bullseye? (base on the magic mini toolchain or old tg5040?) - -rg_xx - gbc runs poorly on the cubexx with patched panel - super obvious in Link's Awakening room transitions - gamma has a fix https://github.com/TheGammaSqueeze/rgxx_boot_package_mods/tree/rgcubexx - but the change is so extreme my patching method can't handle it - (because of the simple way I fudge the checksum...) screen scaling + screen effect aspect + grid on cubexx has grid alignment issues even if aspect equals integer probably due to blindly overscaling when integer would suffice -next - standard show/say/confirm.elf? - sdl2 implementations require a delay arg - because they clear the framebuffer on exit - so we can't use show + sleep or + confirm - - trimui's await_input makes it kind of like - a confirm.elf which I don't see in modern - MinUI...was that in MiniUI maybe? yes - - rg35xxplus sdl2 show.elf image.png delay - trimuismart sdl show.elf image.png - miyoomini fb0 show.elf image.png - trimui sdl show.elf image await_input - tg5040/tg3040 sdl2 show.elf image.png delay (uses window surface as screen) - rgb30 sdl2 show.elf image.png delay (uses window surface as screen) - rg35xxplus sdl2 show.elf image.png delay - - show.elf - all official uses of show.elf are used to display - text probably better handled by confirm.elf - - show.elf - (default) A confirms, B cancels (both CANCEL and OKAY buttons drawn) - nothing confirms or cancels, quits after (no buttons drawn) - only only A confirms, none cancel (only OKAY button drawn) - wait nothing confirms or cancels, must be killed (no buttons drawn) - - there's an issue with this - show.elf used during install/update - my282 - miyoomini - tg3040 - tg5040 - trimuismart - where fonts and bundled libs aren't available yet - - no intel toolchain - magicmini - zero28 - my355 - - slow buildroot evtest - https://discord.com/channels/741895796315914271/1232969624417730630/1284606079614849084 - - mgba (at least on the mm+) doesn't like zipped roms - try to reproduce on something with adb or ssh - couldn't reproduce on - trimuismart - my282 - I guess maybe tmpfs is just super slow on miyoomini? - +next redo audio pipeline I think fceumm has issues on more devices than not at this point (thanks h700) 400 SAMPLES fix isn't a true fix, it just minimizes the side effect @@ -176,46 +59,12 @@ next clean out this rat nest of a todo doc - figure out Clock.pak timezone issue - - magicmini - check out silent hill (PS) for simple versus gaussian interpolation - supposedly awful on simple - screen does not really turn off during sleep - it doesn't blank either - it does if I manually set it to 4 with 351Files :thinking_face: - - move amixer cset name='Playback Path' SPK to libmsettings - see rg35xx,rgb30,m17 for keymon poll examples - /sys/class/gpio/gpio86/value is meant to be 0 when headphones are connected (only at boot?) - but its always 1 - so we can only detect headphone change events not initial state - which makes separate speaker/headphone volumes useless RIP - - audio is choppy in places - even after 400 sample fix - - h700 - implement cpu speed (or figure out why it wasn't already implemented) - - my282 - ldd isn't working but this is - LD_TRACE_LOADED_OBJECTS=1 /lib/ld-2.23.so /mnt/SDCARD/.system/my282/bin/minarch.elf - - emu pak detection isn't working when two folders are combined - eg. SFC and SUPA folder but no SUPA.pak still shows games from SUPA + all look into how many cores support 8888 this might be a bottleneck (if it's having to go 8888 to 565 and back to 8888 for every pixel, every frame) not a single BASE or EXTRA core requests 8888, so that won't help even if it is a bottleneck - - Thread Core - needs changes to support systems that change resolution (eg. PS) - doesn't seem to have any affect on a30 (mostly because the problems are hi res games and the copy from cpu to gpu) - disable and remove this feature entirely? - - revisit bub181's core # vs freq ideas for other devices - + look into RETRO_ENVIRONMENT_GET_CURRENT_SOFTWARE_FRAMEBUFFER for zero copy framebuffer not sure it's really a zero copy because LockTexture has to copy the texture from the gpu to the cpu... @@ -227,161 +76,16 @@ next try using SDL_UpdateTexture instead of Lock/Unlock might be saving 1-2ms could this slowness be related to vram speed? (DMC?) - - add Clear Recently Played.pak, copy to all platforms - maybe include confirmation? - requires show.elf - limit option name replacements based on core lib name - noui - https://gist.github.com/shauninman/20d59da8621f79ff65ad561b7ed2b6f4 - quit doesn't work as expected on trimuismart - possibly because of absense of shutdown? - h700 - hijack boot earlier? - hangs boot - reflashing a fresh stock image takes too long to happily trial and error this - was able to "takeover" /etc/init.d/launcher.sh and inject it into systemd's basic.target - but it didn't improve boot time - look into using fbdev directly - I was able to get this working - SDL_NOMOUSE=1 required for SDL1.2 to work - WAITFORVSYNC doesn't appear to work - more notes in separate 28xx/notes.txt - - muos uses sdl 1.2 fbdev_mali+alsa for retroarch...which what - refried beans uses SDL2 - no underruns in fceumm without threaded video...even with the sdl2 instead of default gl driver... - i tried copying muos libsdl2 to minui but I think I grabbed the 64bit version, is there a 32 bit version? - yes but it's built with a newer version of glibc than stock - so I'm back to having to build my own rootfs - or building sdl2 from muos with my toolchain - stock uses sdl2 fbdev_mali+alsa for retroarch - stock retroarch has frame pacing issues in AoS/gpsp - without threaded video - fceumm has underruns without threaded video - minarch has the same issues on refried muos - needs modified lib path (because muos is 64bit by default) - export LD_LIBRARY_PATH=$SYSTEM_PATH/lib:/usr/lib32 - might have also had to hide MinUI's libSDL* - SDL_BLITTER_DISABLED=1 has no effect on underruns - - diff older version of stock that doesn't underrun so bad - compare with rg35xxplus (I don't remember having audio issues there) - the problem is the panel is being driven at 59fps - nope, fixed that with boot_package dtb patch and it still underruns - wtf - two things mitigate the effect of the problem - change SAMPLES to 400 - makes underruns much less frequent and much smaller - because fceumm fills the buffer ~799 samples at a time - works - also bumped buffer to 8 seconds then reverted to original 5 seconds - see if improved underruns persists without or if that a component of the fix - instead of zero filling on underrun fill with last frame values - makes the more regular 1-2 sample underruns almost unnoticeable - - is the batching logic responsible for lag somehow? - there's an SDL_Delay and a loop - but doubling BATCH_SIZE and switching to usleep(500) - didn't seem to help - SDL_Delay(1) actually delays for 1ms on this chip - tried renicing to -20, no help - played with taskset to no help - gba AoS judder persists even if audio is silenced - GFX_Flip blocks on tg5040 too, so many red herrings - I disabled audio entirely (didn't even initialize it) and the judder persisted - there's something rotten inside SDL_RenderPresent() - retry compiling sdl2 - figure out where SDL2-2.30.4 with mali came from (knulli? rocknix?) - no good, this one works https://github.com/JohnnyonFlame/SDL-malifbdev-rot - solves judder - - rebuild using opengl? - based on steward-fu's work - https://steward-fu.github.io/website/handheld/rg28xx_cpp_es_triangle.htm - https://steward-fu.github.io/website/handheld/rg28xx_cpp_es_texture.htm - - # add stock libs and includes to toolchain - # what was sysroot.tar.gz created from? just /usr on the device? probably - - tar -czf sysroot.tar.gz /usr/include /usr/lib /usr/lib32 - - # will convert to xz in docker - - mv sysroot.tar.gz /opt - cd /opt - mkdir h700 - tar -xvzf sysroot.tar.gz -C h700 - rm sysroot.tar.gz - rsync -a --ignore-existing /opt/h700/ /opt/rg35xxplus-toolchain/usr/arm-buildroot-linux-gnueabihf/sysroot/ - - # build flags - -lGLESv2 -lEGL -lmali -ldl - - tried building sdl2 myself it crashed and burned spectacularly - tried using taskset to bump priority but it already appears maxed - - - - /tmp/noui - show poweroff on quit in minarch if present - tricky because of thread core option... pretty sure nothing uses the various platform.h BUTTON_* macros (because SDLK_* mappings are so spotty on these devices) pretty sure they all use CODE_* or JOY_* now - - macos (for modern compiler and debugging tools, not for release!) - minarch - rg35xxplus/h - figure out - audio crackle on quit sdl - setting raw volume to 0 doesn't fix - implement jack - sysfs state doesn't update - check hdmi - nothing - /dev/hdmi? - - unzip60 - rename Makefile.trimuismartpro to just Makefile.minui? - gkdpixel - usb mode - rndis? related? /etc/default/configfs - bootlogo? - haven't located on disk or in memory - figure out dual sdcard support for mini? - non-plus snes9x2005 for perf? - codify alt paks to use stock standalone emus in MinUI - light bleed - experiement with /sys/devices/platform/jz-pwm-dev.0/jz-pwm/pwm0/period - default is 10000 - nothing - graphics - jitter while scrolling - but only on randon launches - othertimes it's perfectly smooth (same core, same game) - subpixel scaler work underway - gb/gbc - gba - nes/snes - - native Files.pak - I might just need to accept some duplication with MinUI (eg. Array and Directory/Entry arrays) - m17 - still haven't found way to disable volume controls - I think it's controlled by /usr/bin/gpio-volctrl.sh - but rootfs is a 500MB ro squashfs so patching isn't really ideal all - investigate Clock.pak issues (timezone related primarily) evtest random note: doesn't know about /dev/input/js0? standarize /bin/shutdown while (1) pause(); prevents shutdown on some platforms just system("rm /tmp/minui_exec") and exit(0) ? - .res - use standard naming (replace ext with png instead of append png) - better document the new Bootlogo.paks collections can't handle accented characters (eg. é) in path/rom name... wait, why can recents.txt but not collections.txt? @@ -406,83 +110,16 @@ next runs at 1fps possibly because minarch forces 60fps but this handheld runs at 75? - tg5040 - create PSP.pak and NDS.pak and document how to setup by copying assets from stock? - - can't detect headphone state at boot? - wifi - Splore.pak can pull updated lists from bbs but cannot download carts - no idea why - wget works on stock so I'm failing to initiaize the network properly - this gets ping working: udhcpc -i wlan0 - but wget is not compiled with ssl support - the following did not work to enable opkg to install/update wget - - echo "src/gz openwrt_core_cortexa53 http://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages" > /etc/opkg/customfeeds.conf - echo "src/gz openwrt_core_sunxi http://downloads.openwrt.org/snapshots/targets/sunxi/cortexa53/packages" >> /etc/opkg/customfeeds.conf - - no valid architecture - just remap wget calls to curl (which has ssl support) - need to patch pico8_64 - - xxd old > old.hex - xxd new > new.hex - diff -u old.hex new.hex > pico8_64.patch - + tg5040 n64 requires libretro opengl implementation psp after adding xrgb8888 support to MinUI it still chokes on a number of missing libraries and eventually an unlinked function (something like XUnlockMutex) - - user reported - random reports of minui not booting reliably - first smart - can't reproduce - already waits 3 seconds - then rgb30 - related to orphaned clusters issue? likely - if so it needs to either be solved in MOSS/JELOS (RIP) - or the other platforms MinUI supports (the non-Plus Mini in particular has a really terrible shutdown process at least on older firmwares) - - all - revisit localization? minarch: crop save state pillar/letter-boxing? force aspect over hdmi? (or at least disable cropped?) - - rgb30 - reboots with time offset by timezone offset - does jack detection work? - could wifi support more than one access point? - an additional two lines for each AP? - then try them in order? - - figure out why power suspends the device after MOSS install - it appears to reboot but it only stops suspending after a manual reboot - fewt has a fix? - https://github.com/JustEnoughLinuxOS/distribution/pull/2195/files#diff-719d790f2d3c1d5a0884ae9eb69fb77956fcaaae235282acb6e6817339f35105 - - moss - build lib32 to try to fix snes9x save state compatibility - first attempt did not go well :sweat_smile: - -rpmini - dead in the water waiting for upstream fixes - evaluating batocera and rocknix as a base - requires ota update to enable booting direct - might also enable installing linux to emmc - currently seeing scaling artifacts (variable width pixel columns/rows) when blitting 1:1 - causes grid effects to look terrible - suspect it's the sytem level rotation - hoping it's not the physical pixels in the panel - see rpmini/tmp/sdltest - not going to work on this anymore until kernel fix is released - -known issues - all: race core (NGP/C.pak) doesn't restore audio state correctly - rgb30: light crackling in some cores (eg. fceumm and snes9x2005_plus) all minarch @@ -491,11 +128,6 @@ all prevent binding same MENU+button to control and shortcut at same time reset the newer input to None and show a message, ideal something like: MENU+