mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 18:28:08 +11:00
7001446212
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.
13 lines
491 B
Plaintext
13 lines
491 B
Plaintext
: _zero ( x -- send 0 _data x times )
|
|
( x ) 0 DO 0 _data LOOP ;
|
|
|
|
( Each row in ~FNT is a row of the glyph and there is 7 of
|
|
them. We insert a blank one at the end of those 7. For each
|
|
row we set, we need to send 3 zero-bytes because each pixel in
|
|
the tile is actually 4 bits because it can select among 16
|
|
palettes. We use only 2 of them, which is why those bytes
|
|
always stay zero. )
|
|
: _sfont ( a -- Send font to VDP )
|
|
7 0 DO C@+ _data 3 _zero LOOP DROP
|
|
( blank row ) 4 _zero ;
|