#!/bin/sh
progdir=`dirname "$0"`
sed -i 's/"PS": ".*"/"PS": "\/mnt\/mmc\/Roms\/APPS\/Mod\/Emu\/ps\/launch.sh"/g' "/mnt/mmc/CFW/config/coremapping.json"
sed -i '/savestate_auto_load =/d' "/mnt/mmc/CFW/retroarch/.retroarch/config/PCSX-ReARMed/PCSX-ReARMed.cfg"
echo "savestate_auto_load = \"false\"" >> "/mnt/mmc/CFW/retroarch/.retroarch/config/PCSX-ReARMed/PCSX-ReARMed.cfg"
cp -f "$progdir/Ps/PSX_BIOS-ON.sh" $progdir
rm -f $0
$progdir/Ps/printstr "PSX BIOS - ON"
sleep 2
sync
