Merge pull request #9 from pzembrod/master

First automated C16 build
This commit is contained in:
Carsten Strotmann 2020-07-07 08:01:34 +02:00 committed by GitHub
commit bd944cdedc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 209 additions and 50 deletions

View File

@ -8,6 +8,8 @@ VERSION=vf-latest
vf_blk_d64_files = $(wildcard disks/*.d64)
vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files))
vf_fth_files = $(wildcard src/vf-*.fth)
vf_fth_files_petscii = $(patsubst src/%, cbmfiles/%, $(vf_fth_files))
test_files = $(wildcard tests/*.f*)
test_files_petscii = $(patsubst tests/%, cbmfiles/%, $(test_files))
@ -28,6 +30,12 @@ test: test-c64.result test-c16.result
test64: test-c64.result
# Temporary bincmp target while the old and the new binaries are still
# expected to be binary identical.
bincmp: cbmfiles/c64-vf-latest cbmfiles/c16-vf-latest
cmp cbmfiles/c64-vf-latest cbmfiles/c64-volksforth83
cmp cbmfiles/c16-vf-latest cbmfiles/c16-volksforth83
run-devenv: emulator/devenv.T64
emulator/run-in-vice.sh devenv
@ -40,20 +48,24 @@ run-testbase16: emulator/testbase16.T64
# Targetcompiler targets
cbmfiles/tcbase: emulator/c64-testbase.T64 emulator/build-tcbase.sh \
disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-tcbase.fth
cbmfiles/tcbase: emulator/c64-volksforth83.T64 emulator/build-tcbase.sh \
disks/tc38q.d64 disks/file-words.d64 cbmfiles/tc-base.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
cbmfiles/c64-vf-latest: emulator/tcbase.T64 emulator/build-vf.sh \
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
emulator/build-vf.sh vf-c64-main.fth c64-vf-latest
# C16 with 64 kB RAM or Plus4 - called (C16+ in the sources.
cbmfiles/c16-vf-latest: emulator/tcbase.T64 emulator/build-vf.sh \
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
emulator/build-vf.sh vf-c16-main.fth c16-vf-latest
# C16 with 32 kB RAM - called (C16- in the sources.
cbmfiles/c16-vf-32k: emulator/tcbase.T64 emulator/build-vf.sh \
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
emulator/build-vf.sh vf-c16-32k.fth c16-vf-32k
# 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

View File

@ -1,3 +1,5 @@
*.fth
core.fr
notdone
c64-testbase
c16-testbase

Binary file not shown.

Binary file not shown.

View File

@ -1,13 +0,0 @@
#!/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}"

View File

@ -1,4 +1,7 @@
#!/bin/bash
# build script for the resident part of the target compiler running
# on the C64.
set -e
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
@ -6,8 +9,9 @@ basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
rm -f "${basedir}/cbmfiles/tcbase"
keybuf="2 drive 4 load\ninclude mk-tcbase.fth\n\
keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\
2 drive 4 load\ninclude tc-base.fth\n\
savesystem tcbase\ndos s0:notdone\n"
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
"c64-testbase" "${keybuf}"
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
"c64-volksforth83" "${keybuf}"

View File

@ -1,16 +0,0 @@
#!/bin/bash
set -e
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
rm -f "${basedir}/cbmfiles/testbase"
# 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 testbase16\ndos s0:notdone\n"
VICE=xplus4 DISK11=file-words "${emulatordir}/run-in-vice.sh" \
"c16-volksforth83" "${keybuf}"

21
6502/C64/emulator/build-vf.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
# Script for target-compiling the CBM versions of VolksForth.
# It uses the tcbase binary, i.e. the resident part of the target
# compiler, adds the transient part of the target compiler, then
# loads the VolksForth sources, and saves the target.
set -e
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
source="$1"
target="$2"
rm -f "${basedir}/cbmfiles/${target}"
keybuf="include ${source}\nsave-target ${target}\ndos s0:notdone\n"
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
"tcbase" "${keybuf}"

View File

@ -1,6 +0,0 @@
hex
2 drive 27 30 thru
1 drive f load

View File

@ -1,5 +1,7 @@
: edit list ;
\ loadfile for the resident part of the target compiler.
' list alias edit
: .blk ( -)
blk @ ?dup IF ." Blk " u. ?cr THEN ;

View File

@ -0,0 +1,34 @@
hex
2 drive 27 30 thru
1 drive
Onlyforth hex
c load \ clear memory and
d e thru \ clr labels .status
\ *** Block No. 9, Hexblock 9
\ Target-Machine clv06dec88
cr .( Host is: )
(64 .( C64) C)
(16 .( C16) C)
: ) ; immediate
: (C ; immediate
\ : (C64 ; immediate
: (C16 ; immediate
\ : (C16+ ; immediate
: (C16- ; immediate
: (C64 [compile] ( ; immediate
\ : (C16 [compile] ( ; immediate
: (C16+ [compile] ( ; immediate
\ : (C16- [compile] ( ; immediate
include vf-main.fth

View File

@ -0,0 +1,43 @@
hex
2 drive 27 30 thru
1 drive
Onlyforth hex
c load \ clear memory and
d e thru \ clr labels .status
\ *** Block No. 9, Hexblock 9
\ Target-Machine clv06dec88
cr .( Host is: )
(64 .( C64) C)
(16 .( C16) C)
: ) ; immediate
: (C ; immediate
\ : (C64 ; immediate
: (C16 ; immediate
: (C16+ ; immediate
\ : (C16- ; immediate
: (C64 [compile] ( ; immediate
\ : (C16 [compile] ( ; immediate
\ : (C16+ [compile] ( ; immediate
: (C16- [compile] ( ; immediate
\ *** Block No. 10, Hexblock a
\ load/remove JSR-Macros clv14.4.87)
Assembler also definitions
\needs C16+Jsr 8 load
' C16+Jsr Is Jsr .( JSR Is:C16+ )
include vf-main.fth

View File

@ -0,0 +1,34 @@
hex
2 drive 27 30 thru
1 drive
Onlyforth hex
c load \ clear memory and
d e thru \ clr labels .status
\ *** Block No. 9, Hexblock 9
\ Target-Machine clv06dec88
cr .( Host is: )
(64 .( C64) C)
(16 .( C16) C)
: ) ; immediate
: (C ; immediate
: (C64 ; immediate
\ : (C16 ; immediate
\ : (C16+ ; immediate
\ : (C16- ; immediate
\ : (C64 [compile] ( ; immediate
: (C16 [compile] ( ; immediate
: (C16+ [compile] ( ; immediate
: (C16- [compile] ( ; immediate
include vf-main.fth

24
6502/C64/src/vf-main.fth Normal file
View File

@ -0,0 +1,24 @@
include vf-pr-target.fth
Onlyforth
(C64 $801 ) (C16 $1001 ) dup displace !
Target definitions here!
$10 $7D thru
Assembler nonrelocate
.unresolved
' .blk is .status
include vf-pr-target.fth
cr .( for manual saving:)
cr .( save-target volksforth83)
cr
quit

View File

@ -0,0 +1,18 @@
\ *** Block No. 11, Hexblock b
cr .( Target is: ) \ clv14.4.87)
(C .( CBM )
(C64 .( C64 )
(C16 .( C16 with )
(C16+ .( 64kb )
(C16- .( 32kb )
cr .( Target is not: )
(C \ ) .( CBM, )
(C64 \ ) .( C64, )
(C16 \ ) .( C16, )
(C16+ \ ) .( C16+64kb, )
(C16- \ ) .( C16-32kb, )