Add Hakchi files

This commit is contained in:
twinaphex 2018-07-27 19:26:15 +02:00
parent d802a7eaab
commit 20335cd2b9
14 changed files with 550 additions and 2 deletions

View File

@ -7,6 +7,10 @@ ifeq ($(HAVE_STACK_USAGE), 1)
CFLAGS += -fstack-usage
endif
ifeq ($(HAVE_HAKCHI), 1)
CFLAGS += -DHAVE_HAKCHI
endif
ifeq ($(HAVE_GL_CONTEXT),)
HAVE_GL_CONTEXT=0

62
Makefile.nintendoc Normal file
View File

@ -0,0 +1,62 @@
# Hakchi version added to ease confusion amongst Hakchi community due to messy past...
#
# Make sure you have readelf installed (sudo apt-get install readelf) to patch the binary
# Might not be needed for your build but it's a useful tool and for safety it should be
# run anyway to ensure the SDL2 link isn't broken...
HAKCHI_VER := Hakchi_Retroarch_Neo_v1_7_3b
HAKCHI_NAME := "Hakchi RetroArch 'Neo' v1.7.3b
MOD_CREATOR := TheOtherGuys
MOD_CATEGORY := RetroArch
HAKCHI_DIR := hakchi
TARGET := retroarch
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
all: $(TARGET)
retroarch:
readelf -v #Check if you have readelf installed... (sudo apt-get install readelf)
./configure --host=arm-linux-gnueabihf --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard
make -f Makefile -j HAVE_HAKCHI=1
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
#/usr/bin/arm-linux-gnueabihf-strip retroarch
rm -f $(HAKCHI_DIR)/bin/retroarch
cp retroarch $(HAKCHI_DIR)/bin/retroarch
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > $(HAKCHI_DIR)/etc/libretro/retroarch_version
cp $(HAKCHI_DIR)/readme.md $(HAKCHI_DIR)/readme_COPY.md
printf "%s\n" \
"---" \
"Name: $(HAKCHI_VER)" \
"Creator: $(MOD_CREATOR)" \
"Category: $(MOD_CATEGORY)" \
"Version: $(HAKCHI_VER)" \
"Built on: $(shell date)" \
"Git commit: $(GIT_COMMIT)" \
"---" > $(HAKCHI_DIR)/readme.md
cat $(HAKCHI_DIR)/readme_COPY.md >> $(HAKCHI_DIR)/readme.md
rm $(HAKCHI_DIR)/readme_COPY.md
@echo "** BUILDING HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
cd $(HAKCHI_DIR)/; tar -czvf "$(HAKCHI_VER).hmod" *
mv $(HAKCHI_DIR)/$(HAKCHI_VER).hmod .
@echo "** BUILT HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
clean:
rm -f *.o
rm -f audio/*.o
rm -f conf/*.o
rm -f gfx/*.o
rm -f gfx/drivers_font/*.o
rm -f gfx/drivers_font_renderer/*.o
rm -f gfx/drivers_context/*.o
rm -f gfx/py_state/*.o
rm -f compat/*.o
rm -f record/*.o
rm -f input/*.o
rm -f tools/*.o
rm -f $(BINDIR)/retroarch
rm -f $(BINDIR)/retroarch-joyconfig
rm -f $(PNDDIR)/readme.html
rm -f retroarch
rm -f $(HAKCHI_DIR)/bin/retroarch
rm -f $(HAKCHI_VER).hmod
rm -f $(HAKCHI_DIR)/etc/libretro/retroarch_version

View File

@ -248,6 +248,12 @@ static const bool overlay_hide_in_menu = true;
static const bool display_keyboard_overlay = false;
#ifdef HAKCHI
static const float default_input_overlay_opacity = 0.5f;
#else
static const float default_input_overlay_opacity = 0.7f;
#endif
#ifdef HAVE_MENU
#include "menu/menu_driver.h"
@ -703,7 +709,9 @@ static const unsigned midi_volume = 100;
/* Only applies to Android 7.0 (API 24) and up */
static const bool sustained_performance_mode = false;
#if defined(ANDROID)
#if defined(HAKCHI)
static char buildbot_server_url[] = "http://hakchicloud.com/Libretro_Cores/";
#elif defined(ANDROID)
#if defined(ANDROID_ARM_V7)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/";
#elif defined(ANDROID_ARM)

