Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mods
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-05 07:05:16 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-10-05 07:05:16 +0300
commit01c8b9149f139648ed53fe175bbc955443c2ef01 (patch)
tree5e9ae2af9d2cf2602bbf4ca40ee2348f4af06d2a /mods
parente0b2f51d15924c3353393072be25f8bb3d3e45d2 (diff)
Huge refactoring. Testing required. But need to sleep.
Diffstat (limited to 'mods')
-rw-r--r--mods/hmods/tiny7zx-dynamic.hmodbin0 -> 19325 bytes
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/chmenu5
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr24
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr22
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter10
-rw-r--r--mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter26
6 files changed, 84 insertions, 3 deletions
diff --git a/mods/hmods/tiny7zx-dynamic.hmod b/mods/hmods/tiny7zx-dynamic.hmod
new file mode 100644
index 00000000..89476f4d
--- /dev/null
+++ b/mods/hmods/tiny7zx-dynamic.hmod
Binary files differ
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/chmenu b/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
index 5ae4fdcc..5bc02713 100644
--- a/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/chmenu
@@ -3,6 +3,7 @@ source /etc/preinit
script_init
state_file=$installpath/menu
+flag=/tmp/startmpc.flag
[ -z "$1" ] && exit 1
[ -f "$state_file" ] && prev_code=$(cat "$state_file") || prev_code=000
@@ -29,9 +30,9 @@ if [ "$1" != "000" ]; then
fi
fi
-pkill -KILL clover-mcp
pkill -KILL ReedPlayer-Clover
+pkill -KILL clover-mcp
overmount_games
-/etc/init.d/S81clover-mcp start
+touch "$flag"
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr b/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr
new file mode 100644
index 00000000..62fc841b
--- /dev/null
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/clover-canoe-shvc-wr
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Wrapper for canoe
+# You can add extra command line arguments to all games at once
+# using "cfg_snes_extra_args" variable in p0000_config
+
+source /etc/preinit
+script_init
+
+filename=$1
+filebase=$(basename "$filename")
+extension="${filebase##*.}"
+tmppath=/tmp/rom
+if [ "$extension" == "7z" ]; then
+ mkdir -p $tmppath
+ rm -rf $tmppath/*
+ cd $tmppath
+ tiny7zx x $filename
+ filename=$(ls)
+fi
+shift
+
+args="$filename $@ $cfg_snes_extra_args"
+
+exec /usr/bin/clover-canoe-shvc $args
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr b/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
index d8ff9899..fd24f406 100644
--- a/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/clover-kachikachi-wr
@@ -7,6 +7,26 @@
source /etc/preinit
script_init
-args="$@ $cfg_nes_extra_args"
+filename=$1
+filebase=$(basename "$filename")
+extension="${filebase##*.}"
+tmppath=/tmp/rom
+if [ "$extension" == "7z" ]; then
+ mkdir -p $tmppath
+ rm -rf $tmppath/*
+ cd $tmppath
+ tiny7zx x $filename
+ filename=$(ls)
+fi
+if [ "$extension" == "gz" ]; then
+ mkdir -p $tmppath
+ rm -rf $tmppath/*
+ gunzip -c > $tmppath/$filebase
+ filename=$tmppath/$filebase
+fi
+shift
+
+args="$filename $@ $cfg_nes_extra_args"
[ "$cfg_disable_armet" == "y" ] && args="$(echo $args | sed 's/--enable-armet//g')"
+
exec /usr/bin/clover-kachikachi $args
diff --git a/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter b/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter
new file mode 100644
index 00000000..a09f331d
--- /dev/null
+++ b/mods/mod_hakchi/hakchi/rootfs/bin/mcp-restarter
@@ -0,0 +1,10 @@
+#!/bin/sh
+flag=/tmp/startmpc.flag
+while [ true ]; do
+ #sleep 1
+ if [ -f "$flag" ]; then
+ echo Restart!
+ /etc/init.d/S81clover-mcp start
+ rm $flag
+ fi
+done
diff --git a/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter b/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter
new file mode 100644
index 00000000..964c84de
--- /dev/null
+++ b/mods/mod_hakchi/hakchi/rootfs/etc/init.d/S82mcp-restarter
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+start() {
+ mcp-restarter &
+}
+
+stop() {
+ killall mcp-restarter
+}
+
+case "$1" in
+start)
+ start
+;;
+stop)
+ stop
+;;
+restart)
+ stop
+ start
+;;
+*)
+ echo "mcp-restarter: Please use start, stop, or restart."
+ exit 1
+;;
+esac