diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-06 22:33:08 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-06 22:33:08 +0300 |
commit | df662d88330b8b678b0615702205328e012a8026 (patch) | |
tree | d0a5ad492acb1858b87307df35a2cd1726707644 /user_mods | |
parent | 3a7111a4c8cb629e0c96dfb50842fb4ef3979eed (diff) |
Mods are fixed for SNES Mini
Diffstat (limited to 'user_mods')
-rw-r--r-- | user_mods/music_hack.hmod/music.wav | bin | 44 -> 2712 bytes | |||
-rw-r--r-- | user_mods/music_hack.hmod/pb223_music_hack | 19 | ||||
-rw-r--r-- | user_mods/music_hack.hmod/readme.txt | 2 | ||||
-rw-r--r-- | user_mods/password.hmod/readme.txt | 2 | ||||
-rw-r--r-- | user_mods/remove_thumbnails.hmod/install | 14 | ||||
-rw-r--r-- | user_mods/remove_thumbnails.hmod/uninstall | 8 |
6 files changed, 35 insertions, 10 deletions
diff --git a/user_mods/music_hack.hmod/music.wav b/user_mods/music_hack.hmod/music.wav Binary files differindex 8dbde954..f767ab70 100644 --- a/user_mods/music_hack.hmod/music.wav +++ b/user_mods/music_hack.hmod/music.wav diff --git a/user_mods/music_hack.hmod/pb223_music_hack b/user_mods/music_hack.hmod/pb223_music_hack index 3715736f..7369426d 100644 --- a/user_mods/music_hack.hmod/pb223_music_hack +++ b/user_mods/music_hack.hmod/pb223_music_hack @@ -1,4 +1,19 @@ if [ $cfg_music_hack_enabled == "y" ]; then -overmount /usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav -overmount /usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav + +# NES Mini +[ -f "$mountpoint/usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav" ] && overmount /usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav +[ -f "$mountpoint/usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav" ] && overmount /usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav + +# SNES Mini (USA) +[ -f "$mountpoint/usr/share/ui/snes-usa/resources/sounds/hvc/bgm_boot.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav" "/usr/share/ui/snes-usa/resources/sounds/hvc/bgm_boot.wav" +[ -f "$mountpoint/usr/share/ui/snes-usa/resources/sounds/hvc/bgm_home.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav" "/usr/share/ui/snes-usa/resources/sounds/hvc/bgm_home.wav" + +# SNES Mini (EUR) +[ -f "$mountpoint/usr/share/ui/snes-eur/resources/sounds/hvc/bgm_boot.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav" "/usr/share/ui/snes-eur/resources/sounds/hvc/bgm_boot.wav" +[ -f "$mountpoint/usr/share/ui/snes-eur/resources/sounds/hvc/bgm_home.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav" "/usr/share/ui/snes-eur/resources/sounds/hvc/bgm_home.wav" + +# Super Famicom Mini (JAP) +[ -f "$mountpoint/usr/share/ui/shvc/resources/sounds/hvc/bgm_boot.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_boot.wav" "/usr/share/ui/shvc/resources/sounds/hvc/bgm_boot.wav" +[ -f "$mountpoint/usr/share/ui/shvc/resources/sounds/hvc/bgm_home.wav" ] && overmount "/usr/share/clover-ui/resources/sounds/hvc/bgm_home.wav" "/usr/share/ui/shvc/resources/sounds/hvc/bgm_home.wav" + fi diff --git a/user_mods/music_hack.hmod/readme.txt b/user_mods/music_hack.hmod/readme.txt index 960b18fe..fe9a61f0 100644 --- a/user_mods/music_hack.hmod/readme.txt +++ b/user_mods/music_hack.hmod/readme.txt @@ -1,5 +1,5 @@ === Music Hack ===
-This module allows to disable NES Mini's menu music or replace it with your own music.
+This module allows to disable NES/SNES Mini's menu music or replace it with your own music.
Just replace "music.wav" file if you want to hear your own music in the menu of NES Mini. It must be in PCM format.
diff --git a/user_mods/password.hmod/readme.txt b/user_mods/password.hmod/readme.txt index ebff0c8c..ec4e9d57 100644 --- a/user_mods/password.hmod/readme.txt +++ b/user_mods/password.hmod/readme.txt @@ -1,3 +1,3 @@ === Password Protection Hack ===
-This module adds password protection to NES Mini. Default password is Konami Code :)
+This module adds password protection to NES/SNES Mini. Default password is Konami Code :)
diff --git a/user_mods/remove_thumbnails.hmod/install b/user_mods/remove_thumbnails.hmod/install index 6ecd1d93..36bb171c 100644 --- a/user_mods/remove_thumbnails.hmod/install +++ b/user_mods/remove_thumbnails.hmod/install @@ -1,8 +1,14 @@ # Lines started with "#" are ignored and can be used as comments
+
# Next line defines "scnfile" variable with path to "sys_game_thumbnail.scn" file
-scnfile=/usr/share/clover-ui/resources/prefab/sys_game_thumbnail.scn
+# It's more complicated since SNES Mini relased. Path is defferent for NES Mini and SNES Mini.
+# Lets try to find it
+scnfile=$(find $mountpoint/ -name "sys_game_thumbnail.scn") && scnfile=${scnfile:${#mountpoint}}
# Same with nes.json file
nesjson=/usr/share/clover-ui/resources/sprites/nes.json
+# But nes.json exists on NES Mini only, otherwise we need packed.json
+[ ! -f "$nesjson" ] && nesjson=$(find $mountpoint/ -name "packed.json") && nesjson=${nesjson:${#mountpoint}}
+
# This line defines "preinitfile" variable with pre-init file name
preinitfile=p81a8_hide_thumnbnails
# "restore" is hakchi function which copies original file to corresponding path in /var/lib/hakchi/rootfs
@@ -12,9 +18,15 @@ restore $nesjson # Please note that we need to edit $rootfs$scnfile (writable file), not a just $scnfile (original read-only file)
sed -i -e 's/"enabled":true/"enabled":false/g' $rootfs$scnfile
# Same with nes.json file, most simple way is to replace coordinates sprite coords with zeros
+# For NES Mini
sed -i -e 's/\[93,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[93,871,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
sed -i -e 's/\[107,861,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+# For SNES Mini
+sed -i -e 's/\[145,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+sed -i -e 's/\[159,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+sed -i -e 's/\[173,881,12,8\]/\[0,0,0,0\]/g' $rootfs$nesjson
+
# Create pre-init script and echo "overmount" command to it
echo "overmount $scnfile" > $preinitpath/$preinitfile
echo "overmount $nesjson" >> $preinitpath/$preinitfile
diff --git a/user_mods/remove_thumbnails.hmod/uninstall b/user_mods/remove_thumbnails.hmod/uninstall index 6687483c..65c8c6a9 100644 --- a/user_mods/remove_thumbnails.hmod/uninstall +++ b/user_mods/remove_thumbnails.hmod/uninstall @@ -1,7 +1,5 @@ -# All we need is to delete created files, original file is safe and will be used again after reboot
-scnfile=/usr/share/clover-ui/resources/prefab/sys_game_thumbnail.scn
-nesjson=/usr/share/clover-ui/resources/sprites/nes.json
+find $rootfs/usr/share -name "sys_game_thumbnail.scn" -delete
+find $rootfs/usr/share -name "nes.json" -delete
+find $rootfs/usr/share -name "packed.json" -delete
preinitfile=p81a8_hide_thumnbnails
rm -f $preinitpath/$preinitfile
-rm -f $rootfs$scnfile
-rm -f $rootfs$nesjson
|