.globl cursor_off
.globl cursorpos
+ .globl _int_disabled
+
.globl _vdpport
.globl vdpinit
push bc
push de
push hl
+ ld a,(_int_disabled)
+ push af
+ di
plotit:
ld b, #0x40 ; writing
call videopos
out (c), h ; address | 0x40
dec c
out (c), a ; character
+popret:
+ pop af
+ or a
+ ret nz
+ ei
ret
;
_scroll_down:
.endif
scroll_down:
- ret
+ ld a,(_int_disabled)
+ push af
+ di
ld b, #23
ld de, #0x3C0 ; start of bottom line
upline:
out (c), e ; our position
out (c), d
dec c
- inir ; safe on MSX2 but not MSX1? - FIXME
+down_0:
+ ini
+ jp nz, down_0
inc c
ld hl, #0x4028 ; go down one line and into write mode
add hl, de ; relative to our position
ld b, #0x28
ld hl, #scrollbuf
dec c
- otir ; video ptr is to the line below so keep going
+down_1:
+ outi ; video ptr is to the line below so keep going
+ jp nz,down_1
pop bc ; recover line counter
ld hl, #0xffd8
add hl, de ; up 40 bytes
ex de, hl ; and back into DE
djnz upline
- ret
+ jp popret
.if VDP_DIRECT
_scroll_up:
.endif
scroll_up:
+ ld a,(_int_disabled)
+ push af
+ di
ld b, #23
ld de, #40 ; start of second line
downline: push bc
out (c), e
out (c), d
dec c
- inir ; MSX1 fixme ?
+up_0:
+ ini
+ jp nz, up_0
inc c
ld hl, #0x3FD8 ; up 40 bytes in the low 12 bits, add 0x40
; for write ( we will carry one into the top
dec c
ld hl, #scrollbuf
ld b, #0x40
- otir ; FIXME: is otir ok for MSX 1 ???
+up_1:
+ outi
+ jp nz,up_1
pop bc
ld hl, #40
add hl, de
ex de, hl
djnz downline
- ret
+ jp popret
.if VDP_DIRECT
_clear_lines:
pop de ; E = line, D = count
push de
push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld c, d
ld d, #0
ld b, #0x40
djnz l1
dec e
jr nz, l2
- ret
+ jp popret
.if VDP_DIRECT
_clear_across:
push bc
push de
push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld b, #0x40
call videopos
ld a, c
dec c
l3: out (c), a
djnz l1
- ret
+ jp popret
;
; FIXME: should use attribute blink flag not a char
pop de
push de
push hl
+ ld a,(_int_disabled)
+ push af
+ di
ld (cursorpos), de
ld b, #0x00 ; reading
call videopos
_cursor_off:
.endif
cursor_off:
+ ld a,(_int_disabled)
+ push af
+ di
ld de, (cursorpos)
ld a, (cursorpeek)
ld c, a
- call plotit
+ jp plotit
+
_vtattr_notify:
ret