mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-02-06 15:30:36 +00:00
Merge pull request #8 from pzembrod/master
Automate targetcompiler run and fit testing to new-built forth system
This commit is contained in:
commit
b063b52735
@ -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
|
||||
@ -34,20 +38,37 @@ run-testbase16: emulator/testbase16.T64
|
||||
VICE=xplus4 emulator/run-in-vice.sh testbase16
|
||||
|
||||
|
||||
# Targetcompiler targets
|
||||
|
||||
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/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
|
||||
@ -61,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
|
||||
@ -78,6 +99,9 @@ emulator/%.T64: cbmfiles/%
|
||||
|
||||
# Generic rule for populating cbmfiles/ with PETSCII text files
|
||||
|
||||
cbmfiles/%.fth: src/%.fth
|
||||
ascii2petscii $< $@
|
||||
|
||||
cbmfiles/%.fth: tests/%.fth
|
||||
ascii2petscii $< $@
|
||||
|
||||
|
Binary file not shown.
BIN
6502/C64/cbmfiles/tcbase
Normal file
BIN
6502/C64/cbmfiles/tcbase
Normal file
Binary file not shown.
Binary file not shown.
13
6502/C64/emulator/build-c64forth.sh
Executable file
13
6502/C64/emulator/build-c64forth.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
|
||||
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
||||
|
||||
rm -f "${basedir}/cbmfiles/c64-vf-latest"
|
||||
|
||||
keybuf="include mk-c64forth.fth\n\
|
||||
save-target c64-vf-latest\ndos s0:notdone\n"
|
||||
|
||||
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
|
||||
"tcbase" "${keybuf}"
|
13
6502/C64/emulator/build-tcbase.sh
Executable file
13
6502/C64/emulator/build-tcbase.sh
Executable file
@ -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" \
|
||||
"c64-testbase" "${keybuf}"
|
@ -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}"
|
||||
|
6
6502/C64/src/mk-c64forth.fth
Normal file
6
6502/C64/src/mk-c64forth.fth
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
hex
|
||||
|
||||
2 drive 27 30 thru
|
||||
|
||||
1 drive f load
|
12
6502/C64/src/mk-tcbase.fth
Normal file
12
6502/C64/src/mk-tcbase.fth
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
: edit list ;
|
||||
|
||||
: .blk ( -)
|
||||
blk @ ?dup IF ." Blk " u. ?cr THEN ;
|
||||
|
||||
' .blk is .status
|
||||
|
||||
hex
|
||||
|
||||
2 drive 10 load
|
||||
|
Loading…
x
Reference in New Issue
Block a user