1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-14 14:48:08 +11:00
collapseos/arch/z80/sms/blk/603
Virgil Dupras d1718a90c7 sms: add support for VDP's text mode
Because that mode behaves exactly like in a regular TMS9918, a new
driver for TMS9918 has been added in blkfs and SMS' VDP now uses it.

Also, fix broken 5x7 font.
2020-11-13 12:18:00 -05:00

15 lines
578 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 ;
: CELL! ( tilenum pos )
2 * 0x7800 OR _ctl ( tilenum )
0x5e MOD _data 1 _zero ;