View File

@ -1487,7 +1487,7 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, audio_volume, false);
SETTING_FLOAT("audio_mixer_volume", &settings->floats.audio_mixer_volume, true, audio_mixer_volume, false);
#ifdef HAVE_OVERLAY
SETTING_FLOAT("input_overlay_opacity", &settings->floats.input_overlay_opacity, true, 0.7f, false);
SETTING_FLOAT("input_overlay_opacity", &settings->floats.input_overlay_opacity, true, default_input_overlay_opacity, false);
SETTING_FLOAT("input_overlay_scale", &settings->floats.input_overlay_scale, true, 1.0f, false);
#endif
#ifdef HAVE_MENU

View File

@ -0,0 +1,16 @@
#!/bin/sh
source /etc/preinit
script_init
uistop
core="$1"
rom="$2"
shift 2
if [ -f "/bin/remote-exec" ]; then
echo retroarch-clover-child "$core" "\"$rom\"" ${1+"$@"} > /var/exec.flag
else
exec retroarch-clover-child "$core" "\"$rom\"" ${1+"$@"}
fi

View File

@ -0,0 +1,322 @@
#!/bin/sh
source /etc/preinit
script_init
#### Variable Definitions ##################################################
HOME=/etc/libretro
corename="$1"
noprefix="${corename#km_}"
core="$HOME/core/${1}_libretro.so"
rom="$2"
filename="$(basename "$rom")"
id="${filename%.*}"
extension="${filename##*.}"
newrsram=/var/saves/retroarch
autosave="/var/cache/retroarch/$id.state.auto"
t_suffix=_time.txt
debug=0
bezel_mode=0
clovercon_file=/dev/clovercon1
shift 2
while [ $# -gt 0 ]; do
[ "$1" == "--load-state-file" ] && load="$2"
[ "$1" == "--save-on-quit" ] && save="$2"
[ "$1" == "--rollback-input-dir" ] && load="$2/savestate"
[ "$1" == "--rollback-output-dir" ] && save="$2/savestate"
[ "$1" == "--save-screenshot-on-quit" ] && screenshot="$2"
[ "$1" == "--save-data-backing-file" ] && sram="$2"
[ "$1" == "--graphic-filter" ] && filter="$2"
[ "$1" == "--enable-crt-scanlines" ] && crt=1
[ "$1" == "--video-mode" ] && [ "$2" == "crt-filter" ] && filter=crt720 && crt=1
[ "$1" == "--video-mode" ] && [ "$2" == "keep-aspect-ratio" ] && filter=gpu720
[ "$1" == "--video-mode" ] && [ "$2" == "pixel-perfect" ] && filter=ppu
[ "$1" == "--smooth43" ] && smooth43=1
[ "$1" == "--no-smooth" ] && no_smooth=1
[ "$1" == "--no-scanlines" ] && no_scanlines=1
[ "$1" == "--bezel-mode" ] && bezel_mode=1
[ "$1" == "--title-code" ] && title_code="$2"
[ "$1" == "--ra-extra" ] && extra="$2"
[ "$1" == "--ra-nosaves" ] && nosaves=1
[ "$1" == "--load-time-path" ] && timefile_load="$2"
[ "$1" == "--save-time-path" ] && timefile_save="$2"
[ "$1" == "--replay-inputs" ] && demo=1
[ "$1" == "--decorative-frame-path" ] && frame="$2"
[ "$1" == "--debug-usb" ] && debug=1
[ "$1" == "--debug-nand" ] && debug=2
[ "$1" == "--custom-loadscreen" ] && custom_loadscreen="$2"
shift
done
#### Visuals ###############################################################
#Retrospective fix for hakchi port splashes
if ! echo $corename | grep "prboom\|tyrquake\|cannonball"; then
umount "$rootfs/share/retroarch/assets/RAloading-min.png"
fi
# Display Splash Screen
if [ ! -z "$custom_loadscreen" ]; then
decodepng "$rootfs/share/retroarch/assets/$custom_loadscreen" > /dev/fb0;
else
if [ -f "$mountpoint/media/hakchi/RA_loading_screens/$noprefix.png" ] && [ -f "$rootfs/share/retroarch/assets/RAloading-min.png" ]; then
decodepng "$mountpoint/media/hakchi/RA_loading_screens/$noprefix.png" > /dev/fb0;
else
if [ -f "$rootfs/share/retroarch/assets/core_loading_screens/$noprefix.png" ] && [ -f "$rootfs/share/retroarch/assets/RAloading-min.png" ]; then
decodepng "$rootfs/share/retroarch/assets/core_loading_screens/$noprefix.png" > /dev/fb0;
else
decodepng "$rootfs/share/retroarch/assets/RAloading-min.png" > /dev/fb0;
fi
fi
fi
#### Network Mounting ######################################################
if [ -f "/media/hakchi/retroarch-mounted.cfg" ]; then
mv -f /media/hakchi/retroarch-mounted.cfg /etc/libretro/
fi
source /etc/libretro/retroarch-mounted.cfg
if [ "$ra_mount_enable" == "true" ] && [ ! -z "${ra_mount_address// }" ] && [ ! -d /var/mount ]; then
mkdir -p /var/mount
if [ ! -z "${ra_mount_user// }" ] && [ ! -z "${ra_mount_pass// }" ]; then
mount -t cifs -o user=$ra_mount_user,pass=$ra_mount_pass $ra_mount_address /var/mount
elif [ ! -z "${ra_mount_user// }" ] && [ -z "${ra_mount_pass// }" ]; then
mount -t cifs -o user=$ra_mount_user $ra_mount_address /var/mount
else
mount -t cifs $ra_mount_address /var/mount
fi
fi
#### Saves and Configs #####################################################
[ ! -z "$demo" ] && load="$(dirname "$load")/savestate"
# Create cache and /var/saves/retroarch directories
mkdir -p /var/cache/retroarch
mkdir -p "$newrsram"
# Create a "cartridge.sram" file of 21B to avoid hakchi2 save-state manager from removing the folder
# Just in case we're going the "/var/saves/CLV-Z-RETROARCH" way
# if [ -f "/var/saves/CLV-Z-RETROARCH/cartridge.sram" ]; then
# [ "$(wc -c </var/saves/CLV-Z-RETROARCH/cartridge.sram)" -lt 21 ] && rm /var/saves/CLV-Z-RETROARCH/cartridge.sram && dd if=/dev/zero of=/var/saves/CLV-Z-RETROARCH/cartridge.sram bs=21 count=1
# else
# dd if=/dev/zero of=/var/saves/CLV-Z-RETROARCH/cartridge.sram bs=21 count=1
# fi
# Moving RetroArch saves from "/var/saves/" to "/var/saves/retroarch/" if the ID is known (if the .desktop is on the console atm)
if [ -z "$(ls -A "$newrsram")" ]; then # so this whole part only executes at the 1st launch
if [ -d "/media/hakchi" ]; then
desktop_search="/media/hakchi/games"
else
desktop_search="/var/lib/hakchi/games"
fi
for rasaves in /var/saves/CLV-*; do
fdsgame=0
canoecheck=0
gameid="$(basename "$rasaves")"
# [ "$gameid" = "CLV-Z-RETROARCH" ] && continue
if [ -f "$rasaves/cartridge.sram" ] && [ -f "$rasaves/cartridge.sram.hash" ]; then
[ "$(tail -c 20 "$rasaves/cartridge.sram")" = "$(cat "$rasaves/cartridge.sram.hash")" ] && canoecheck=1 # check if thats a Canoe save
fi
if [ "$canoecheck" = 0 ] && [ -f "$rasaves/cartridge.sram" ]; then
if [ ! -z "$(find "$desktop_search" -name "$gameid.desktop")" ]; then # search for .desktop file
filename2="$(cat `find "$desktop_search" -name "$gameid.desktop"` | grep "^Exec=" | basename `awk '{print $2}'`)"
[ "${filename2##*.}" = "fds" ] && fdsgame=1
filename2="${filename2%.*}"
if [ ! -z "$(cat `find "$desktop_search" -name "$gameid.desktop"` | grep "/bin/gpsp")" ]; then
mv "$rasaves/cartridge.sram" "$newrsram/$filename2.sav" # rename the file to .sav if its a gpSP save
elif [ ! -z "$(cat `find "$desktop_search" -name "$gameid.desktop"` | grep "/bin/nes\|/bin/nestopia")" ] && [ "$fdsgame" = 1 ]; then
mv "$rasaves/cartridge.sram" "$newrsram/$filename2.sav" # rename the file to .sav if its a FDS Nestopia save
else
mv "$rasaves/cartridge.sram" "$newrsram/$filename2.srm" # rename the file to .srm
fi
fi
fi
if ls "$rasaves" | grep -w "brm$"; then
mv "$rasaves/"*.brm "$newrsram" # no need to rename those, just move
fi
done
fi
# Copy savestates from USB if any
if [ -d "/media/data/ra_savestates" ] && ls "/media/data/ra_savestates/$title_code/$id.state"*; then
cp "/media/data/ra_savestates/$title_code/$id.state"* /var/cache/retroarch
fi
# Move mame config files to "/var/saves/retroarch"
if [ -d "/etc/libretro/.config/retroarch/config/arcade" ]; then
if [ ! -z "$(ls -A /etc/libretro/.config/retroarch/config/arcade)" ]; then
mv /etc/libretro/.config/retroarch/config/arcade/* "$newrsram"
[ -z "$(ls -A /etc/libretro/.config/retroarch/config/arcade)" ] && rmdir /etc/libretro/.config/retroarch/config/arcade
fi
fi
# saves if any
if [ ! -z "$load" ] && [ -f "$load" ] && [ -z "$nosaves" ]; then
if [ "$(hexdump -n 2 -e '1/1 "%02X"' "$load")" == "1F8B" ]; then
cp -f "$load" "$autosave.gz"
gunzip -f "$autosave.gz"
else
cp -f "$load" "$autosave"
fi
fi
# Moving and renaming save from "/var/saves/CLV-*/cartridge.*" to "/var/saves/retroarch/$id.*" that were previously unknown
if [ "$noprefix" == "nestopia" ] && [ "$extension" == "fds" ]; then
[ ! -z "$sram" ] && [ -f "$sram" ] && mv "$sram" "$newrsram/$id.sav"
elif [ "$noprefix" == "gpsp" ]; then
[ ! -z "$sram" ] && [ -f "$sram" ] && mv "$sram" "$newrsram/$id.sav"
elif [ "$noprefix" == "genesis_plus_gx" ]; then
[ -f "/var/saves/$title_code/$id.brm" ] && mv "/var/saves/$title_code/$id.brm" "$newrsram"
else
[ ! -z "$sram" ] && [ -f "$sram" ] && mv "$sram" "$newrsram/$id.srm"
fi
#### General ###############################################################
#Overcommit this. (Should solve dumb crashes due to memory limits)
echo "1" > "/proc/sys/vm/overcommit_memory"
[ -z "$timefile_save" ] && timefile_save="$load$t_suffix"
[ -z "$timefile_load" ] && timefile_load="$load$t_suffix"
# Hold L button while starting a game to toggle bezel-mode for this game
if [ -e "$clovercon_file" ] && [ "$(cat $clovercon_file)" == "0004" ]; then
if [ "$bezel_mode" == "0" ]; then
sed -i "s/^Exec.*/& --bezel-mode/" "$gamepath/$title_code/$title_code.desktop" && bezel_mode=1
else
sed -i "s/ --bezel-mode//g" "$gamepath/$title_code/$title_code.desktop" && bezel_mode=0
fi
fi
# Hold R button while starting a game to toggle bezel-mode for this core
if [ -e "$clovercon_file" ] && [ "$(cat $clovercon_file)" == "0008" ]; then
[ ! -f "$HOME/bezel-core" ] && touch "$HOME/bezel-core"
if grep "^$corename$" "$HOME/bezel-core"; then
sed -i "/^$corename$/d" "$HOME/bezel-core"
else
echo "$corename" >> "$HOME/bezel-core"
fi
fi
[ -f "$HOME/bezel-core" ] && grep "^$corename$" "$HOME/bezel-core" && bezel_mode=1
# Smooth, border and scanlines
if [ "$bezel_mode" == "1" ]; then
[ "$filter" == "crt720" ] && overlay1=scanlines.png && overlay2="$frame.png"
else
[ "$filter" == "crt720" ] && overlay1=scanlines.png
fi
[ "$filter" == "crt720" ] && [ ! -z "$no_scanlines" ] || [ ! "$filter" == "crt720" ] && overlay1="$frame.png"
retroarch_watchdog --configEdit /etc/libretro/.config/retroarch/overlay/default.cfg overlay0_overlay "$overlay1" overlay0_desc0_overlay "$overlay2"
retroarch_watchdog --configEdit /etc/libretro/.config/retroarch/overlay/default_scanlines.cfg overlay0_desc0_overlay "$frame.png"
ra_config_args=""
# Functions to make the rest easier
smooth(){ ra_config_args="$ra_config_args video_smooth $1"; }
overlay(){ ra_config_args="$ra_config_args input_overlay_enable $1"; }
overlay_file(){ ra_config_args="$ra_config_args input_overlay ~/.config/retroarch/overlay/$1"; }
int_scale(){ ra_config_args="$ra_config_args video_scale_integer $1"; }
ratio(){ ra_config_args="$ra_config_args aspect_ratio_index $1"; }
width(){ ra_config_args="$ra_config_args custom_viewport_width $1"; }
height(){ ra_config_args="$ra_config_args custom_viewport_height $1"; }
posx(){ ra_config_args="$ra_config_args custom_viewport_x $1"; }
posy(){ ra_config_args="$ra_config_args custom_viewport_y $1"; }
# Smooth and bezel-mode
if [ "$bezel_mode" == "1" ]; then
[ "$filter" == "crt720" ] && width 877 && posx 201
[ "$filter" == "gpu720" ] && smooth false && width 877 && posx 201
[ "$filter" == "ppu" ] && smooth false && width 768 && posx 256
ratio 22 && overlay true && overlay_file default.cfg && height 672 && posy 24 && int_scale true
fi
[ "$filter" == "crt720" ] && overlay true
[ "$filter" == "crt720" ] && [ -z "$no_smooth" ] && smooth true
[ "$filter" == "crt720" ] && [ ! -z "$no_smooth" ] && smooth false
[ "$filter" == "gpu720" ] && [ ! -z "$smooth43" ] && smooth true
# Set config for standalone launch mode
if [ -z "${corename// }" ]; then
ra_config_args="$ra_config_args savefile_directory /var/saves/CLV-Z-RETROARCH"
ra_config_args="$ra_config_args savestate_directory /var/saves/CLV-Z-RASAVESTATES"
ra_config_args="$ra_config_args savestate_auto_save false"
ra_config_args="$ra_config_args savestate_auto_load false"
ra_config_args="$ra_config_args autosave_interval 0"
fi
[ ! -z "$ra_config_args" ] && retroarch_watchdog --configEdit /etc/libretro/retroarch.cfg $ra_config_args
#### Runtime ###############################################################
if [ -f "/media/hakchi/RA_DEV_MODE" ]; then #Devmode Active (Record current session)
if [ -z "${corename// }" ]; then
rm -f /media/Development_RetroArch.log
echo "Pre RA load Core Temp: $(more /sys/devices/virtual/thermal/thermal_zone0/temp)" >> /media/Development_RA_temp.log
retroarch -c "$HOME/retroarch.cfg" -vf > /media/Development_RetroArch.log 2>&1 &
else
rm -f /media/Development_RetroArch.log
echo "Pre RA load Core Temp: $(more /sys/devices/virtual/thermal/thermal_zone0/temp)" >> /media/Development_RA_temp.log
retroarch -c "$HOME/retroarch.cfg" -vfL "$core" "$rom" "$extra" > /media/Development_RetroArch.log 2>&1 &
fi
else
if [ -z "${corename// }" ]; then
retroarch -c "$HOME/retroarch.cfg" -vf &
fi
if [ "$debug" == "0" ]; then #Default
retroarch -c "$HOME/retroarch.cfg" -vfL "$core" "$rom" "$extra" &
fi
if [ "$debug" == "1" ]; then #Verbose USB mode
retroarch -c "$HOME/retroarch.cfg" -vfL "$core" "$rom" "$extra" > "/media/${filename}_RetroArch.log" 2>&1 &
fi
if [ "$debug" == "2" ]; then #Verbose NAND mode
retroarch -c "$HOME/retroarch.cfg" -vfL "$core" "$rom" "$extra" > "/tmp/${filename}_RetroArch.log" 2>&1 &
fi
fi
#### Watchdog ##############################################################
# Set Watchdog Arguments
watchdog_args="$!"
# Demo mode enabled
[ ! -z "$demo" ] && watchdog_args="$watchdog_args --demo"
# Set Screenshot Args
[ ! -z "$screenshot" ] && [ -z "$nosaves" ] && watchdog_args="$watchdog_args --screenshot $screenshot"
# Load Time Played
[ -f "$timefile_load" ] && watchdog_args="$watchdog_args --time $(cat "$timefile_load")"
[ -z "$demo" ] && watchdog_args="$watchdog_args --timePath $timefile_save"
# Create output folders
[ ! -z "$save" ] && mkdir -p "$(dirname "$save")"
[ ! -z "$sram" ] && mkdir -p "$(dirname "$sram")"
[ ! -z "$screenshot" ] && mkdir -p "$(dirname "$screenshot")"
# Run retroarch watchdog
retroarch_watchdog $watchdog_args
#### Cleanup ###############################################################
# Saves!
[ ! -z "$save" ] && [ -f "$autosave" ] && [ -z "$nosaves" ] && gzip -f "$autosave" && mv -f "$autosave.gz" "$save"
# Restore Retroarch Config
retroarch_watchdog --configRestore /etc/libretro/retroarch.cfg
# Copy savestates to USB if any and delete cache folder
if [ -d "/media/hakchi" ] && ls "/var/cache/retroarch/$id".*[^auto]; then
[ ! -d "/media/data/ra_savestates/$title_code" ] && mkdir -p "/media/data/ra_savestates/$title_code"
cp "/var/cache/retroarch/$id".*[^auto] "/media/data/ra_savestates/$title_code"
fi
rm -rf /var/cache/retroarch/
#Remove network drive mount if Hakchi Mount mod is enabled
if [ ! -f "$rootfs/etc/hakchi_mount_mod" ]; then
umount "/var/mount" && rm -rf "/var/mount"
fi
if [ -f "/media/hakchi/RA_DEV_MODE" ]; then #Devmode Active (Record current session)
echo "Post RA load Core Temp: $(more /sys/devices/virtual/thermal/thermal_zone0/temp)" >> /media/Development_RA_temp.log
fi
# Back to the shell
uistart

13
hakchi/bin/retroarch-mini Normal file
View File

@ -0,0 +1,13 @@
#!/bin/sh
source /etc/preinit
script_init
uistop
exec retroarch-clover-child
if [ -f "/bin/remote-exec" ]; then
echo retroarch-clover-child > /var/exec.flag
else
exec retroarch-clover-child
fi

View File

@ -0,0 +1,18 @@
Hakchi_Libretro_Initialise(){
if [ -z "$(mount | grep "/etc/libretro ")" ] && [ -d "$mountpoint/media/$modname" ] && [ "$cfg_usb_rw" == "y" ]; then
local externalPath="$mountpoint/media/data/ra_data"
local localPath="$rootfs/etc/libretro/.config/retroarch"
for ra_folders in database thumbnails playlists downloads; do
if [ ! -d "$externalPath/$ra_folders" ]; then
mkdir -p "$externalPath/$ra_folders"
copy "$localPath/$ra_folders" "$externalPath"
rm -rf "$localPath/$ra_folders/"*
fi
mount_bind "$externalPath/$ra_folders" "$localPath/$ra_folders"
overmount "${localPath#$rootfs}/$ra_folders"
done
unset ra_folders
fi
[ -f "$mountpoint/usr/bin/clover-kachikachi" ] && overmount /usr/bin/clover-kachikachi
[ -f "$mountpoint/usr/bin/clover-canoe-shvc" ] && overmount /usr/bin/clover-canoe-shvc
}

View File

@ -0,0 +1 @@
Hakchi_Libretro_Initialise

55
hakchi/install Normal file
View File

@ -0,0 +1,55 @@
echo "Grabbing old config variables..."
cheevos_username=$(grep -i "cheevos_username*" $rootfs/etc/libretro/retroarch.cfg)
cheevos_password=$(grep -i "cheevos_password*" $rootfs/etc/libretro/retroarch.cfg)
cheevos_token=$(grep -i "cheevos_token*" $rootfs/etc/libretro/retroarch.cfg)
netplay_nickname=$(grep -i "netplay_nickname*" $rootfs/etc/libretro/retroarch.cfg)
netplay_mitm_server=$(grep -i "netplay_mitm_server*" $rootfs/etc/libretro/retroarch.cfg)
netplay_ip_port=$(grep -i "netplay_ip_port*" $rootfs/etc/libretro/retroarch.cfg)
netplay_ip_address=$(grep -i "netplay_ip_address*" $rootfs/etc/libretro/retroarch.cfg)
netplay_password=$(grep -i "netplay_password*" $rootfs/etc/libretro/retroarch.cfg)
netplay_spectate_password=$(grep -i "netplay_spectate_password*" $rootfs/etc/libretro/retroarch.cfg)
echo "Uninstalling old version of Hakchi RetroArch neo..."
var=$(hakchi pack_list | grep "Hakchi_Retroarch_Neo_") && hakchi pack_uninstall $var
echo "Uninstalled $var, Installing new version now..."
transfer_default
chmod +x $rootfs/bin/*
chmod +x $rootfs/usr/bin/*
mkdir -p $rootfs/etc/libretro/system
[ -f "/newroot/usr/share/kachikachi/fds_bios.bin" ] && cp -f /newroot/usr/share/kachikachi/fds_bios.bin $rootfs/etc/libretro/system/disksys.rom
mkdir -p $rootfs/etc/options_menu/retroarch/default_files
copy $rootfs/etc/libretro/retroarch.cfg $rootfs/etc/options_menu/retroarch/default_files/
copy $rootfs/etc/libretro/retroarch-core-options.cfg $rootfs/etc/options_menu/retroarch/default_files/
loadscr_path=$rootfs/share/retroarch/assets/core_loading_screens
for arcade_loadscr in "$loadscr_path/fbalpha2012.png" "$loadscr_path/fbalpha2012_cps1.png" "$loadscr_path/fbalpha2012_cps2.png" "$loadscr_path/fbalpha2012_cps3.png" "$loadscr_path/fbalpha2012_neogeo.png" "$loadscr_path/fb_alpha.png" "$loadscr_path/mame2003.png" "$loadscr_path/mame2003_xtreme.png" "$loadscr_path/mame2010.png" "$loadscr_path/mame2014.png"; do
if [ ! -e "$arcade_loadscr" ]; then
ln -s "${loadscr_path#/newroot}/mame2000.png" "$arcade_loadscr"
fi
done
for snes_loadscr in "$loadscr_path/snes9x2002.png" "$loadscr_path/snes9x2005.png" "$loadscr_path/snes9x2010.png"; do
if [ ! -e "$snes_loadscr" ]; then
ln -s "${loadscr_path#/newroot}/snes9x.png" "$snes_loadscr"
fi
done
[ ! -e "$loadscr_path/fceumm.png" ] && ln -s ${loadscr_path#/newroot}/nestopia.png $loadscr_path/fceumm.png
[ ! -e "$loadscr_path/mupen64plus.png" ] && ln -s ${loadscr_path#/newroot}/glupen64.png $loadscr_path/mupen64plus.png
[ ! -e "$loadscr_path/genesis_plus_gx.png" ] && ln -s ${loadscr_path#/newroot}/picodrive.png $loadscr_path/genesis_plus_gx.png
echo "Reloading built in config..."
sed -i -e 's/cheevos_username = "[^"]*"/cheevos_username = "'$cheevos_username'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/cheevos_password = "[^"]*"/cheevos_password = "'$cheevos_password'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/cheevos_token = "[^"]*"/cheevos_token = "'$cheevos_token'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/netplay_mitm_server = "[^"]*"/netplay_mitm_server = "'$netplay_mitm_server'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/netplay_ip_port = "[^"]*"/netplay_ip_port = "'$netplay_ip_port'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/netplay_ip_address = "[^"]*"/netplay_ip_address = "'$netplay_ip_address'"/g' $rootfs/etc/libretro/retroarch.cfg
sed -i -e 's/netplay_spectate_password = "[^"]*"/netplay_spectate_password = "'$netplay_spectate_password'"/g' $rootfs/etc/libretro/retroarch.cfg
if [ "$cheevos_username" == "hakchiresources" ]; then
sed -i -e 's/cheevos_enable = "[^"]*"/cheevos_enable = "false"/g' $rootfs/etc/libretro/retroarch.cfg
fi
echo "Install complete!"
return 1

49
hakchi/readme.md Normal file
View File

@ -0,0 +1,49 @@
## New Release Overview video
## Changelog
### 1.7.3b - July 2018
**Please note: NES cores are no longer bundled with RA. You will need to download them seperately**
**Please note: Standalone RetroArch Saves will be located in your saves under CLV-RETROARCH**
- Huge amount of optimisation and streamlining reduced deployed package size by over half! (Complete RA now only ~5mb compared to ~12mb)
- RA Saves and savestates fully functional and working for all cores (that support them!)
- Launching RetroArch standalone now fully functional and working. Saves also supported.
- Switching roms within RetroArch standalone now supports saving.
- Stability fixes for intensive cores (N64, PSX) reducing the risk of C8 crashing.
- Added ability to now download and update cores directly from the RA menu via HakchiCloud!
- Added network storage support. You can now play entire rom sets and media directly from your networked drives!
- Playlist support now implemented. Add thousands of roms to your RetroArch GUI with boxart and thumbnails and launch the roms directly from the GUI (No GUI limit!)
- New layout look
- Saving mechanism reworked, better functionality and Hakchi Save Manager support.
- Loading and shutting down of RetroArch times reduced via optimisation.
- Fixed occasional C8 errors when launching RetroArch directly
- Holding R now enables bezel mode per core instead of individual games
- Numerous bug fixes
### 1.7.3a - May 2018
- Built with preconfigured network and achievement support. (As soon as network connection is available, network and achievements are enabled.)
- New RetroArch binary 1.7.3 (completely overhauled audio mixer)
- Few RA bug fixes
- Default GUI is now changed to XMB with the purpose of using network and achievements.
- A few mapping issues Fixed for keyboard to gamepad
- Saves mame config properly (dip switches, etc.)
- Optimizations to avoid to many writes on NAND
- Boot sequence optimised
- Doom and Quake splash screen bug fixed.
RetroArch and Retroarch Cores by libretro
Hakchi RetroArch Neo main development by Swingflip, Bslenul and CompCom
Hakchi by MadMonkey
Special thanks to Team Hakchi Resources, Team Shinkansen and MadMonkey
https://hakchiresources.com
(c) 2016-2018