git @ Cat's Eye Technologies SixtyPical / a44b007
Declare that --run replaces loadngo.sh, and remove the latter. Chris Pressey 2 years ago
4 changed file(s) with 33 addition(s) and 53 deletion(s). Raw diff Collapse all Expand all
2121 * Refactored internal data structures that represent
2222 references and types to be immutable `namedtuple`s.
2323 * Added `--dump-exit-contexts` option to `sixtypical`.
24 * Added a new `--run` option to `sixtypical`, which replaces
25 the old `loadngo.sh` script.
2426
2527 0.18
2628 ----
1919
2020 If you have the [VICE][] emulator installed, you can run
2121
22 ./loadngo.sh c64 eg/c64/hearts.60p
22 sixtypical --output-format=c64-basic-prg --run eg/c64/hearts.60p
2323
2424 and it will compile the [hearts.60p source code](eg/c64/hearts.60p) and
2525 automatically start it in the `x64` emulator, and you should see:
2626
2727 ![Screenshot of result of running hearts.60p](images/hearts.png?raw=true)
2828
29 You can try the `loadngo.sh` script on other sources in the `eg` directory
29 You can try `sixtypical --run` on other sources in the `eg` directory
3030 tree, which contains more extensive examples, including an entire
3131 game(-like program); see [eg/README.md](eg/README.md) for a listing.
3232
0 This directory contains SixtyPical example programs
1 specifically for the Apple II series of computers.
2
3 See the [README in the parent directory](../README.md) for
4 more information on these example programs.
5
6 Note that `sixtypical` does not currently support "load
7 and go" execution of these programs, because constructing
8 an Apple II disk image file on the fly is not something
9 it can currently do. If you have the linapple sources
10 checked out, and the a2tools available, you could do
11 something like this:
12
13 bin/sixtypical --traceback --origin=0x2000 --output-format=raw eg/apple2/prog.60p --output prog.bin
14 cp /path/to/linapple/res/Master.dsk sixtypical.dsk
15 a2rm sixtypical.dsk PROG
16 a2in B sixtypical.dsk PROG prog.bin
17 linapple -d1 sixtypical.dsk -autoboot
18
19 and then enter
20
21 BLOAD PROG
22 CALL 8192
23
24 Ideally you could
25
26 BRUN PROG
27
28 But that does not always return to BASIC and I'm not sure why.
+0
-51
loadngo.sh less more
0 #!/bin/sh
1
2 usage="Usage: loadngo.sh (c64|vic20|atari2600|apple2) [--dry-run] <source.60p>"
3
4 arch="$1"
5 shift 1
6 if [ "X$arch" = "Xc64" ]; then
7 output_format='c64-basic-prg'
8 emu="x64 -config vicerc"
9 elif [ "X$arch" = "Xvic20" ]; then
10 output_format='vic20-basic-prg'
11 emu="xvic -config vicerc"
12 elif [ "X$arch" = "Xatari2600" ]; then
13 output_format='atari2600-cart'
14 emu='stella'
15 elif [ "X$arch" = "Xapple2" ]; then
16 src="$1"
17 out=/tmp/a-out.bin
18 bin/sixtypical --traceback --origin=0x2000 --output-format=raw $src --output $out || exit 1
19 ls -la $out
20 cp ~/scratchpad/linapple/res/Master.dsk sixtypical.dsk
21 # TODO: replace HELLO with something that does like
22 # BLOAD "PROG"
23 # CALL 8192
24 # (not BRUN because it does not always return to BASIC afterwards not sure why)
25 a2rm sixtypical.dsk PROG
26 a2in B sixtypical.dsk PROG $out
27 linapple -d1 sixtypical.dsk -autoboot
28 rm -f $out sixtypical.dsk
29 exit 0
30 else
31 echo $usage && exit 1
32 fi
33
34 if [ "X$1" = "X--dry-run" ]; then
35 shift 1
36 emu='echo'
37 fi
38
39 src="$1"
40 if [ "X$src" = "X" ]; then
41 echo $usage && exit 1
42 fi
43
44 ### do it ###
45
46 out=/tmp/a-out.prg
47 bin/sixtypical --traceback --output-format=$output_format $src --output $out || exit 1
48 ls -la $out
49 $emu $out
50 rm -f $out