Compare commits
No commits in common. "ffdc58739a531e3dee7611b8bc25daaec159c938" and "58ec54fc979f72b0a77efe356551d2c0761825cf" have entirely different histories.
ffdc58739a
...
58ec54fc97
8
blk/522
8
blk/522
@ -4,13 +4,13 @@
|
|||||||
2 *
|
2 *
|
||||||
OVER J 64 * I + + C@ 'X' = IF 1+ THEN
|
OVER J 64 * I + + C@ 'X' = IF 1+ THEN
|
||||||
LOOP 32 * C, LOOP DROP ;
|
LOOP 32 * C, LOOP DROP ;
|
||||||
: _l ( a u -- a, spit a line of u glyphs )
|
: _l ( spit a line of u glyphs )
|
||||||
( u ) 0 DO ( a )
|
( u ) 0 DO ( a )
|
||||||
DUP I 3 * + _g
|
DUP I 3 * + _g
|
||||||
LOOP ;
|
LOOP DROP ;
|
||||||
: CPFNT3x5
|
: CPFNT3x5
|
||||||
0 , 0 , 0 C, ( space char )
|
0 , 0 , 0 C, ( space char )
|
||||||
530 BLK@ BLK( 21 _l 320 + 21 _l 320 + 21 _l ( 63 )
|
530 LOAD BLK( 21 _l 192 + 21 _l 192 + 21 _l ( 63 )
|
||||||
531 BLK@ BLK( 21 _l 320 + 10 _l ( 94! )
|
531 LOAD BLK( 21 _l 192 + 10 _l ( 94! )
|
||||||
;
|
;
|
||||||
|
|
||||||
|
6
blk/555
6
blk/555
@ -1,15 +1,15 @@
|
|||||||
( Required config: TI_MEM )
|
( Required config: TI_MEM )
|
||||||
: TI_MEM+ [ TI_MEM LITN ] @ + ;
|
: TI_MEM+ [ TI_MEM LITN ] @ + ;
|
||||||
TI_MEM : TI_MEM [ LITN ] ;
|
|
||||||
: LCD_PORT_CMD 0x10 ; : LCD_PORT_DATA 0x11 ;
|
: LCD_PORT_CMD 0x10 ; : LCD_PORT_DATA 0x11 ;
|
||||||
: FNTW 3 ; : FNTH 5 ;
|
: FNTW 3 ; : FNTH 5 ;
|
||||||
( Wait until the lcd is ready to receive a command. It's a bit
|
( Wait until the lcd is ready to receive a command. It's a bit
|
||||||
weird to implement a waiting routine in asm, but the forth
|
weird to implement a waiting routine in asm, but the forth
|
||||||
version is a bit heavy and we don't want to wait longer than
|
version is a bit heavy and we don't want to wait longer than
|
||||||
we have to. )
|
we have to. )
|
||||||
CODE LCDWAIT
|
: LCDWAIT
|
||||||
BEGIN,
|
BEGIN,
|
||||||
0x10 INAn,
|
LCD_PORT_CMD INAn,
|
||||||
RLA, ( When 7th bit is clr, we can send a new cmd )
|
RLA, ( When 7th bit is clr, we can send a new cmd )
|
||||||
JRC, AGAIN,
|
JRC, AGAIN,
|
||||||
;CODE
|
;CODE
|
||||||
|
: LCD$ H@ TI_MEM ! FNTH 2 * 2+ ALLOT ;
|
||||||
|
12
blk/557
12
blk/557
@ -2,11 +2,7 @@
|
|||||||
: _data! LCD_PORT_DATA PC! LCDWAIT ;
|
: _data! LCD_PORT_DATA PC! LCDWAIT ;
|
||||||
: _data@ LCD_PORT_DATA PC@ LCDWAIT ;
|
: _data@ LCD_PORT_DATA PC@ LCDWAIT ;
|
||||||
: LCDOFF 0x02 ( CMD_DISABLE ) _cmd ;
|
: LCDOFF 0x02 ( CMD_DISABLE ) _cmd ;
|
||||||
: LCDON 0x03 ( CMD_ENABLE ) _cmd ;
|
: _col! ( col -- )
|
||||||
: _yinc 0x07 _cmd ; : _xinc 0x05 _cmd ;
|
0x20 ( CMD_COL ) + _cmd ;
|
||||||
: _col! ( col -- ) 0x20 ( CMD_COL ) + _cmd ;
|
: _row! ( row -- )
|
||||||
: _row! ( row -- ) 0x80 ( CMD_ROW ) + _cmd ;
|
0x80 ( CMD_ROW ) + _cmd ;
|
||||||
: LCD$
|
|
||||||
H@ TI_MEM ! FNTH 2 * 2+ ALLOT
|
|
||||||
LCDON 0x01 ( 8-bit mode ) _cmd
|
|
||||||
;
|
|
||||||
|
29
blk/558
29
blk/558
@ -1,13 +1,16 @@
|
|||||||
: _clrrows ( n u -- Clears u rows starting at n )
|
: _glyph> ( a -- )
|
||||||
SWAP _row!
|
LCD_CURY C@ _row! LCD_CURX C@ 8 /MOD _col! ( a coff )
|
||||||
( u ) 0 DO
|
0x05 ( XINC ) _cmd _data@ DROP SWAP
|
||||||
_yinc 0 _col!
|
FNTH 0 DO ( coff a )
|
||||||
11 0 DO 0 _data! LOOP
|
C@+ 2 PICK 8 -^ LSHIFT
|
||||||
_xinc 0 _data!
|
_data@ 8 LSHIFT OR
|
||||||
LOOP ;
|
LCD_BUF I + 2DUP FNTH + C!
|
||||||
: _clrln ( n ) FNTH 1+ _clrrows ;
|
SWAP 8 RSHIFT DUP 42 PC! SWAP C!
|
||||||
: LCDCLR 0 64 _clrrows ;
|
LOOP 2DROP
|
||||||
( Changes the current line and go back to leftmost column )
|
LCD_CURY C@ _row!
|
||||||
: _lf
|
FNTH 0 DO LCD_BUF I + C@ _data! LOOP
|
||||||
LCD_CURY C@ FNTH 1+ + DUP 63 > IF DROP 0 THEN
|
LCD_CURY C@ _row! LCD_CURX C@ 8 / 1+ _col!
|
||||||
DUP _clrln LCD_CURY C! 0 LCD_CURX C! ;
|
FNTH 0 DO LCD_BUF FNTH + I + C@ _data! LOOP
|
||||||
|
LCD_CURX C@ FNTW + 1+
|
||||||
|
DUP [ 96 FNTW - LITN ] > IF DROP 0 THEN
|
||||||
|
LCD_CURX C! ;
|
||||||
|
16
blk/559
16
blk/559
@ -1,16 +0,0 @@
|
|||||||
: _glyph> ( a -- )
|
|
||||||
LCD_CURY C@ _row! LCD_CURX C@ 8 /MOD _col! ( a coff )
|
|
||||||
_xinc _data@ DROP SWAP
|
|
||||||
FNTH 0 DO ( coff a )
|
|
||||||
C@+ 2 PICK 8 -^ LSHIFT
|
|
||||||
_data@ 8 LSHIFT OR
|
|
||||||
LCD_BUF I + 2DUP FNTH + C!
|
|
||||||
SWAP 8 RSHIFT SWAP C!
|
|
||||||
LOOP 2DROP
|
|
||||||
LCD_CURY C@ _row!
|
|
||||||
FNTH 0 DO LCD_BUF I + C@ _data! LOOP
|
|
||||||
LCD_CURY C@ _row! LCD_CURX C@ 8 / 1+ _col!
|
|
||||||
FNTH 0 DO LCD_BUF FNTH + I + C@ _data! LOOP
|
|
||||||
LCD_CURX C@ FNTW + 1+ DUP LCD_CURX C! ( x )
|
|
||||||
[ 96 FNTW - LITN ] > IF _lf THEN ;
|
|
||||||
|
|
4
blk/560
4
blk/560
@ -1,4 +0,0 @@
|
|||||||
: (emit)
|
|
||||||
DUP 0xd = IF DROP _lf EXIT THEN
|
|
||||||
DUP 0x20 0x7e =><= NOT IF DROP EXIT THEN
|
|
||||||
0x20 - FNTH * ['] ~FNT + _glyph> ;
|
|
@ -10,7 +10,6 @@ void t6a04_init(T6A04 *lcd)
|
|||||||
lcd->currow = 0;
|
lcd->currow = 0;
|
||||||
lcd->curcol = 0;
|
lcd->curcol = 0;
|
||||||
lcd->just_moved = true;
|
lcd->just_moved = true;
|
||||||
lcd->has8bitmode = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t t6a04_cmd_rd(T6A04 *lcd)
|
uint8_t t6a04_cmd_rd(T6A04 *lcd)
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
RAMSTART 0x70 + CONSTANT TI_MEM
|
RAMSTART 0x70 + CONSTANT TI_MEM
|
||||||
212 LOAD ( z80 assembler )
|
212 LOAD ( z80 assembler )
|
||||||
262 LOAD ( xcomp )
|
262 LOAD ( xcomp )
|
||||||
522 LOAD ( font compiler )
|
|
||||||
: CODE XCODE ;
|
: CODE XCODE ;
|
||||||
: IMMEDIATE XIMM ;
|
: IMMEDIATE XIMM ;
|
||||||
: (entry) (xentry) ;
|
: (entry) (xentry) ;
|
||||||
@ -14,13 +13,11 @@ CURRENT @ XCURRENT !
|
|||||||
282 LOAD ( boot.z80 )
|
282 LOAD ( boot.z80 )
|
||||||
555 LOAD ( ti.z80 )
|
555 LOAD ( ti.z80 )
|
||||||
393 LOAD ( icore )
|
393 LOAD ( icore )
|
||||||
(entry) ~FNT CPFNT3x5
|
|
||||||
(entry) _
|
(entry) _
|
||||||
( Update LATEST )
|
( Update LATEST )
|
||||||
PC ORG @ 8 + !
|
PC ORG @ 8 + !
|
||||||
422 437 XPACKR ( core )
|
422 437 XPACKR ( core )
|
||||||
556 560 XPACKR ( ti )
|
556 558 XPACKR ( ti )
|
||||||
438 446 XPACKR ( print fmt )
|
," 42 42 PC! LCD$ 43 43 PC! BYE "
|
||||||
," : _ LCD$ LIT< Hello (print) LIT< World! (print) BYE ; _ "
|
|
||||||
ORG @ 256 /MOD 2 PC! 2 PC!
|
ORG @ 256 /MOD 2 PC! 2 PC!
|
||||||
H@ 256 /MOD 2 PC! 2 PC!
|
H@ 256 /MOD 2 PC! 2 PC!
|
||||||
|
Loading…
Reference in New Issue
Block a user