mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-25 07:32:16 +00:00
Make loadngo.sh able to handle both C64 (x64) and VIC-20 (xvic).
This commit is contained in:
parent
72efecbb1a
commit
95fb2bb8f6
@ -7,3 +7,6 @@ They are not meant to be specific to any architecture, but
|
|||||||
many do assume the existence of a routine at 65490 which
|
many do assume the existence of a routine at 65490 which
|
||||||
outputs the value of the accumulator as an ASCII character,
|
outputs the value of the accumulator as an ASCII character,
|
||||||
simply for the purposes of producing some observable output.
|
simply for the purposes of producing some observable output.
|
||||||
|
(This is an address of a KERNAL routine which does this
|
||||||
|
on both the Commodore 64 and the Commodore VIC-20, so these
|
||||||
|
sources should be usable on these architectures.)
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "X$X64" = "X" ]; then
|
|
||||||
X64=x64
|
|
||||||
fi
|
|
||||||
SRC=$1
|
|
||||||
if [ "X$1" = "X" ]; then
|
|
||||||
echo "Usage: ./loadngo-c64.sh <source.60p>"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
OUT=/tmp/a-out.prg
|
|
||||||
bin/sixtypical --traceback --prelude=c64 $SRC > $OUT || exit 1
|
|
||||||
ls -la $OUT
|
|
||||||
if [ -e vicerc ]; then
|
|
||||||
$X64 -config vicerc $OUT
|
|
||||||
else
|
|
||||||
$X64 $OUT
|
|
||||||
fi
|
|
||||||
rm -f $OUT
|
|
41
loadngo.sh
Executable file
41
loadngo.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
usage="Usage: loadngo.sh (c64|vic20) [--dry-run] <source.60p>"
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user