From b863a5b11fa21ad07055ff550561bdfb011dc7b7 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Fri, 1 Dec 2023 23:42:20 +0100 Subject: [PATCH 01/12] add names of IOStatus and BkgPenCol in x16rom as comments --- 6502/C64/src/vf-sys-x16.fth | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6502/C64/src/vf-sys-x16.fth b/6502/C64/src/vf-sys-x16.fth index 1ec73e1..802617b 100644 --- a/6502/C64/src/vf-sys-x16.fth +++ b/6502/C64/src/vf-sys-x16.fth @@ -7,10 +7,10 @@ include vf-lbls-cbm.fth 0ffd2 >label ConOut 0febd >label KbdbufPeek - 0287 >label IOStatus + 0287 >label IOStatus \ aka status 028d >label MsgFlg 09f2c >label BrdCol - 0376 >label BkgPenCol + 0376 >label BkgPenCol \ aka color 0381 >label CurFlg \ aka qtsw 0385 >label InsCnt \ aka insrt From d51c2cfc0599544c2c1e0f0b39f7927bbea2713c Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 09:55:17 +0100 Subject: [PATCH 02/12] Add v4th-x16e target with x16edit invocation --- 6502/C64/Makefile | 16 +++++++++++++++- 6502/C64/src/v4th-x16e.fth | 30 ++++++++++++++++++++++++++++++ 6502/C64/src/vf-x16edit.fth | 16 ++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 6502/C64/src/v4th-x16e.fth create mode 100644 6502/C64/src/vf-x16edit.fth diff --git a/6502/C64/Makefile b/6502/C64/Makefile index a795e13..c7ef736 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -9,7 +9,7 @@ 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)) test_files = $(wildcard tests/*.f*) @@ -88,6 +88,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,6 +141,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-x16e.log: cbmfiles/v4th-x16e emulator/sdcard.img + rm -f cbmfiles/test.log + 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.log: $(test_files_petscii) emulator/run-in-vice.sh test-v4th-x16-39.log: cbmfiles/v4th-x16 emulator/sdcard.img @@ -201,6 +211,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. diff --git a/6502/C64/src/v4th-x16e.fth b/6502/C64/src/v4th-x16e.fth new file mode 100644 index 0000000..8843694 --- /dev/null +++ b/6502/C64/src/v4th-x16e.fth @@ -0,0 +1,30 @@ + +\ 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-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 diff --git a/6502/C64/src/vf-x16edit.fth b/6502/C64/src/vf-x16edit.fth new file mode 100644 index 0000000..fe198cc --- /dev/null +++ b/6502/C64/src/vf-x16edit.fth @@ -0,0 +1,16 @@ + +$0001 | constant RomBank + +| Code (xed? ( -- n ) + $c000 lda pha $c003 lda Push jmp end-code + +| Code (xed ( -- ) + 2 # ldx $ff # ldy + $4 lda 0= ?[ $c000 jsr ][ $c003 jsr ]? + xyNext jmp end-code + + : xed ( -- ) + bl word count $4 c! $2 ! + RomBank c@ $d RomBank c! + (xed? $4c4c = IF (xed RomBank c! + ELSE RomBank c! ." no x16edit" THEN ; From 5d275dea351bcef6d23d277044e0d4ddda600231 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 09:58:55 +0100 Subject: [PATCH 03/12] Add v4th-x16e binary --- 6502/C64/cbmfiles/v4th-x16e | Bin 0 -> 13940 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 6502/C64/cbmfiles/v4th-x16e diff --git a/6502/C64/cbmfiles/v4th-x16e b/6502/C64/cbmfiles/v4th-x16e new file mode 100644 index 0000000000000000000000000000000000000000..992ab2ad47ac593a61bf60725254543b809cbbd7 GIT binary patch literal 13940 zcmd^mi(i{%mjB5Wau0+{LIVvDAV3HZD7R85r5MnZQfPWns;vt4GR|tkMJ+mmH3f0) zma(-ubr9-gMs%uWI_~H?t_?{jX(@?GXlqAnozZF?r-SRPPMuxYbKVyeXZH{IeLlbT zQ+S{AoacTn-*cX)oM>6J7={eyf|BBFz(1c^Hxz$n9VoU6kLq4D!BPDCyrT+03}2NT zU-4P)Ypb-x_W#KrC9ab{6*wLECQY+xz4exsi9jeanO9b%D>9XvR^(kQEYaznoSz?S zb?!MnKkwYFcD3%}I$KZhelS0Ob=!#>v7i%)eAC{%NXYH+{gY_a<=ipa>b!Gwm-DVs zuJdl|W>CQnQB=t137q$ZzDe8Z+`ZGe$F)1io!B$6+iKCP;4u+@IuHnMhB$aZBn*W7 z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@jP(R z#mWAglcRfVUe`OX8<;;HEPvAY{PB0n#rQ`SDu1$zH!4S!+OmBR{!&f~PJOMdKzonJ zXRY|bf6Wg7FPkX;fQ=q<$Bl0;cOxiuRcnIukr)d1@Q6(UqBfmMxA*UA&Z^kE-`b!&`Bi*YZiZ(fEb4_z2rU)u@)`rG9 zUEP-2y1KP3x^*>MbbB>_&+9g8lT~$FHa6GjYU^v7TXYSU#`Tz)>Bf_Nqr#-1v!+gI z8%8Ul1JilTP8`ktH+=ayx^i*m6gj+BQ78RXnYnyU%QvY19M zt3=8`q#0Fcgc=%at+uswx|^EUuhXru-qLH_tUbQ+*2?oM`!ymZ^+9dzl_C>9?D4TT z8DGk}%@hRFtLHP7$Kh1{ao#C}2Inh}afjz!{Gd<=r>vh;>X7;z3jZsWyo){z_35Pn z-Ffh@sPVPm^wFMM8E zYw+MLJbhQJsx_1pQ}%R3O=6j56nnCD>l#{GP!294@}@*ojnb37FXo1rBD@Q@6?@^P zRd*Q*ORTH*!o#c9c(U2P`c_3Vm=XV%5fOUeC#yv6aM*Va-F1jk?z^g5GJDYY3n Date: Sat, 2 Dec 2023 20:56:48 +0100 Subject: [PATCH 04/12] Add dos commands to v4th-x16e --- 6502/C64/src/v4th-x16e.fth | 1 + 1 file changed, 1 insertion(+) diff --git a/6502/C64/src/v4th-x16e.fth b/6502/C64/src/v4th-x16e.fth index 8843694..907f686 100644 --- a/6502/C64/src/v4th-x16e.fth +++ b/6502/C64/src/v4th-x16e.fth @@ -18,6 +18,7 @@ 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 ! From 9eb5c5958a310b13313b73125b806d4a0b73bc41 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 21:15:20 +0100 Subject: [PATCH 05/12] Adapt xed to newest version of x16edit --- 6502/C64/src/vf-x16edit.fth | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/6502/C64/src/vf-x16edit.fth b/6502/C64/src/vf-x16edit.fth index fe198cc..987d90a 100644 --- a/6502/C64/src/vf-x16edit.fth +++ b/6502/C64/src/vf-x16edit.fth @@ -1,16 +1,15 @@ $0001 | constant RomBank +create xed-banks 1 c, $ff c, \ first and last RAM bank xed uses. -| Code (xed? ( -- n ) - $c000 lda pha $c003 lda Push jmp end-code +| Code (xed? ( -- f ) + $4c # lda $c000 cmp 0= ?[ $c003 cmp 0= ?[ $c006 cmp 0= ?[ + Push0A jmp ]? ]? ]? txa Push0A jmp end-code | Code (xed ( -- ) - 2 # ldx $ff # ldy - $4 lda 0= ?[ $c000 jsr ][ $c003 jsr ]? + xed-banks ldx xed-banks 1+ ldy $c003 jsr xyNext jmp end-code : xed ( -- ) - bl word count $4 c! $2 ! - RomBank c@ $d RomBank c! - (xed? $4c4c = IF (xed RomBank c! - ELSE RomBank c! ." no x16edit" THEN ; + bl word count $4 ! $2 ! RomBank c@ $d RomBank c! + (xed? IF (xed RomBank c! ELSE RomBank c! ." no x16edit" THEN ; From aec38a5b2986257f4af77dbc7b160b43cdab0e49 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 21:17:54 +0100 Subject: [PATCH 06/12] Update v4th-x16e binary --- 6502/C64/cbmfiles/v4th-x16e | Bin 13940 -> 14177 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/6502/C64/cbmfiles/v4th-x16e b/6502/C64/cbmfiles/v4th-x16e index 992ab2ad47ac593a61bf60725254543b809cbbd7..98dcaeb0dddfbeb7259edce8fade04202c8eb0e7 100644 GIT binary patch delta 678 zcmXw#O=uHA6vtn(X=sy;32Z4IHd@M9Qj&;`%_rGeG=@be+G?#HS`dVSA|CWmp{qep z(u)QcPbE-PL|S_=;=xmrCZ)xEEZJ?l3Kl$w;z2wV5fSSfgABv`e{bIVzc;gc_2ab% zhrAbM02lm-y@-AdE>banY$reFDIT;9`0e*;F>~N}h@WxiVGVhs zt&n=U=v_{TJ|ZSJ;tYC{(Pk!bLLN}D6s<6AK3f5ky zu9{%BTWH%d6mln&6&LrjOabcYoapmDN<^^3Y(y0tFwfW1(7E8x(z|mFXG!NqW4-gZb!p|Lv|N<>xzgyuNFJU@9G3ncS@b!wyy&xM`GRD+MW3f2 zeRIE(3IY#JiD?yI#7@!gI(54L!f-5m;^f4Pdk%J_OkmYg2-AZ!6Nrr{LlKv-D|D3xgJg&WdRj#)1IYH#Zr83Pqs)V_)G49fS^e$zmG4)rH$-#|G9 zsJ~NNQzO?={bnX6I!+)sW!tt!uAma+E~92Ln-BX`@XL;7%`!D|9hASN_ug delta 427 zcmaEu_a$e7Du1yZ0|OVsH?y^-ue7(?%1m^;H!*;Bvpl1cEYo7!&CYU7V)av07#U94 ztYtXhv6lIOkEO^pn?+0u{x4;@z^1@(z~{M*0#J00$wY>AHq1AU9&uM`)Nz$rC?O-j z@{U_ZfXS8Th|LusgZGHdJMI%UjsiYD&4TlUc^IzPfJAD9g&9D!j4YR*ze0qenX8Lu zNE&xF!y6lCjl(zGRnl0294p(&re>z~Znnu9hGsst)eN<^PKPytl0dn3TaIJrFI_pI zYher$s9~67%X#qf<)dd0ojH0*Q;mTk(=J%8hJk^B^}^N5Ck{?g(GjU(*lEiK;u!$B zWvtzw{^a{w7yL>ea26imxj^4O3MI{_4 oWoO5B<0gbV$E1eA+m7wR`3qOBpP!=g59p03J7yqvipp{>048Ig^#A|> From 150508feb87a3568fd52d575802312599081fa90 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 23:23:23 +0100 Subject: [PATCH 07/12] Keep timestamp of sources when converting them to CBM formats so that make doesn't always rebuild everything. --- 6502/C64/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/6502/C64/Makefile b/6502/C64/Makefile index c7ef736..724e2ee 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -62,10 +62,8 @@ 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 @@ -228,18 +226,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. From 220f5c9253befc9315982fefab59bbf7dc1cf196 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sat, 2 Dec 2023 23:33:57 +0100 Subject: [PATCH 08/12] Remove obsolete x16 r39 and r41 targets --- 6502/C64/Makefile | 24 ------------------------ 6502/C64/emulator/run-in-x16-39.sh | 9 --------- 6502/C64/emulator/run-in-x16-41.sh | 9 --------- 3 files changed, 42 deletions(-) delete mode 100755 6502/C64/emulator/run-in-x16-39.sh delete mode 100755 6502/C64/emulator/run-in-x16-41.sh diff --git a/6502/C64/Makefile b/6502/C64/Makefile index 724e2ee..0c454fe 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -146,30 +146,6 @@ test-v4th-x16e.log: cbmfiles/v4th-x16e 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 - rm -f cbmfiles/test.log - emulator/run-in-x16-39.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-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 $@) diff --git a/6502/C64/emulator/run-in-x16-39.sh b/6502/C64/emulator/run-in-x16-39.sh deleted file mode 100755 index 6713240..0000000 --- a/6502/C64/emulator/run-in-x16-39.sh +++ /dev/null @@ -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" "$@" diff --git a/6502/C64/emulator/run-in-x16-41.sh b/6502/C64/emulator/run-in-x16-41.sh deleted file mode 100755 index 89487d4..0000000 --- a/6502/C64/emulator/run-in-x16-41.sh +++ /dev/null @@ -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" "$@" From 98dec1d22489beeb234406e4d2c55a95d8a72424 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 3 Dec 2023 13:35:58 +0100 Subject: [PATCH 09/12] Add 6502/C64/RELEASE_NOTES.md --- 6502/C64/RELEASE_NOTES.md | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 6502/C64/RELEASE_NOTES.md diff --git a/6502/C64/RELEASE_NOTES.md b/6502/C64/RELEASE_NOTES.md new file mode 100644 index 0000000..43aa995 --- /dev/null +++ b/6502/C64/RELEASE_NOTES.md @@ -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. From 2378e4cc174872b35cdaabb1ecbf3c041c3ff4b9 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 3 Dec 2023 13:38:43 +0100 Subject: [PATCH 10/12] Add release rule to Makefile --- 6502/C64/Makefile | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/6502/C64/Makefile b/6502/C64/Makefile index 0c454fe..42b230b 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -12,11 +12,17 @@ vf_flavours = \ 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,6 +63,29 @@ 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 \ From 480192093a1502f1183d65595c7a283861eda8bc Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 3 Dec 2023 13:39:48 +0100 Subject: [PATCH 11/12] Update copyright years in 6502/C64/COPYING to 1985-2023 --- 6502/C64/COPYING | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/6502/C64/COPYING b/6502/C64/COPYING index 7949c26..9b2d58b 100644 --- a/6502/C64/COPYING +++ b/6502/C64/COPYING @@ -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 From 1a336935eb3ebfa306f895ea080a6f747e8713f2 Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Sun, 3 Dec 2023 13:48:39 +0100 Subject: [PATCH 12/12] RELEASE_NOTES.md formatting tweak --- 6502/C64/RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/6502/C64/RELEASE_NOTES.md b/6502/C64/RELEASE_NOTES.md index 43aa995..1361cb0 100644 --- a/6502/C64/RELEASE_NOTES.md +++ b/6502/C64/RELEASE_NOTES.md @@ -4,7 +4,7 @@ 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 +The latest release zip file `volksforth-6502-c64-release.zip` contains * `binaries/` - the compiled VolksForth binaries, namely: * `v4th-c64` - minimal C64 kernel