Actively redraw cursor.

On the C64 the cursor is flashing (driven by a timer interrupt routine). So in order to have the cursor appear all it takes is to make sure that the interrupt routine:
- understands that it should actually work on the cursor
- has a correct understanding about what char is "under" the cursor

On the Apple II on the other hand the cursor has always to be actively drawn. Therefore all the places where the C64 code just updates the char under the cursor the Apple II code needs to actually draw the cursor.

We learned this the hard way with 'nvi'. When pressing <enter> in insert mode it sends the following data:

0d 00 1b 5b 31 42 1b 5b 4b

This means to return the cursor (to col 1), do nothing, then move it down 1 row and finally remove all chars from the cursor to the end of the line. The latter is one of the instances requiring to actively redraw the cursor (when set to be visible) as it was removed (when set to be visible).
This commit is contained in:
Oliver Schmidt 2017-08-01 20:54:11 +02:00
parent deb972cd98
commit 6717fb7bc0

View File

@ -555,6 +555,7 @@ LE6d cmp #$02
jsr ErLn ; erase line
sta sCrsrChar ; del char ..
; ..under crsr
jsr COn
LE6e jmp LEend
@ -1418,6 +1419,7 @@ EEL3 sta (BASL),y ; clear char
sta sCrsrChar ; del char ..
; ..under crsr
jsr COn
rts
; -------------------------------------
@ -1450,6 +1452,7 @@ EBL3 dey
sta sCrsrChar ; del char ..
; ..under crsr
jsr COn
rts
; -------------------------------------