From a44b007ff01dc62ab085a4ac2dc82dc3a6962cff Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Mon, 15 Apr 2019 13:11:43 +0100 Subject: [PATCH] Declare that --run replaces loadngo.sh, and remove the latter. --- HISTORY.md | 2 ++ README.md | 4 ++-- eg/apple2/README.md | 29 ++++++++++++++++++++++++++ loadngo.sh | 51 --------------------------------------------- 4 files changed, 33 insertions(+), 53 deletions(-) create mode 100644 eg/apple2/README.md delete mode 100755 loadngo.sh diff --git a/HISTORY.md b/HISTORY.md index eea41ac..f5c452d 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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 ---- diff --git a/README.md b/README.md index fc9c2d4..e9bcf59 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/eg/apple2/README.md b/eg/apple2/README.md new file mode 100644 index 0000000..77bd7d8 --- /dev/null +++ b/eg/apple2/README.md @@ -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. diff --git a/loadngo.sh b/loadngo.sh deleted file mode 100755 index c87b359..0000000 --- a/loadngo.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -usage="Usage: loadngo.sh (c64|vic20|atari2600|apple2) [--dry-run] " - -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