Improved cursor handling consistency.
So far most of the time the cursor drawing was handled with a 'jsr COff - jsr COn' bracket around the drawing code. However in the area of screen erasing a different approach was used - which caused subtile issues.
4d729ec839
already fixed (most ?) of those issues for the Apple II and the ATARI. However it broke the approach 'jsr COff - jsr COn' brackets.
This is now adjusted - for all machines.
This commit is contained in:
parent
26e57930a0
commit
a4552b0e34
|
@ -554,9 +554,8 @@ LE6b cmp #$01
|
||||||
LE6d cmp #$02
|
LE6d cmp #$02
|
||||||
bne LE6e ; par undefined
|
bne LE6e ; par undefined
|
||||||
ldx CV ; line in X
|
ldx CV ; line in X
|
||||||
|
jsr COff
|
||||||
jsr ErLn ; erase line
|
jsr ErLn ; erase line
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
LE6e jmp LEend
|
LE6e jmp LEend
|
||||||
|
|
||||||
|
@ -635,6 +634,7 @@ LE9c dex ; previous line
|
||||||
; -- 2 -- del screen
|
; -- 2 -- del screen
|
||||||
LE9e cmp #$02 ; unknown?
|
LE9e cmp #$02 ; unknown?
|
||||||
bne LE9f ; then ingnore
|
bne LE9f ; then ingnore
|
||||||
|
jsr COff
|
||||||
ldx #Rows-1 ; start at ln 23
|
ldx #Rows-1 ; start at ln 23
|
||||||
LE9d txa
|
LE9d txa
|
||||||
pha ; save X
|
pha ; save X
|
||||||
|
@ -643,6 +643,7 @@ LE9d txa
|
||||||
tax ; restore X
|
tax ; restore X
|
||||||
dex ; previous line
|
dex ; previous line
|
||||||
bpl LE9d
|
bpl LE9d
|
||||||
|
jsr COn
|
||||||
LE9f jmp LEend
|
LE9f jmp LEend
|
||||||
|
|
||||||
; --- r --- set scroll region
|
; --- r --- set scroll region
|
||||||
|
@ -1474,7 +1475,7 @@ EL2 sta (xVector),y ; clear char
|
||||||
; erase screen line from crsr to end of line
|
; erase screen line from crsr to end of line
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErEnLn
|
ErEnLn jsr COff
|
||||||
; -- erase even col chars --
|
; -- erase even col chars --
|
||||||
bit $c055
|
bit $c055
|
||||||
lda CH ; get crsr col
|
lda CH ; get crsr col
|
||||||
|
@ -1496,8 +1497,6 @@ EEL3 sta (BASL),y ; clear char
|
||||||
cpy #Cols/2 ; odd pos 40?
|
cpy #Cols/2 ; odd pos 40?
|
||||||
bne EEL3 ; next char
|
bne EEL3 ; next char
|
||||||
|
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -1509,7 +1508,7 @@ EEL3 sta (BASL),y ; clear char
|
||||||
; erase screen line up to crsr
|
; erase screen line up to crsr
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErBeLn
|
ErBeLn jsr COff
|
||||||
; -- erase even col chars --
|
; -- erase even col chars --
|
||||||
bit $c055
|
bit $c055
|
||||||
lda CH ; get crsr col
|
lda CH ; get crsr col
|
||||||
|
@ -1529,8 +1528,6 @@ EBL2 sta (BASL),y ; clear char
|
||||||
EBL3 dey
|
EBL3 dey
|
||||||
bpl EBL2 ; pos>=0 -> next
|
bpl EBL2 ; pos>=0 -> next
|
||||||
|
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -564,9 +564,8 @@ LE6b cmp #$01
|
||||||
LE6d cmp #$02
|
LE6d cmp #$02
|
||||||
bne LE6e ; par undefined
|
bne LE6e ; par undefined
|
||||||
ldx ROWCRS ; line in X
|
ldx ROWCRS ; line in X
|
||||||
|
jsr COff
|
||||||
jsr ErLn ; erase line
|
jsr ErLn ; erase line
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
LE6e jmp LEend
|
LE6e jmp LEend
|
||||||
|
|
||||||
|
@ -645,6 +644,7 @@ LE9c dex ; previous line
|
||||||
; -- 2 -- del screen
|
; -- 2 -- del screen
|
||||||
LE9e cmp #$02 ; unknown?
|
LE9e cmp #$02 ; unknown?
|
||||||
bne LE9f ; then ingnore
|
bne LE9f ; then ingnore
|
||||||
|
jsr COff
|
||||||
ldx #Rows-1 ; start at ln 23
|
ldx #Rows-1 ; start at ln 23
|
||||||
LE9d txa
|
LE9d txa
|
||||||
pha ; save X
|
pha ; save X
|
||||||
|
@ -653,6 +653,7 @@ LE9d txa
|
||||||
tax ; restore X
|
tax ; restore X
|
||||||
dex ; previous line
|
dex ; previous line
|
||||||
bpl LE9d
|
bpl LE9d
|
||||||
|
jsr COn
|
||||||
LE9f jmp LEend
|
LE9f jmp LEend
|
||||||
|
|
||||||
; --- r --- set scroll region
|
; --- r --- set scroll region
|
||||||
|
@ -1424,8 +1425,10 @@ L2 jsr COn
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErLn jsr SLV ; line start in xVector
|
ErLn jsr SLV ; line start in xVector
|
||||||
ErLn_ ldy #Cols-1
|
|
||||||
lda #$00
|
; -- erase chars --
|
||||||
|
ErLn_ ldy #Cols-1 ; col 39
|
||||||
|
lda #$00 ; load space
|
||||||
EL1 sta (xVector),y ; clear char
|
EL1 sta (xVector),y ; clear char
|
||||||
dey
|
dey
|
||||||
bpl EL1
|
bpl EL1
|
||||||
|
@ -1440,16 +1443,17 @@ EL1 sta (xVector),y ; clear char
|
||||||
; erase screen line from crsr to end of line
|
; erase screen line from crsr to end of line
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErEnLn ldx ROWCRS
|
ErEnLn jsr COff
|
||||||
|
; -- erase chars --
|
||||||
|
ldx ROWCRS
|
||||||
jsr SLV
|
jsr SLV
|
||||||
ldy COLCRS
|
ldy COLCRS ; get crsr col
|
||||||
lda #$00
|
lda #$00 ; load space
|
||||||
EEL1 sta (xVector),y
|
EEL1 sta (xVector),y ; clear char
|
||||||
iny
|
iny
|
||||||
cpy #Cols
|
cpy #Cols ; pos 40?
|
||||||
bne EEL1
|
bne EEL1 ; next char
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
@ -1461,15 +1465,16 @@ EEL1 sta (xVector),y
|
||||||
; erase screen line up to crsr
|
; erase screen line up to crsr
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErBeLn ldx ROWCRS
|
ErBeLn jsr COff
|
||||||
|
; -- erase chars --
|
||||||
|
ldx ROWCRS
|
||||||
jsr SLV
|
jsr SLV
|
||||||
ldy COLCRS
|
ldy COLCRS ; get crsr col
|
||||||
lda #$00
|
lda #$00 ; load space
|
||||||
EBL1 sta (xVector),y
|
EBL1 sta (xVector),y ; clear char
|
||||||
dey
|
dey
|
||||||
bpl EBL1
|
bpl EBL1 ; pos>=0 -> next
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
jsr COn
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
|
@ -728,9 +728,9 @@ LE6b cmp #$01
|
||||||
LE6d cmp #$02
|
LE6d cmp #$02
|
||||||
bne LE6e ; par undefined
|
bne LE6e ; par undefined
|
||||||
ldx sRow ; line in X
|
ldx sRow ; line in X
|
||||||
|
jsr COff
|
||||||
jsr ErLn ; erase line
|
jsr ErLn ; erase line
|
||||||
sta sCrsrChar ; del char ..
|
jsr COn
|
||||||
; ..under crsr
|
|
||||||
LE6e jmp LEend
|
LE6e jmp LEend
|
||||||
|
|
||||||
|
|
||||||
|
@ -808,6 +808,7 @@ LE9c dex ; previous line
|
||||||
; -- 2 -- del screen
|
; -- 2 -- del screen
|
||||||
LE9e cmp #$02 ; unknown?
|
LE9e cmp #$02 ; unknown?
|
||||||
bne LE9f ; then ingnore
|
bne LE9f ; then ingnore
|
||||||
|
jsr COff
|
||||||
ldx #$18 ; start at ln 24
|
ldx #$18 ; start at ln 24
|
||||||
LE9d txa
|
LE9d txa
|
||||||
pha ; save X
|
pha ; save X
|
||||||
|
@ -816,6 +817,7 @@ LE9d txa
|
||||||
tax ; restore X
|
tax ; restore X
|
||||||
dex ; previous line
|
dex ; previous line
|
||||||
bpl LE9d
|
bpl LE9d
|
||||||
|
jsr COn
|
||||||
LE9f jmp LEend
|
LE9f jmp LEend
|
||||||
|
|
||||||
; --- r --- set scroll region
|
; --- r --- set scroll region
|
||||||
|
@ -1783,7 +1785,7 @@ EL2 sta (yVector),y ; clear char
|
||||||
; erase screen line from crsr to end of line
|
; erase screen line from crsr to end of line
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErEnLn
|
ErEnLn jsr COff
|
||||||
; -- erase chars --
|
; -- erase chars --
|
||||||
ldy sCol ; get crsr col
|
ldy sCol ; get crsr col
|
||||||
lda #$20 ; load space
|
lda #$20 ; load space
|
||||||
|
@ -1791,8 +1793,6 @@ EEL1 sta (sLinePtr),y ; clear char
|
||||||
iny
|
iny
|
||||||
cpy #$28 ; pos 40?
|
cpy #$28 ; pos 40?
|
||||||
bne EEL1 ; next char
|
bne EEL1 ; next char
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
; -- set colour --
|
; -- set colour --
|
||||||
ldy sCol ; get crsr col
|
ldy sCol ; get crsr col
|
||||||
lda #fVa ; load vanilla
|
lda #fVa ; load vanilla
|
||||||
|
@ -1801,6 +1801,7 @@ EEL2 sta (sLineColPtr),y ; set colour
|
||||||
cpy #$28 ; pos 40?
|
cpy #$28 ; pos 40?
|
||||||
bne EEL2 ; next char
|
bne EEL2 ; next char
|
||||||
|
|
||||||
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
@ -1811,15 +1812,13 @@ EEL2 sta (sLineColPtr),y ; set colour
|
||||||
; erase screen line up to crsr
|
; erase screen line up to crsr
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
||||||
ErBeLn
|
ErBeLn jsr COff
|
||||||
; -- erase chars --
|
; -- erase chars --
|
||||||
ldy sCol ; get crsr col
|
ldy sCol ; get crsr col
|
||||||
lda #$20 ; load space
|
lda #$20 ; load space
|
||||||
EBL1 sta (sLinePtr),y ; clear char
|
EBL1 sta (sLinePtr),y ; clear char
|
||||||
dey
|
dey
|
||||||
bpl EBL1 ; pos>=0 -> next
|
bpl EBL1 ; pos>=0 -> next
|
||||||
sta sCrsrChar ; del char ..
|
|
||||||
; ..under crsr
|
|
||||||
; -- set colour --
|
; -- set colour --
|
||||||
ldy sCol ; get crsr col
|
ldy sCol ; get crsr col
|
||||||
lda #fVa ; load vanilla
|
lda #fVa ; load vanilla
|
||||||
|
@ -1827,6 +1826,7 @@ EBL2 sta (sLineColPtr),y ; clear char
|
||||||
dey
|
dey
|
||||||
bpl EBL2 ; pos>=0 -> next
|
bpl EBL2 ; pos>=0 -> next
|
||||||
|
|
||||||
|
jsr COn
|
||||||
rts
|
rts
|
||||||
|
|
||||||
; -------------------------------------
|
; -------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue