cc64

Post Reply
pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

cc64

Post by pzembrod »

cc64 is available for the latest X16 version again; its version 0.12 is compiled with VolksForth 3.9.5 that contains adaptions for the R46 Kernal.

cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU. It's hosted on the Commodore C64, on the C16 with 64k RAM and the Plus4, and on the new Commander X16, and runtime targets are also available for all 3 platforms, on each host, allowing cross-compilation.

The full release can be found at https://github.com/pzembrod/cc64/releases/tag/v0.12

The main GitHub repo page links to further documentation which is also contained in the attached zip file.
Attachments
cc64-x16files.zip
(40.7 KiB) Downloaded 411 times
cc64-x16files-sdcard.zip
(98.19 KiB) Downloaded 433 times
cc64-doc.zip
(27.24 KiB) Downloaded 417 times
kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

Re: cc64

Post by kelli217 »

Glad to see this one returning!
pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

Re: cc64

Post by pzembrod »

kelli217 wrote: Wed Dec 06, 2023 3:56 pm Glad to see this one returning!
Thank you!
leop
Posts: 1
Joined: Wed Aug 26, 2020 9:42 pm

Re: cc64

Post by leop »

I'm just now getting my x16 up and running, and I thought I'd start writing some code on it, and cc64 seemed like a good option to develop on the system itself.

However, I can't get the c-charset to work. It looks like v0.12 is built for x16 kernal r46, and when I type help on my system it shows r47.

Anyone else have this issue? Am I using it wrong?
After boot I type:
@CD:CC64 (the dir I made on my sdcard that contains x16files)
LOAD"C-CHARSET",8,1 (without ,8,1 it loads to $0800, and the docs say cc64 calls $0400)
LOAD"CC64"
RUN

The charset is just a garbled mess afterward, so it is doing something but only a reboot fixes the charset.

Any help or ideas greatly appreciated!

leop
pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

Re: cc64

Post by pzembrod »

Hi leop,

Philip, cc64 author here. Thanks for the bug report. It turns out it's not an R47 issue but already a proto2 hardware issue - c-charset still uses VIA1 to switch RAM and ROM banks. Seems no-one (including myself) has been using c-charset even semi-recently. I usually go with a patched ROM image for the emulator.

The fix is easy enough. Stay tuned for a release.

Edit: I'm considering addressing one more bug in the next release.
In the meantime you can download the fixed binary from head: github.com/pzembrod/cc64/blob/master/x16files/c-charset

Cheers
Philip
pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

Re: cc64

Post by pzembrod »

I have released the next version of cc64, v0.13.

The release was motivated by leop's finding that the c-charset binary wasn't working; it turned out that I had forgotten to adapt it to the new bank switching registers; that is now fixed.

The other bug, or rather weakness, that I am addressing with this release are a few dependencies on X16 Kernal variables of the underlying VolksForth which broke VolksForth and cc64 in the past when new ROM versions were released, though fortunately not by the R46->R47 upgrade. The new VolksForth version 3.9.6 now relies only on the documented Kernal API and should be much more robust when new X16 ROMs are released.

This VolksForth update ended up taking much more time than the c-charset fix, and the formal VolksForth release is still pending, as I have some Forth documentation improvements for that in the works. A visible consequence of this change is that cc64's command line now uses the regular Commodore screen editor.

As usual, please let me know of any issues you experience, and I'm also happy about any other feedback.

Cheers
/Philip
Post Reply