1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-20 07:48:46 +10:00
collapseos/arch/z80/sms/blk/607
Virgil Dupras 7001446212 Complete overhaul of recipes
Recipes contain bits and pieces of hardware-related knowledge, but
these bits feel sparse. I've been wanting to consolidate hardware-
related documentation for a while, but always fell at odds with the
recipes organisation.

We don't have recipes anymore, just a /doc/hw section that contains
hardware-related documentation which often translate to precise
instructions to run Collapse OS on a specific machine.

With this new organisation, I hope to end up with a better, more
solid documentation.
2020-10-30 20:39:39 -04:00

16 lines
524 B
Plaintext

: _cell! ( tilenum pos )
2 * 0x7800 OR _ctl ( tilenum ) _data 1 _zero ;
: _spc! 0 ( blank ) XYPOS @ _cell! ;
: _lf
_spc! XYPOS @ [ VDP_COLS LITN ] / 1+ [ VDP_ROWS LITN ] MOD
[ VDP_COLS LITN ] * XYPOS ! ;
: _bs _spc! XYPOS @ 1-
[ VDP_COLS VDP_ROWS * LITN ] MOD XYPOS ! ;
: (emit)
DUP 0x08 = IF DROP _bs EXIT THEN
DUP 0x0d = IF DROP _lf EXIT THEN
0x20 - DUP 0< IF DROP EXIT THEN
0x5e MIN ( tilenum ) XYPOS @ _cell!
XYPOS @ 1+ DUP [ VDP_COLS VDP_ROWS * LITN ]
= IF DROP 0 THEN XYPOS ! ;