#!/bin/sh
cat /etc/losetup.key | losetup -e aes -k 256 -p 0 /dev/loop/12 /mnt/usb/vf5fs.dat
mount /dev/loop/12 /home
cat /etc/losetup.key | losetup -e aes -k 256 -p 0 /dev/loop/13 /mnt/usb/vf5fs_ext.dat
mount /dev/loop/13 /home/disk1/ext
exit 0
if [ ! -f /home/disk0/vf5 ]; then
echo "game has been modified, NOT ALLOWED!"
umount /home/disk1/ext
losetup -d /dev/loop/13
umount /home
losetup -d /dev/loop/12
exit 0
fi
#cp /home/disk0/vf5_SATELLITE /home/disk0/vf5
pushd /games/saves/ > /dev/null
/games/saves/backup.sh load vf5fs
popd > /dev/null
/home/run.sh -t
/usr/segaboot.sh
/home/run.sh -wxga
umount /home/disk1/ext
losetup -d /dev/loop/13
umount /home
losetup -d /dev/loop/12
pushd /games/saves/ > /dev/null
/games/saves/backup.sh save vf5fs
popd > /dev/null
