saturnng/dist/saturn48gx

29 lines
859 B
Text
Raw Normal View History

2024-08-25 16:52:42 +02:00
#!/bin/bash -eu
STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
STATEDIR=$STATE_HOME/saturn/48gx
mkdir -p "$STATEDIR"
if [ ! -e "$STATEDIR"/gxrom-r ]; then
2024-08-25 17:26:24 +02:00
if [ ! -d @PREFIX@/share/saturn/ROMs/ ]; then
2024-08-25 17:05:35 +02:00
echo "Error: No ROMs/ dir found"
exit 1
fi
2024-08-25 17:26:24 +02:00
cp -R @PREFIX@/share/saturn/ROMs/ "$STATEDIR"/ROMs
2024-08-25 17:05:35 +02:00
make -C "$STATEDIR"/ROMs get-roms
cp "$STATEDIR"/ROMs/gxrom-r "$STATEDIR"/gxrom-r
2024-08-25 16:52:42 +02:00
fi
RAM=''
if [ ! -e "$STATEDIR"/ram ]; then
RAM=-reset
fi
[ ! -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-08-25 17:13:24 +02:00
# export XAPPLRESDIR=/etc/X11/app-defaults/
2024-08-25 17:26:24 +02:00
# export NLSPATH=@PREFIX@/share/locale/C/LC_MESSAGES/
2024-08-25 17:39:50 +02:00
@PREFIX@/bin/saturn -face hp48 -hw hp48 -stateDir "$STATEDIR" -rom gxrom-r $RAM -port1 port1 -port2 port2 "$@"