2018-03-07 13:27:57 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-03-28 13:20:53 +00:00
|
|
|
usage="Usage: loadngo.sh (c64|vic20|atari2600) [--dry-run] <source.60p>"
|
2018-03-07 13:27:57 +00:00
|
|
|
|
|
|
|
arch="$1"
|
|
|
|
shift 1
|
|
|
|
if [ "X$arch" = "Xc64" ]; then
|
|
|
|
prelude='c64'
|
|
|
|
if [ -e vicerc ]; then
|
|
|
|
emu="x64 -config vicerc"
|
|
|
|
else
|
|
|
|
emu="x64"
|
|
|
|
fi
|
|
|
|
elif [ "X$arch" = "Xvic20" ]; then
|
|
|
|
prelude='vic20'
|
|
|
|
if [ -e vicerc ]; then
|
|
|
|
emu="xvic -config vicerc"
|
|
|
|
else
|
|
|
|
emu="xvic"
|
|
|
|
fi
|
2018-03-28 13:20:53 +00:00
|
|
|
elif [ "X$arch" = "Xatari2600" ]; then
|
|
|
|
prelude='atari2600'
|
|
|
|
emu='stella'
|
2018-03-07 13:27:57 +00:00
|
|
|
else
|
|
|
|
echo $usage && exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "X$1" = "X--dry-run" ]; then
|
|
|
|
shift 1
|
|
|
|
emu='echo'
|
|
|
|
fi
|
|
|
|
|
|
|
|
src="$1"
|
|
|
|
if [ "X$src" = "X" ]; then
|
|
|
|
echo $usage && exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
### do it ###
|
|
|
|
|
|
|
|
out=/tmp/a-out.prg
|
|
|
|
bin/sixtypical --traceback --prelude=$prelude $src > $out || exit 1
|
|
|
|
ls -la $out
|
|
|
|
$emu $out
|
|
|
|
rm -f $out
|