소스 검색

sms/vdp: clear rest of line on line feed

This allows us (in the following commit), to stop unvariably
spitting 64 chars by line in LIST. This way, short lines don't use
3 rows per line (the line number uses 3 chars, which brings us to
67 chars per line).

If we don't do that, we end up with the old contents of the line
being kept at the right of the printed line.
master
Virgil Dupras 3 년 전
부모
커밋
f09950a12a
2개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. +5
    -11
      arch/z80/sms/blk/607
  2. +8
    -2
      arch/z80/sms/blk/608

+ 5
- 11
arch/z80/sms/blk/607 파일 보기

@@ -1,15 +1,9 @@
: _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-
XYPOS @ BEGIN ( pos )
0 ( blank ) SWAP TUCK _cell!
1+ DUP [ VDP_COLS LITN ] MOD NOT UNTIL
[ VDP_COLS VDP_ROWS * LITN ] MOD XYPOS ! ;
: _bs 0 ( blank ) XYPOS @ TUCK _cell! ( pos ) 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 ! ;

+ 8
- 2
arch/z80/sms/blk/608 파일 보기

@@ -1,3 +1,10 @@
: (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 ! ;
: VDP$
9 0 DO _idat I 2 * + @ _ctl LOOP _blank
( palettes )
@@ -6,5 +13,4 @@
( sprite, inverted colors ) 0x3f _data 15 _zero
0x4000 _ctl 0x5e 0 DO ~FNT I 7 * + _sfont LOOP
0 XYPOS !
( bit 6, enable display, bit 7, ?? ) 0x81c0 _ctl
;
( bit 6, enable display, bit 7, ?? ) 0x81c0 _ctl ;

불러오는 중...
취소
저장