diff --git a/6502/C64/Makefile b/6502/C64/Makefile index 0e45df6..0fb31c6 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -3,6 +3,9 @@ # the file format conversion tools from the tools/ subdir of # https://github.com/pzembrod/cc64 to be installed. +# VERSION=volksforth83 +VERSION=vf-latest + vf_blk_d64_files = $(wildcard disks/*.d64) vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files)) @@ -16,6 +19,7 @@ vf_blk_fth: $(vf_blk_fth_files) clean: rm -f cbmfiles/*.fr cbmfiles/*.fth cbmfiles/*.log *.log *.result + rm -f cbmfiles/c??-testbase # Convenience targets @@ -36,29 +40,35 @@ run-testbase16: emulator/testbase16.T64 # Targetcompiler targets -cbmfiles/tcbase: emulator/testbase.T64 emulator/build-tcbase.sh \ +cbmfiles/tcbase: emulator/c64-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 \ +cbmfiles/c64-vf-latest: emulator/tcbase.T64 emulator/build-c64forth.sh \ disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-c64forth.fth emulator/build-c64forth.sh +# Temp stopgap to fit c16 into default use of VERSION=vf-latest +# until we have a proper c16 targetcompiler rule. +# Missing part: Moving the target machine definition from vforth4_2.d64 +# screen 9 to somewhere more flexible. Likely two .fth files. +cbmfiles/c16-vf-latest: cbmfiles/c16-volksforth83 + cp $< $@ # Core test targets -test-c64.result: emulator/testbase.T64 $(test_files_petscii) \ +test-c64.result: emulator/c64-testbase.T64 $(test_files_petscii) \ emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c64.golden rm -f test-c64.log test-c64.result - emulator/run-in-vice.sh testbase \ + emulator/run-in-vice.sh c64-testbase \ "include run-vf-tests.fth\n1234567890\ndos s0:notdone\n" petscii2ascii cbmfiles/test.log test-c64.log tests/evaluate-test.sh test-c64 -test-c16.result: emulator/testbase16.T64 $(test_files_petscii) \ +test-c16.result: emulator/c16-testbase.T64 $(test_files_petscii) \ emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c16.golden rm -f test-c16.log test-c16.result - VICE=xplus4 emulator/run-in-vice.sh testbase16 \ + VICE=xplus4 emulator/run-in-vice.sh c16-testbase \ "include run-vf-tests.fth\n1234567890\ndos s0:notdone\n" petscii2ascii cbmfiles/test.log test-c16.log tests/evaluate-test.sh test-c16 @@ -72,13 +82,13 @@ cbmfiles/devenv: emulator/run-in-vice.sh emulator/build-devenv.sh \ disks/vforth4_1.d64 disks/vforth4_3.d64 disks/file-words.d64 emulator/build-devenv.sh -cbmfiles/testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \ - emulator/c64-volksforth83.T64 disks/file-words.d64 - emulator/build-testbase.sh +cbmfiles/c64-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \ + emulator/c64-$(VERSION).T64 disks/file-words.d64 + emulator/build-testbase.sh c64 $(VERSION) -cbmfiles/testbase16: emulator/run-in-vice.sh emulator/build-testbase.sh \ - emulator/c16-volksforth83.T64 disks/file-words.d64 - emulator/build-testbase16.sh +cbmfiles/c16-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \ + emulator/c16-$(VERSION).T64 disks/file-words.d64 + VICE=xplus4 emulator/build-testbase.sh c16 $(VERSION) # Generic T64 tape image rule diff --git a/6502/C64/cbmfiles/testbase b/6502/C64/cbmfiles/c64-vf-latest similarity index 88% rename from 6502/C64/cbmfiles/testbase rename to 6502/C64/cbmfiles/c64-vf-latest index 4eca2cb..ec518dd 100644 Binary files a/6502/C64/cbmfiles/testbase and b/6502/C64/cbmfiles/c64-vf-latest differ diff --git a/6502/C64/cbmfiles/tcbase b/6502/C64/cbmfiles/tcbase new file mode 100644 index 0000000..0ff1c57 Binary files /dev/null and b/6502/C64/cbmfiles/tcbase differ diff --git a/6502/C64/cbmfiles/testbase16 b/6502/C64/cbmfiles/testbase16 deleted file mode 100644 index c3a1241..0000000 Binary files a/6502/C64/cbmfiles/testbase16 and /dev/null differ diff --git a/6502/C64/emulator/build-c64forth.sh b/6502/C64/emulator/build-c64forth.sh index 9d3992a..cc0a10a 100755 --- a/6502/C64/emulator/build-c64forth.sh +++ b/6502/C64/emulator/build-c64forth.sh @@ -4,10 +4,10 @@ set -e emulatordir="$(dirname "${BASH_SOURCE[0]}")" basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" -rm -f "${basedir}/cbmfiles/vf83-c64" +rm -f "${basedir}/cbmfiles/c64-vf-latest" keybuf="include mk-c64forth.fth\n\ -save-target vf83-c64\ndos s0:notdone\n" +save-target c64-vf-latest\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 index 6762203..01cac95 100755 --- a/6502/C64/emulator/build-tcbase.sh +++ b/6502/C64/emulator/build-tcbase.sh @@ -10,4 +10,4 @@ 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}" + "c64-testbase" "${keybuf}" diff --git a/6502/C64/emulator/build-testbase.sh b/6502/C64/emulator/build-testbase.sh index a53cb4b..7e5c59e 100755 --- a/6502/C64/emulator/build-testbase.sh +++ b/6502/C64/emulator/build-testbase.sh @@ -4,13 +4,18 @@ set -e emulatordir="$(dirname "${BASH_SOURCE[0]}")" basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" -rm -f "${basedir}/cbmfiles/testbase" +platform="$1" +version="$2" +source="${platform}-${version}" +target="${platform}-testbase" + +rm -f "${basedir}/cbmfiles/${target}" # load savesystem w/o editor from file-words.d64 block 20. # load include and dos from file-words.d64 block 10. # savesystem and then scratch file notdone to exit emulator. keybuf="3 drive 20 load\n3 drive 10 load\n\ -savesystem testbase\ndos s0:notdone\n" +savesystem ${target}\ndos s0:notdone\n" DISK11=file-words "${emulatordir}/run-in-vice.sh" \ - "c64-volksforth83" "${keybuf}" + "${source}" "${keybuf}"