durexforth icon indicating copy to clipboard operation
durexforth copied to clipboard

Commodore 128 Port

Open rhalkyard opened this issue 4 years ago • 5 comments

After the discussion in #95, I reorganized the Makefile so that conditional compilation ([if]-[else]-[then]) was no longer needed.

Now, everything in forth_src/ is common to both systems, and forth_src/c64 and forth_src/c128 contain code that is specific to those machines. v and gfx now include vcore and gfxcore, which contain their platform-specific parts.

There are also a couple of new source files:

  • kernal is intended to define platform-specific constants for kernal variables and subroutines; right now this is only k-tblx, the TBLX zeropage location that indicates the current cursor line (used by more), but a lot of constants in v could be factored into it for clarity.

  • far is only for the C128, and defines 'far' versions of !, @, c! and c@ that can operate on memory in other banks. sys on the C128 also defines a sysfar word that works like sys but can call routines in other banks.

  • platform detects the type of system it is being compiled on, and defines a platform constant as either 64 or 128, depending on the system - with conditional compilation gone, there was no need for the native-c128 compile-time constant, but I thought that platform detection might still be useful to somebody.

I have added a new section to the manual describing the 128 port and 128-specific words. I wasn't quite sure where in the table of contents it should go; feel free to move it as needed.

rhalkyard avatar Dec 15 '20 22:12 rhalkyard

Thank you! How exciting! I will have a careful look in time and try to provide meaningful feedback. Looking forward!

jkotlinski avatar Dec 16 '20 20:12 jkotlinski

Take your time - I realise there's a lot of changes in there. I'm new to Forth, so please forgive any novice mistakes!

rhalkyard avatar Dec 17 '20 14:12 rhalkyard

Maybe this is a big enough change to warrant mention in README.md?

jkotlinski avatar Dec 29 '20 11:12 jkotlinski

Hows the progress on this PR? This is very interesting indeed.

xlar54 avatar Aug 13 '21 03:08 xlar54

I forgot about this PR, sorry about that.

jkotlinski avatar Aug 07 '22 22:08 jkotlinski

Since time passed, there now is a lot of conflicts. I will continue the work of merging this in #478

jkotlinski avatar Aug 28 '22 20:08 jkotlinski