mirror of
https://github.com/catseye/SixtyPical.git
synced 2024-11-24 15:32:27 +00:00
Declare that --run replaces loadngo.sh, and remove the latter.
This commit is contained in:
parent
ce8e83908b
commit
a44b007ff0
@ -22,6 +22,8 @@ History of SixtyPical
|
||||
* Refactored internal data structures that represent
|
||||
references and types to be immutable `namedtuple`s.
|
||||
* Added `--dump-exit-contexts` option to `sixtypical`.
|
||||
* Added a new `--run` option to `sixtypical`, which replaces
|
||||
the old `loadngo.sh` script.
|
||||
|
||||
0.18
|
||||
----
|
||||
|
@ -20,14 +20,14 @@ executable search path. Then you can run:
|
||||
|
||||
If you have the [VICE][] emulator installed, you can run
|
||||
|
||||
./loadngo.sh c64 eg/c64/hearts.60p
|
||||
sixtypical --output-format=c64-basic-prg --run eg/c64/hearts.60p
|
||||
|
||||
and it will compile the [hearts.60p source code](eg/c64/hearts.60p) and
|
||||
automatically start it in the `x64` emulator, and you should see:
|
||||
|
||||
![Screenshot of result of running hearts.60p](images/hearts.png?raw=true)
|
||||
|
||||
You can try the `loadngo.sh` script on other sources in the `eg` directory
|
||||
You can try `sixtypical --run` on other sources in the `eg` directory
|
||||
tree, which contains more extensive examples, including an entire
|
||||
game(-like program); see [eg/README.md](eg/README.md) for a listing.
|
||||
|
||||
|
29
eg/apple2/README.md
Normal file
29
eg/apple2/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
This directory contains SixtyPical example programs
|
||||
specifically for the Apple II series of computers.
|
||||
|
||||
See the [README in the parent directory](../README.md) for
|
||||
more information on these example programs.
|
||||
|
||||
Note that `sixtypical` does not currently support "load
|
||||
and go" execution of these programs, because constructing
|
||||
an Apple II disk image file on the fly is not something
|
||||
it can currently do. If you have the linapple sources
|
||||
checked out, and the a2tools available, you could do
|
||||
something like this:
|
||||
|
||||
bin/sixtypical --traceback --origin=0x2000 --output-format=raw eg/apple2/prog.60p --output prog.bin
|
||||
cp /path/to/linapple/res/Master.dsk sixtypical.dsk
|
||||
a2rm sixtypical.dsk PROG
|
||||
a2in B sixtypical.dsk PROG prog.bin
|
||||
linapple -d1 sixtypical.dsk -autoboot
|
||||
|
||||
and then enter
|
||||
|
||||
BLOAD PROG
|
||||
CALL 8192
|
||||
|
||||
Ideally you could
|
||||
|
||||
BRUN PROG
|
||||
|
||||
But that does not always return to BASIC and I'm not sure why.
|
51
loadngo.sh
51
loadngo.sh
@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
usage="Usage: loadngo.sh (c64|vic20|atari2600|apple2) [--dry-run] <source.60p>"
|
||||
|
||||
arch="$1"
|
||||
shift 1
|
||||
if [ "X$arch" = "Xc64" ]; then
|
||||
output_format='c64-basic-prg'
|
||||
emu="x64 -config vicerc"
|
||||
elif [ "X$arch" = "Xvic20" ]; then
|
||||
output_format='vic20-basic-prg'
|
||||
emu="xvic -config vicerc"
|
||||
elif [ "X$arch" = "Xatari2600" ]; then
|
||||
output_format='atari2600-cart'
|
||||
emu='stella'
|
||||
elif [ "X$arch" = "Xapple2" ]; then
|
||||
src="$1"
|
||||
out=/tmp/a-out.bin
|
||||
bin/sixtypical --traceback --origin=0x2000 --output-format=raw $src --output $out || exit 1
|
||||
ls -la $out
|
||||
cp ~/scratchpad/linapple/res/Master.dsk sixtypical.dsk
|
||||
# TODO: replace HELLO with something that does like
|
||||
# BLOAD "PROG"
|
||||
# CALL 8192
|
||||
# (not BRUN because it does not always return to BASIC afterwards not sure why)
|
||||
a2rm sixtypical.dsk PROG
|
||||
a2in B sixtypical.dsk PROG $out
|
||||
linapple -d1 sixtypical.dsk -autoboot
|
||||
rm -f $out sixtypical.dsk
|
||||
exit 0
|
||||
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 --output-format=$output_format $src --output $out || exit 1
|
||||
ls -la $out
|
||||
$emu $out
|
||||
rm -f $out
|
Loading…
Reference in New Issue
Block a user