Improve impl's word execution documentation
Add an example, which I think helps a lot to grasp the idea.
Also, improve comments in Z80 boot code.
Fix broken tools makefile
Rename (print) to STYPE
This brings us a bit closer to TYPE from Forth 2012. I don't think
I'll add TYPE (sig "addr len") anytime soon because there is few
use cases for it, but having "STYPE" instead of "(print)" feels
Improve initialization sequence documentation
Rename switch to ialias
The switch name was confusing.
sms: generate TMR SEGA signature in Collapse OS itself
Having the signature generation code in /tools prevents self-hosting
on the SMS.
sms: implement (spix) in z80 asm
Doing SPI bit-banging through a controller port is already really
slow, but doing so with the Forth version of (spix) was really,
With this pure z80 version of (spix), it's more bearable.
VE: try to use CELL! more
At-XY+EMIT is slow compared to direct CELL! usage. It is seen very
clearly on a SMS when VE is doing its initial clrscr (yes, I could
manage to load VE from a SD card and run it on a real SMS!).
The grid protocol wasn't there when I wrote VE initially. I only had
AT-XY. Now that we have a solid protocol to build on, let's do it.
cvm: fix NEWLN behavior
I hadn't noticed yet, but making CVM use the Grid subsystem made
me lose scrolling. It's fine because that scrolling was "artificial"
in the sense that it was provided by curses, not Collapse OS and I
prefer having something that closer emulates a real machine.
However, CVM didn't properly clear the new line when entering it.
Scrolling behavior will come back when it's implemented in the Grid
grid: fix PSP leak on newline
sms: fix cursor mis-display in text mode
In CURSOR!, I was using a write commande to read from VRAM and the
emulator didn't properly behave and did as if everything was fine.
The result on a real SMS was that the cursor would contain the
inverted glyph of the contents of the *old* cursor position.
sms: add cursor indicator to text mode
I do this by adding an inverted version of all glyphs in the upper
range of the pattern memory. This is a big waste of the pattern
space (only one inverted character is needed at once), but it's the
simplest way to proceed. I'll change this if I ever need more
Also, remove _blank. It was wastefully blanking the whole memory.
Only the name table needs to be blanked on initialization.
sms: add cursor visual indicator in VDP mode 4
This required the change of CURSOR! signature: we now supply it
with both old and new cursor positions.
Also, fix broken _bs in Grid subsystem.
sms: use CELL! directly in Pad driver
grid: change the meaning of CELL!
Replace the "g" arg (glyph) with "c" (character). The reason why "g"
was used was to save a "0x20 -" operation at all CELL! implementations,
but this came with too big a drawback: it made CELL! hardly usable
outside of the Grid subsystem, mostly because the user of CELL! would
often have to do "0x20 -".
For example, I want the SMS's Pad driver to use CELL! directly instead
of having to do EMIT+XYPOS-messing-around. I would have had to do a
"0x20 -" there.
grid: Add CURSOR! to the grid protocol
With the move of CVM's forth to the grid protocol, we've lost the
cursor's visual indication. Now, we have it back.
The challenge now is in implementing it in SMS' text mode. In mode
4, it's easy to mark a cell as inverted, but in text mode, that's
grid: add XYMODE
In VE on the SMS, the first contents line would always be cleared
because of NEWLN being called when the FBUF would spit its last
I've added a "graphical" mode to the grid subsystem to inhibit this
behavior in a graphical situation such as in VE.
Also, write a more complete Grid documentation.
Fix mis-documentation in 8086 boot code comments
cvm: use Grid in /cvm/forth
Also, fixed broken AT-XY in Grid...