A profitable day here too. I worked out a way to split up the assembler output so as to secrete bits of code into multiple nooks and crannies whilst still letting the assembler deal with resolving all the addresses (otherwise memory reorganisation would be a nightmare). Not bad for an assembler with no linker. It's applicable to many hardware configurations (so I'll be applying it to the UDG4ZXPAND version in due course (and will allow me to quickly maximise contiguous execution-friendly memory.
It's allowed me to start writing some words for the colour functionality of Chroma 81. Hurrah! They'll get tested tomorrow.
A pendulum with a 2 meter long rod has a rough period of 2.837 seconds T = 2π√(L/g)
and a frequency of .353 Hz f = 1/[2π√(L/g)]
just had to tell someone!!
Fred Sadman (Mrs)
Warning of undesirable behavior of EO related to the use of Chroma81 (I do not know if the same occurs with the real device): when attribute color mode is set the memory between 8Kb~16Kb is mirrored from 49152($C000), where the color attribute area is located.
In my case, as my forth kernel is based on 8K, writing the color attributes corrupts the kernel and the system crash . I didn't realize this before because I was working with the ZX Camel Forth located on the ROM page (0~8Kb).
ZeXtender board, Joy81 - Programmable Joystick Controller, Turbo Sound 81
My life is undeniably and indescribably richer. I shall revel in the new found knowledge.
Kelly: Thanks for that. I indeed ran into problems with EO. I'll report the problem.
$2000-$21ff UDG character definitions
$2200-$3fff Forth primitives and functions
$4009-$9fff D_FILE at $4100, Forth functions, words and lots of free RAM
$c000-$c3ff Colour character mapping (mode 0). Attribute file at $c100 (Colour mode 1).
$c400-$dfff Forth secondary (non-machine code) words, buffers, data and machine stack.
On EO I selected CHR$128 as the CHR$ generator, Chroma as the Colour, checked the ZXpand box and checked the "Allow RAM between 8-16K"
My CMODE, COLENABLE, BORDER, CLRATT, PAPER & INK words all work fine using the above.
The ChangeLog is reproduced here:
Support Chroma81. Colour words BORDER, CLRATT,
CLRCOL, COLDEF, COLENABLE, CMODE, INK & PAPER added.
UDG creation word CHRDEF added.
SETPOS added to move print cursor to column/row.
MEMFREE leaves amount of free memory on the stack.
D/ moved to core vocabulary.
Fixed boundary checks in ASCII conversion and EMIT.
ZXpand memory configuration is now always M=L.
Optimised memory usage for ZXpand and Chroma81
Implemented file loading messages during boot.
UDG protocol changed to Chr$128 (was Chr$64).
UDG4ZXPAND owners may need to set the 128 switch.
D_FILE location fixed at $4100 for Chroma 81.
Added Chroma 81 and Character Set files to Docs
Updated the fif81 glossary in the Docs directory.
Updated installation instructions.
The big fanfare is for Chroma 81 support. Also, the memory reorganisation will leave you with approximately 16 KB for the ZXpand NON-UDG version, 15KB for the UDG4ZXPAND version and 22K for the Chroma 81+ZXpand version. The vast majority is execution-friendly RAM (there is some non-execution-friendly RAM between $8000-$9fff on the Chroma 81 version).
Given that I don't have a UDG4ZXPAND board there is a possible GOTCHA I'm unable to test. Previous releases of FIF were only giving Chrs$64 support; the latest version provides Chr$128 support. I remember reading that UDG4ZXPAND boards have a switch to select 128 mode so make sure that switch is set. If there are any problems I'll provide a separate version for Chrs$64.
I've edited the first post in this thread to more clearly show that the latest release is always available there.
As for the UDG4ZXPAND I don't think the setting would make a difference as I believe it only allows access to the inverse chrs which I don't think FIF uses and not likely to crash anything plus I don't expect much use would be made of it in Forth but will check anyway.
FIF indeed doesn't use the inverse characters for normal FORTH use however they can still be EMITed. The combination of EMIT and SETPOS might be useful for some simple games or somesuch. So I thought that having the ability to redefine the inverses was potentially useful. In FIF the inverses have the range 96-159 ($60-$9f) so you can (e.g.) redefine inverse-A to a chequerboard pattern and display it using:
Code: Select all
HEX AA 55 AA 55 AA 55 AA 55 61 CHRDEF 61 EMIT
You're probably right in thinking that not much use may be made of it. It was satisfying to do though and I'm quite shameless about such things.