saturnng/dist/gwh_run48.sh

23 lines
574 B
Bash
Raw Normal View History

#!/bin/bash -eu
STATEDIR=./stateDir.gwh_run48
mkdir -p $STATEDIR
if [ ! -e $STATEDIR/gxrom-r ]; then
2024-03-20 15:33:48 +01:00
( cd $STATEDIR
wget -c https://www.hpcalc.org/hp48/pc/emulators/gxrom-r.zip -O gxrom-r.zip
unzip gxrom-r.zip
rm gxrom-r.zip
)
fi
2024-03-20 15:33:48 +01:00
2024-03-20 16:25:41 +01:00
RAM=''
if [ ! -e $STATEDIR/ram ]; then
2024-03-20 16:25:41 +01:00
RAM=-reset
fi
2024-03-20 16:25:41 +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=1024
2024-03-20 15:33:48 +01:00
2024-03-20 16:25:41 +01:00
./run_saturn -face hp48 -hw hp48 -stateDir $STATEDIR -rom gxrom-r $RAM -port1 port1 -port2 port2