2024-03-20 15:23:10 +01:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
2024-03-26 15:19:57 +01:00
|
|
|
cd "$(dirname "$0")" ; CWD=$(pwd)
|
2024-03-20 15:23:10 +01:00
|
|
|
|
2024-03-26 15:19:57 +01:00
|
|
|
STATEDIR=$CWD/stateDir.48
|
|
|
|
mkdir -p "$STATEDIR"
|
|
|
|
|
|
|
|
if [ ! -e "$STATEDIR"/gxrom-r ]; then
|
2024-03-20 20:54:38 +01:00
|
|
|
make -C .. get-roms
|
2024-08-25 16:52:42 +02:00
|
|
|
cp ROMs/gxrom-r "$STATEDIR"/gxrom-r
|
2024-03-20 15:23:10 +01:00
|
|
|
fi
|
2024-03-20 15:33:48 +01:00
|
|
|
|
2024-03-20 16:25:41 +01:00
|
|
|
RAM=''
|
2024-03-26 15:19:57 +01:00
|
|
|
if [ ! -e "$STATEDIR"/ram ]; then
|
2024-03-20 16:25:41 +01:00
|
|
|
RAM=-reset
|
2024-03-20 15:23:10 +01:00
|
|
|
fi
|
|
|
|
|
2024-03-26 15:19:57 +01:00
|
|
|
[ ! -e "$STATEDIR"/port1 ] && dd if=/dev/zero of="$STATEDIR"/port1 bs=1k count=128
|
|
|
|
[ ! -e "$STATEDIR"/port2 ] && dd if=/dev/zero of="$STATEDIR"/port2 bs=1k count=4096
|
2024-03-20 15:33:48 +01:00
|
|
|
|
2024-03-26 15:19:57 +01:00
|
|
|
./run_saturn -face hp48 -hw hp48 -stateDir "$STATEDIR" -rom gxrom-r $RAM -port1 port1 -port2 port2
|