diff --git a/File-formats.md b/File-formats.md index 21ffd46..6db0311 100644 --- a/File-formats.md +++ b/File-formats.md @@ -4,7 +4,7 @@ Originally I developed cc64 on a real C64, with a 1541 disk drive. The move to development on an emulator brought a number of advantages, namely faster builds and larger disks. It also came with a number of challenges around disk drive emulation, Commodore's non-ASCII character set (known as PETSCII), the -keyboard differences between PCs and C64, and the fact that ultraFORTH sources +keyboard differences between PCs and C64, and the fact that UltraForth sources aren't even files. This page describes cc64's integration via emulator into its hosting Linux. @@ -34,7 +34,7 @@ VICE offers a number of different [disk drives it can emulate](https://vice-emu.sourceforge.io/vice_2.html#SEC15), and two ways how it can emulate them. I am using the virtual drive option which is very fast, and though it only supports drive access through the -regular Kernal routines, this is fine because neither ultraFORTH nor cc64 do +regular Kernal routines, this is fine because neither UltraForth nor cc64 do anything else. I did try the true drive emulation option, but it's very slow; using it with @@ -109,7 +109,7 @@ that turns a C64 program into a tape image. ### Scripted workflows with VICE -Autostarting ultraFORTH or cc64 inside VICE got me only half the way to a +Autostarting UltraForth or cc64 inside VICE got me only half the way to a scripted build; the compile invocation still needed to be entered. Fortunately, VICE can fill the C64 keyboard buffer using the -keybuf option. Remarkably, this option can take more than 10 characters, the C64's keyboard buffer length. @@ -131,7 +131,7 @@ or 8 disk blocks, depending on the disk sector size, and just addressed by a block number. In this way you can handle source code on a bare-metal system (a common use case of Forth) without any need for a file system. The screen is usually treated as 16 lines of source, with 64 characters each. No newline. -Because the C64 display has only 40 characters per line, ultraFORTH tweaks that +Because the C64 display has only 40 characters per line, UltraForth tweaks that a bit and treats a screen as 24 lines of 41 characters and 1 line of 40. Still no newlines. diff --git a/README.md b/README.md index a9504f1..a3c1a5d 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # cc64 cc64 is a [small-C](C-lang-subset.md) compiler, -written in [Forth](Why-Forth.md), targeting the 6502 CPU and hosted on the C64. -I wrote it during my university years; -the majority of the code was written 1989-1991. +written in [Forth](Why-Forth.md), targeting the 6502 CPU. +It runs hosted on the Commodore C64 and on all C16 variants with 64k RAM, +e.g. the Plus4. -Motivated by buzzphp who's building a +I wrote cc64 during my university years; the majority of the code was written 1989-1991. Motivated by buzzphp who's building a [C library for cc64](https://sourceforge.net/projects/cc64/), and also by Johan Kotlinski of [DurexForth](https://github.com/jkotlinski/durexforth) and [AcmeForth](https://github.com/jkotlinski/acmeforth), -I am now finally open-sourcing the project. +I have finally open-sourced the project. The current version is the one in the main directory. The subdirs v03, v04 and v05 contain older versions. diff --git a/Usage.md b/Usage.md index 961a970..13f00e0 100644 --- a/Usage.md +++ b/Usage.md @@ -7,7 +7,7 @@ a C16 or C116 with a 64k RAM expansion or a Plus4. ## Download -Downloads are avaliable as zip archive, or as D64 disk image. +Downloads are avaliable as zip archive, or as d64 disk image. ### Zip archive @@ -46,10 +46,10 @@ cc64 and peddi are written in Forth and use the Forth command line as shell. The main consequence of this is that all numeric parameters to commands are entered in RPN (reversed polish notation) - _before_ the command. -A heads-up: So far I'm still using the old UltraForth which has German -messages, namely the syntax error message "Haeh?" on error which means as much -as "What?". -I will eventually switch to the newer VolksForth with English messages. +A heads-up: The German ancestry of the VolksForth means that some messages +are still in German. Namely the syntax error message says "Haeh?" which means +as much as "What?". No doubt we'll get more of VolksForth's messages +translated to English over time. The full set of commands listed below is only available in the combined compiler and editor binary `cc64pe`. The standalone compiler and editor diff --git a/Versions.md b/Versions.md index 600a0a7..3d95aec 100644 --- a/Versions.md +++ b/Versions.md @@ -1,16 +1,41 @@ # cc64 versions -## current +## v0.7 -The main directory structure contains the current version of cc64 which is -under active development and recommended for use. +v0.7 is the first properly defined version, with a git label and a github +release. -The older versions v03, v04 and v05 are living in the respective subdirs. +v0.7 brings 2 major changes: +The build bases has been updated from my custom C64 UltraForth 3.82 version to +[VolksForth](https://github.com/forth-ev/VolksForth/tree/master/6502/C64) +[3.90](https://github.com/forth-ev/VolksForth/tree/c64-390/6502/C64). +Note that UltraForth was the earlier name of VolksForth's C64/C16 versions. -## v05 +VolksForth C64/C16 3.90 has the fixes and enhancements (esp. UNLOOP) of my 3.82 +as well as my simple INCLUDE implementation for loading .fth files integrated +into the core system. It also offers a lite version without the BLOCK mechanism +for loading d64 screen sources which cc64 doesn't use anymore. -v05 was the first open-sourced version and marks the transition from +Thus, cc64 can now be built on stock VolksForth 3.90, which enabled the second +major change: porting to C16 (with 64k) and Plus4. As of v0.7, cc64 runs hosted +on C64 as well as on all C16 variants with 64k. Target runtime libraries +for both platforms are available on both hosts, enabling cross-compilation. + +## v0.6 + +v0.6 was the first version built without any dependencies on d64 screen sources +anymore (see [Fourth sources](File-formats.md#forth-sources)), and also the +first version to live in the main directory. + +v0.6 was the last not clearly defined version; it doesn't have git labels or +a github release. During its lifetime happened the development that lead to +v0.7. + +## v0.5 + +v0.5 was the first open-sourced version and the last version that lived in its +own subdirectory. v0.5 marks the transition from development on a real C64 with sources in UltraForth's screen format using direct 1541 disk block access to emulator-based development with sources in regular ASCII files. In v05 I also wrote a set of automated build scripts, @@ -25,19 +50,19 @@ switched to the v05 still contains the full sources in the UltraForth screen format on d64 disk images, which are also available in readable ASCII format. -See [Emulator and file formats](File-formats.md) for details on the different -file formats involved. +See [Emulator and file formats -> Fourth sources](File-formats.md#forth-sources) +for details on the different file formats involved. -## v03 and v04 +## v0.3 and v0.4 -v03 and v04 were the first two versions I published, without +v.03 and v0.4 were the first two versions I published, without Forth sources, as uploads to ftp://ccnga.uwaterloo.ca/pub/cbm/INCOMING/programming, on 6-Oct-1994 and 3-Nov-1995, respectively. Thanks go to Craig Bruce at this point for keeping the archive on . -I keep v03 and v04 here mainly for the record. I don't recommend doing anything +I keep v0.3 and v0.4 here mainly for the record. I don't recommend doing anything with them. diff --git a/Why-Forth.md b/Why-Forth.md index 2a7f373..63e10fb 100644 --- a/Why-Forth.md +++ b/Why-Forth.md @@ -1,7 +1,7 @@ # Why Forth? The reason for writing cc64 in Forth were the compact code that Forth -generates, and the fact that ultraFORTH was by far the most powerful +generates, and the fact that UltraForth was by far the most powerful development environment on the C64 that I could get hold of back in 1989. My first stab at writing an actual C compiler used Dirk Zabel's macro @@ -26,7 +26,7 @@ concepts of Forth, esp. the part where you need to be aware which code runs at compile time and which at run time, I grew to like the language, and became positively enthusiastic about it. I learned to make use of defining words - in another language you would call them language or compiler enhancements - in -quite a few parts of cc64. It didn't hurt, either, that ultraFORTH came with +quite a few parts of cc64. It didn't hurt, either, that UltraForth came with an assembler that I could use and integrate. And the code compactness did pay off: Two 170k disks worth of source (though not 100% full) condense down to just over 18k of compiled code, on top of the ~15-16k Forth core on top