Merge pull request #2 from forth-ev/master

master update after X16 R46 merge
This commit is contained in:
Philip Zembrod 2023-12-03 13:56:56 +01:00 committed by GitHub
commit a368d2e1cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 150 additions and 55 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 1985-2006, Forthgesellschaft e.V. (www.forth-ev.de) All rights
Copyright (c) 1985-2023, Forthgesellschaft e.V. (www.forth-ev.de) All rights
reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -9,14 +9,20 @@ vf_fth_files = $(wildcard src/vf-*.fth src/v4th*.fth)
vf_fth_files_petscii = $(patsubst src/%, cbmfiles/%, $(vf_fth_files))
vf_flavours = \
v4thblk-c64 v4thblk-c16+ v4thblk-c16- \
v4th-c64 v4th-c16+ v4th-c16- v4th-x16
v4th-c64 v4th-c16+ v4th-c16- v4th-x16 v4th-x16e
vf_binaries = $(patsubst %, cbmfiles/%, $(vf_flavours))
all_src_files = $(wildcard src/*.fth)
all_src_files_petscii = $(patsubst src/%, cbmfiles/%, $(all_src_files))
test_files = $(wildcard tests/*.f*)
test_files_petscii = $(patsubst tests/%, cbmfiles/%, $(test_files))
test_logs = $(patsubst %, test-%.log, $(vf_flavours))
test_resuls = $(patsubst %, test-%.result, $(vf_flavours))
release_zipfile = volksforth-6502-c64-release.zip
# Target to convert all .d64 images into .fth files for easier reading,
# and to update all PETSCII files in cbmfiles to the latest state of
# the corresponding ASCII files in src.
@ -24,7 +30,8 @@ update: $(vf_blk_fth_files) $(vf_fth_files_petscii)
clean:
rm -f cbmfiles/*.fr cbmfiles/*.fth cbmfiles/*.log tmp/*
rm -f cbmfiles/*.fr cbmfiles/*.fth cbmfiles/*.log
rm -rf tmp/* release
rm -f *.log *.result *.golden
rm -f cbmfiles/c??-testbase
rm -f disks/scratch.d64 emulator/sdcard.img
@ -56,16 +63,37 @@ run-testbase16: emulator/testbase16.T64
VICE=xplus4 emulator/run-in-vice.sh testbase16
release: release/$(release_zipfile)
release/$(release_zipfile): $(vf_binaries) \
$(all_src_files) $(all_src_files_petscii) \
$(test_files) $(test_files_petscii) COPYING RELEASE_NOTES.md
rm -rf release
mkdir release
rm -rf tmp
mkdir tmp
mkdir tmp/binaries
mkdir tmp/src
mkdir tmp/src_petscii
mkdir tmp/tests
mkdir tmp/tests_petscii
cp -p COPYING RELEASE_NOTES.md tmp/
cp -p $(vf_binaries) tmp/binaries/
cp -p $(all_src_files) tmp/src/
cp -p $(all_src_files_petscii) tmp/src_petscii/
cp -p $(test_files) tmp/tests/
cp -p $(test_files_petscii) tmp/tests_petscii/
(cd tmp && zip -r ../release/$(release_zipfile) *)
# Targetcompiler targets
cbmfiles/tcbase: emulator/v4th-c64-4tc.T64 emulator/build-tcbase.sh \
disks/tc38q.d64 disks/file-words.d64 cbmfiles/tc-base.fth
emulator/build-tcbase.sh
$(vf_binaries): emulator/tcbase.T64 emulator/build-vf.sh \
disks/tc38q.d64 $(vf_fth_files_petscii)
$(vf_binaries): cbmfiles/logtofile.fth
$(vf_binaries): $(vf_fth_files_petscii) emulator/build-vf.sh \
emulator/tcbase.T64 disks/tc38q.d64 cbmfiles/logtofile.fth
cbmfiles/v4thblk-c64:
emulator/build-vf.sh v4thblk-c64
@ -88,6 +116,9 @@ cbmfiles/v4th-c16-:
cbmfiles/v4th-x16:
emulator/build-vf.sh v4th-x16
cbmfiles/v4th-x16e:
emulator/build-vf.sh v4th-x16e
# Core test targets
@ -138,30 +169,13 @@ test-v4th-x16.log: cbmfiles/v4th-x16 emulator/sdcard.img
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@
test-v4th-x16-39.log: $(test_files_petscii) emulator/run-in-vice.sh
test-v4th-x16-39.log: cbmfiles/v4th-x16 emulator/sdcard.img
test-v4th-x16e.log: cbmfiles/v4th-x16e emulator/sdcard.img
rm -f cbmfiles/test.log
emulator/run-in-x16-39.sh v4th-x16 \
emulator/run-in-x16emu.sh v4th-x16e \
"include run-std-tests.fth\n1234567890"
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@
test-v4th-x16-39.golden: test-v4th-x16.golden
cp $< $@
test-v4th-x16-41.log: $(test_files_petscii) emulator/run-in-vice.sh
test-v4th-x16-41.log: cbmfiles/v4th-x16 emulator/sdcard.img
rm -f cbmfiles/test.log
emulator/run-in-x16-41.sh v4th-x16 \
"include run-std-tests.fth\n1234567890"
mcopy -i emulator/sdcard.img ::TEST.LOG cbmfiles/test.log
petscii2ascii cbmfiles/test.log $@
test-v4th-x16-41.golden: test-v4th-x16.golden
cp $< $@
test-%.result: test-%.log test-%.golden tests/evaluate-test.sh
rm -f $@
tests/evaluate-test.sh $(basename $@)
@ -201,6 +215,10 @@ test-v4th-x16.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreext double report-noblk)
cat $^ > $@
test-v4th-x16e.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreext double report-noblk)
cat $^ > $@
# Rules for building Forth binaries on top of the plain vanilla
# c64-volksforth83.
@ -214,18 +232,22 @@ cbmfiles/devenv: emulator/run-in-vice.sh emulator/build-devenv.sh \
emulator/%.T64: cbmfiles/%
bin2t64 $< $@
touch -m -r $< $@
# Generic rule for populating cbmfiles/ with PETSCII text files
cbmfiles/%.fth: src/%.fth
ascii2petscii $< $@
touch -m -r $< $@
cbmfiles/%.fth: tests/%.fth
ascii2petscii $< $@
touch -m -r $< $@
cbmfiles/%.fr: tests/%.fr
ascii2petscii $< $@
touch -m -r $< $@
# Generic rule for converting .d64 blk sources into .fth files.

45
6502/C64/RELEASE_NOTES.md Normal file
View File

@ -0,0 +1,45 @@
# VolksForth 6502 C64 Releases
Release notes of VolksForth for 6502 on CBM-like machines (C64/C16/X16)
## Release content
The latest release zip file `volksforth-6502-c64-release.zip` contains
* `binaries/` - the compiled VolksForth binaries, namely:
* `v4th-c64` - minimal C64 kernel
* `v4thblk-c64` - C64 kernel with added block words
* `v4th-c16-` - minmal C16 kernel using 32k RAM
* `v4thblk-c16-` - C16 kernel using 32k RAM with added block words
* `v4th-c16+` - minmal C16 kernel using 63k RAM
(with bank switching)
* `v4thblk-c16+` - C16 kernel using 63k RAM with added block words
* `v4th-x16` - minmal Commander X16 kernel
* `v4th-x16e` - Commander X16 kernel with added X16Edit and
DOS commands
* `src/` - sources
* `v4th*.fth` - the binaries' main files
* `vf-*.fth` - sources from which VolksForth
kernels are compiled
* further Forth sources
* `src_petscii/` - the files from `src/` converted to PETSCII
* `tests/` - the test files used to validate VolksForth builds
* `tests_petscii/` - the files from `tests/` converted to PETSCII
## Versions
The following version descriptions areonly valid for VolksForth 6502
C64 Releases. As of now (Dec 2023), the different VolksForth platforms
(6502, 68k, 8080, 8086) don't have shared code or shared versioning.
### VF 6502-C64 3.9.5
This release adapts the X16 VolksForth to the R46 ROM.
It also adds an X16 binary with added words to invoke the
ROM-based X16Edit (XED), to list directories and files (DIR and CAT)
and to issue DOS commands and read the error channel (DOS).
For C64 and C16 this release should be a no-op.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
6502/C64/cbmfiles/v4th-x16e Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,9 +0,0 @@
#!/bin/bash
set -e
emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")"
export PATH="${HOME}/x16-r39:${PATH}"
echo "PATH = ${PATH}"
"${emulatordir}/run-in-x16emu.sh" "$@"

View File

@ -1,9 +0,0 @@
#!/bin/bash
set -e
emulatordir="$(realpath --relative-to="$PWD" "$(dirname "${BASH_SOURCE[0]}")")"
export PATH="${HOME}/x16-r41:${PATH}"
echo "PATH = ${PATH}"
"${emulatordir}/run-in-x16emu.sh" "$@"

View File

@ -0,0 +1,31 @@
\ with build log:
' noop alias \log
\ without build log:
\ ' \ alias \log
\log include logtofile.fth
include vf-tc-prep.fth
\log logopen" v4th-x16e.log"
include vf-trg-x16.fth
\ The actual volksForth sources
include vf-head-x16.fth
include vf-cbm-core.fth
include vf-sys-x16.fth
include vf-cbm-file.fth
include vf-cbm-dos.fth
include vf-x16edit.fth
include vf-finalize.fth
9f00 ' limit >body ! 9b00 s0 ! 9f00 r0 !
include vf-memsetup.fth
include vf-pr-target.fth
.( target compile complete) cr
\log logclose
quit

View File

@ -28,5 +28,5 @@ here dup origin!
$100 allot
Create logo
(C16+ ," volksFORTH-83 3.9.4-C16+ " )
(C16- ," volksFORTH-83 3.9.4-C16- " )
(C16+ ," volksFORTH-83 3.9.5-C16+ " )
(C16- ," volksFORTH-83 3.9.5-C16- " )

View File

@ -28,4 +28,4 @@ here dup origin!
$100 allot
Create logo
," volksFORTH-83 3.9.4-C64 "
," volksFORTH-83 3.9.5-C64 "

View File

@ -27,4 +27,4 @@ here dup origin!
$100 allot
Create logo
," volksFORTH-83 3.9.4-X16 "
," volksFORTH-83 3.9.5-X16 "

View File

@ -7,11 +7,10 @@ include vf-lbls-cbm.fth
0ffd2 >label ConOut
0febd >label KbdbufPeek
0289 >label IOStatus
028c >label MsgFlg
0287 >label IOStatus \ aka status
028d >label MsgFlg
09f2c >label BrdCol
0266 >label BkgCol
0284 >label PenCol
0376 >label BkgPenCol \ aka color
0381 >label CurFlg \ aka qtsw
0385 >label InsCnt \ aka insrt
@ -95,9 +94,10 @@ Label first-init
sei cld
RomBank lda $f8 # and RomBank sta \ map in KERNAL ROM
IOINIT jsr CINT jsr RESTOR jsr \ init. and set I/O-Vectors
ink-pot lda BrdCol sta \ border
ink-pot 1+ lda BkgCol sta \ backgrnd
ink-pot 2+ lda PenCol sta \ pen
ink-pot lda BrdCol sta \ border
ink-pot 1+ lda
.a asl .a asl .a asl .a asl \ backgrnd
ink-pot 2+ ora BkgPenCol sta \ pen
$0e # lda ConOut jsr \ lower/uppercase
cli rts end-code
first-init dup bootsystem 1+ !

View File

@ -0,0 +1,15 @@
$0001 | constant RomBank
create xed-banks 1 c, $ff c, \ first and last RAM bank xed uses.
| Code (xed? ( -- f )
$4c # lda $c000 cmp 0= ?[ $c003 cmp 0= ?[ $c006 cmp 0= ?[
Push0A jmp ]? ]? ]? txa Push0A jmp end-code
| Code (xed ( -- )
xed-banks ldx xed-banks 1+ ldy $c003 jsr
xyNext jmp end-code
: xed ( -- )
bl word count $4 ! $2 ! RomBank c@ $d RomBank c!
(xed? IF (xed RomBank c! ELSE RomBank c! ." no x16edit" THEN ;