From 5a30a46c884d7ae89b7929dde3662d22757e88c9 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Thu, 2 Jul 2020 23:39:45 +0200 Subject: [PATCH] First automated targetcompiler run --- 6502/C64/Makefile | 14 ++++++++++++++ 6502/C64/emulator/build-c64forth.sh | 13 +++++++++++++ 6502/C64/emulator/build-tcbase.sh | 13 +++++++++++++ 6502/C64/src/mk-c64forth.fth | 6 ++++++ 6502/C64/src/mk-tcbase.fth | 12 ++++++++++++ 5 files changed, 58 insertions(+) create mode 100755 6502/C64/emulator/build-c64forth.sh create mode 100755 6502/C64/emulator/build-tcbase.sh create mode 100644 6502/C64/src/mk-c64forth.fth create mode 100644 6502/C64/src/mk-tcbase.fth diff --git a/6502/C64/Makefile b/6502/C64/Makefile index f4f00cf..0e45df6 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -34,6 +34,17 @@ run-testbase16: emulator/testbase16.T64 VICE=xplus4 emulator/run-in-vice.sh testbase16 +# Targetcompiler targets + +cbmfiles/tcbase: emulator/testbase.T64 emulator/build-tcbase.sh \ + disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-tcbase.fth + emulator/build-tcbase.sh + +cbmfiles/vf83-c64: emulator/tcbase.T64 emulator/build-c64forth.sh \ + disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-c64forth.fth + emulator/build-c64forth.sh + + # Core test targets test-c64.result: emulator/testbase.T64 $(test_files_petscii) \ @@ -78,6 +89,9 @@ emulator/%.T64: cbmfiles/% # Generic rule for populating cbmfiles/ with PETSCII text files +cbmfiles/%.fth: src/%.fth + ascii2petscii $< $@ + cbmfiles/%.fth: tests/%.fth ascii2petscii $< $@ diff --git a/6502/C64/emulator/build-c64forth.sh b/6502/C64/emulator/build-c64forth.sh new file mode 100755 index 0000000..9d3992a --- /dev/null +++ b/6502/C64/emulator/build-c64forth.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +emulatordir="$(dirname "${BASH_SOURCE[0]}")" +basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" + +rm -f "${basedir}/cbmfiles/vf83-c64" + +keybuf="include mk-c64forth.fth\n\ +save-target vf83-c64\ndos s0:notdone\n" + +DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \ + "tcbase" "${keybuf}" diff --git a/6502/C64/emulator/build-tcbase.sh b/6502/C64/emulator/build-tcbase.sh new file mode 100755 index 0000000..6762203 --- /dev/null +++ b/6502/C64/emulator/build-tcbase.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -e + +emulatordir="$(dirname "${BASH_SOURCE[0]}")" +basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" + +rm -f "${basedir}/cbmfiles/tcbase" + +keybuf="2 drive 4 load\ninclude mk-tcbase.fth\n\ +savesystem tcbase\ndos s0:notdone\n" + +DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \ + "testbase" "${keybuf}" diff --git a/6502/C64/src/mk-c64forth.fth b/6502/C64/src/mk-c64forth.fth new file mode 100644 index 0000000..50b473f --- /dev/null +++ b/6502/C64/src/mk-c64forth.fth @@ -0,0 +1,6 @@ + +hex + +2 drive 27 30 thru + +1 drive f load diff --git a/6502/C64/src/mk-tcbase.fth b/6502/C64/src/mk-tcbase.fth new file mode 100644 index 0000000..54a605f --- /dev/null +++ b/6502/C64/src/mk-tcbase.fth @@ -0,0 +1,12 @@ + +: edit list ; + +: .blk ( -) + blk @ ?dup IF ." Blk " u. ?cr THEN ; + +' .blk is .status + +hex + +2 drive 10 load +