diff options
author | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-09 15:04:08 +0300 |
---|---|---|
committer | Alexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com> | 2017-10-09 15:15:07 +0300 |
commit | d976ea7e4279db18c52feb5c0007ec1459827be9 (patch) | |
tree | f81505f0198c0321b61245e09034221b29629dcd /user_mods | |
parent | 4b3a7c567d13bad64a55d70b4b7854a51a520be3 (diff) |
Typo
Diffstat (limited to 'user_mods')
-rw-r--r-- | user_mods/snes_custom_filters.hmod/canoe-custom-filters | 91 | ||||
-rw-r--r-- | user_mods/snes_custom_filters.hmod/install | 5 | ||||
-rw-r--r-- | user_mods/snes_custom_filters.hmod/p8030_snes_filters | 1 | ||||
-rw-r--r-- | user_mods/snes_custom_filters.hmod/readme.txt | 14 | ||||
-rw-r--r-- | user_mods/snes_custom_filters.hmod/uninstall | 2 |
5 files changed, 113 insertions, 0 deletions
diff --git a/user_mods/snes_custom_filters.hmod/canoe-custom-filters b/user_mods/snes_custom_filters.hmod/canoe-custom-filters new file mode 100644 index 00000000..236088a9 --- /dev/null +++ b/user_mods/snes_custom_filters.hmod/canoe-custom-filters @@ -0,0 +1,91 @@ +#!/bin/sh + +set -x + +export MALI_NOCLEAR=1 + +decorative_options() +{ + local fn="$1_options.txt" + if [ ! -f "$fn" ] ; then + return + fi + while read option ; do + case "$option" in + hue) printf ' --decorative-frame-hue';; + luminosity) printf ' --decorative-frame-luminosity';; + saturation) printf ' --decorative-frame-saturation';; + esac + done < "$fn" +} + +original_options=$@ +options="" +clovercon_file=/dev/clovercon1 +video_mode=keep-aspect-ratio +mode1="-filter 2 -magfilter 1" +mode2="-filter 1 -magfilter 3" +mode3="-filter 1 --pixel-perfect" + +while [ $# -gt 0 ] ; do + case "$1" in + --title-code) title_code="$2"; shift ;; + --load-state-file) options="$options -resume" ;; + --save-data-backing-file) options="$options --sram-file" ;; + --replay-inputs) options="$options -replay-all -replay" ;; + --record-inputs) options="$options -record-next -enable-pad-debug-controls" ;; + --video-mode) + video_mode=$2 + shift + ;; + --no-scanlines) + mode1="-filter 1 -magfilter 1" + ;; + --no-smooth) + mode1="-filter 2 -magfilter 3" + ;; + --smooth43) + mode2="-filter 1 -magfilter 1" + ;; + --rollback-mode) + case "$2" in + record) options="$options -rollback-mode 1" ;; + replay) options="$options -rollback-mode 2" ;; + esac + options="$options --rollback-ui /usr/share/canoe/rollback-ui" + options="-rollback-snapshot-period 720 $options" + options="$options --enable-sram-file-hash" + shift + ;; + --rollback-output-dir) options="$options -rollback-output-dir $2"; shift ;; + --rollback-input-dir) options="$options -rollback-input-dir $2"; shift ;; + --decorative-frame-path) options="$options --use-decorative-frame $2 $(decorative_options $2)"; shift ;; + *.sfrom) + if [ -f "$1.gz" ]; then + options="$options /tmp/ROM.sfrom" + gunzip -c "$1.gz" > /tmp/ROM.sfrom + rom=/tmp/ROM.sfrom + else + options="$options $1" + rom=$1 + fi + ;; + *) options="$options $1" ;; + esac + shift +done + +case "$video_mode" in + keep-aspect-ratio) options="$options $mode2" ;; + pixel-perfect) options="$options $mode3" ;; + crt-filter) options="$options $mode1" ;; +esac + +read BUILD_TYPE < /etc/clover/buildtype +case "$BUILD_TYPE" in +devel) log="-log $title_code.log -log-append --debug-menu-settings /var/lib/clover/canoe/debug-menu.json --decorative-frames-path /usr/share/backgrounds" ;; +test) log="-log $title_code.log" ;; +*) ;; +esac + +exec canoe-shvc $options $log diff --git a/user_mods/snes_custom_filters.hmod/install b/user_mods/snes_custom_filters.hmod/install new file mode 100644 index 00000000..d079aca1 --- /dev/null +++ b/user_mods/snes_custom_filters.hmod/install @@ -0,0 +1,5 @@ +copy "$transferpath/p8030_snes_filters" "$preinitpath" +mkdir -p "$rootfs/usr/bin" +chmod +x "$transferpath/canoe-custom-filters" +copy "$transferpath/canoe-custom-filters" "$rootfs/usr/bin/" +return 1 diff --git a/user_mods/snes_custom_filters.hmod/p8030_snes_filters b/user_mods/snes_custom_filters.hmod/p8030_snes_filters new file mode 100644 index 00000000..a2025094 --- /dev/null +++ b/user_mods/snes_custom_filters.hmod/p8030_snes_filters @@ -0,0 +1 @@ +[ -f "$mountpoint/usr/bin/clover-canoe-shvc" ] && overmount /usr/bin/canoe-custom-filters /usr/bin/clover-canoe-shvc diff --git a/user_mods/snes_custom_filters.hmod/readme.txt b/user_mods/snes_custom_filters.hmod/readme.txt new file mode 100644 index 00000000..26aea4ee --- /dev/null +++ b/user_mods/snes_custom_filters.hmod/readme.txt @@ -0,0 +1,14 @@ +=== SNES Filters Hack ===
+
+This module allows to tweak video filters on SNES Mini or Super Famicom Mini (yes, only SNES, not NES/Famicom).
+
+You need to add special command line arguments to make it work. Just add those arguments to game's command line or to global command line arguments.
+
+Argument to enable bilinear filter in 4:3 mode:
+ --smooth43
+
+Argument to disable scanlines in CRT mode (bilinear filter only):
+ --no-scanlines
+
+Argument to disable bilinear filter in CRT mode (scanlines only):
+ --no-smooth
diff --git a/user_mods/snes_custom_filters.hmod/uninstall b/user_mods/snes_custom_filters.hmod/uninstall new file mode 100644 index 00000000..f5e8568e --- /dev/null +++ b/user_mods/snes_custom_filters.hmod/uninstall @@ -0,0 +1,2 @@ +rm "$preinitpath/p8030_snes_filters" +rm "$rootfs/usr/bin/p8030_snes_filters" |