diff --git a/extras/Roms/Native Games (SH)/Rick Dangerous/Rick Dangerous.m3u b/extras/Roms/Native Games (SH)/Rick Dangerous/Rick Dangerous.m3u new file mode 100644 index 0000000..8db54d2 --- /dev/null +++ b/extras/Roms/Native Games (SH)/Rick Dangerous/Rick Dangerous.m3u @@ -0,0 +1 @@ +launch.sh diff --git a/extras/Roms/Native Games (SH)/Rick Dangerous/check-data.sh b/extras/Roms/Native Games (SH)/Rick Dangerous/check-data.sh new file mode 100644 index 0000000..cbd2b93 --- /dev/null +++ b/extras/Roms/Native Games (SH)/Rick Dangerous/check-data.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +DATA_URL="https://github.com/libretro/xrick-libretro/raw/master/data.zip" + +zipvalid() { + if [ "$(hexdump -n 4 -e '1/4 "%u"' "$1" 2> /dev/null)" = "67324752" ]; then + return 0 + fi + return 1 +} + +cd "$(dirname "$0")" +if [ -f ./data.zip ]; then + exit 0 +fi + +if [ -z "$(curl --version 2> /dev/null)" ] || ! (ip route get 1.1.1.1); then + show okay.png + say "Rick Dangerous data missing !"$'\n\n'"Please connect to internet to download"$'\n'"the data or see readme.txt in the"$'\n'"Rick Dangerous folder for manual"$'\n'"installation instructions."$'\n' + confirm only + exit 1 +fi +show confirm.png +say "Rick Dangerous data missing !"$'\n\n'"Do you want to download the"$'\n'"required data files now?"$'\n' +if ! confirm; then exit 1; fi + +progressui & +PROG_PID=$! +sleep 0.5 + +progress 0 "Checking for free space ..." + +sync +if ! [ "$(df -m /mnt/SDCARD/ | tail -1 | awk '{print $(NF-2);exit}')" -gt 50 ] 2>/dev/null; then + progress quit + wait $PROG_PID + show okay.png + say "Not enough free space !"$'\n\n'"50MB of free space is"$'\n'"required to proceed."$'\n' + confirm only + exit 0 +fi + + +progress 50 "Downloading data ..." +curl --silent -f --connect-timeout 30 -m 600 -L -k -o data.zip "$DATA_URL" && \ +zipvalid "data.zip" +if [ $? -ne 0 ] || [ ! -f ./data.zip ]; then + rm -rf data.zip + sync + progress quit + wait $PROG_PID + show okay.png + say "Data download failed !"$'\n\n'"Please see readme.txt in the"$'\n'"Rick Dangerous folder for manual"$'\n'"installation instructions."$'\n' + confirm only + exit 1 +fi + +sync +progress 100 "Launching game ..." +sleep 2 +progress quit +wait $PROG_PID +exit 0 diff --git a/extras/Roms/Native Games (SH)/Rick Dangerous/launch.sh b/extras/Roms/Native Games (SH)/Rick Dangerous/launch.sh new file mode 100644 index 0000000..4267bd0 --- /dev/null +++ b/extras/Roms/Native Games (SH)/Rick Dangerous/launch.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +PERF_LEVEL=performance + +############################### + +DIR="$(dirname "$0")" +HOME="$USERDATA_PATH" + +cd "$DIR" +echo "$PERF_LEVEL" > "$CPU_PATH" +if ./check-data.sh; then + cd "$HOME" + picoarch "$DIR/xrick_libretro.so" "$DIR/data.zip" +fi diff --git a/extras/Roms/Native Games (SH)/Rick Dangerous/readme.txt b/extras/Roms/Native Games (SH)/Rick Dangerous/readme.txt new file mode 100644 index 0000000..9f7a4f9 --- /dev/null +++ b/extras/Roms/Native Games (SH)/Rick Dangerous/readme.txt @@ -0,0 +1,12 @@ +Download the xrick data file from: + +https://github.com/libretro/xrick-libretro/raw/master/data.zip + +Place the zip file inside this Rick Dangerous folder. + +Do not unzip data.zip. + +--- + +CRC: 74B76447 +MD5: a471e64e9f69afbe59c10cc94ed1b184 diff --git a/makefile b/makefile index 74350b0..0bb06bb 100644 --- a/makefile +++ b/makefile @@ -137,6 +137,7 @@ payload: cp ./third-party/picoarch/output/prboom_libretro.so ./build/EXTRAS/Emus/DOOM.pak/ cp ./third-party/picoarch/cores/prboom/prboom.wad ./build/EXTRAS/Bios/DOOM/ cp ./third-party/picoarch/output/nxengine_libretro.so "./build/EXTRAS/Roms/Native Games (SH)/Cave Story/" + cp ./third-party/picoarch/output/xrick_libretro.so "./build/EXTRAS/Roms/Native Games (SH)/Rick Dangerous/" cp ./third-party/st-sdl/st ./build/EXTRAS/Tools/Terminal.pak/ cp ./third-party/dropbear-embedded/dropbear ./build/EXTRAS/Tools/SSH.pak/ cp ./third-party/vvvvvv/vvvvvv "./build/EXTRAS/Roms/Native Games (SH)/VVVVVV/"