VIC-IV cursor is now complete

This commit is contained in:
FeralChild64 committed 2020-08-23 23:39:17 +02:00
1 parent 7527c7a220
commit 642958cddc
10 files changed
+108 -95

No files matched your search

+9 -4
View File
@@ -48,7 +48,7 @@ cursor_draw:
lda #1
sta BLNON
bne cursor_blink_timer_reset // branches always
bne cursor_timer_reset // branches always
// XXX code below is probably not 100% safe
@@ -66,9 +66,9 @@ cursor_hide_if_visible:
lda #$FF
sta BLNCT
// If cursor is not visible, nothing to do
// If cursor is not visible, not much to do
lda BLNON
beq cursor_blink_timer_reset
beq cursor_timer_reset
// FALLTROUGH
@@ -80,12 +80,17 @@ cursor_undraw:
lda GDCOL
sta (USER),y
// FALLTROUGH
cursor_undraw_cont: // entry point used by MEGA65 screen editor
// Mark cursor as not drawn
lda #0
sta BLNON
// FALLTROUGH
cursor_blink_timer_reset:
cursor_timer_reset:
// Rest blink counter (Mapping the 64, p39-40)
lda #20
+6 -13
View File
@@ -14,28 +14,21 @@
cursor_show_if_enabled:
lda BLNSW
bne cursor_show_end
bne !+
lda BLNON
bne cursor_show_end
bne !+
// FALLTROUGH
cursor_show:
// Set cursor as though it had just finished the off phase,
// so that the call to cursor_blink paints it
lda #$00
sta BLNCT
sta BLNON
jsr cursor_blink
// Set the cursor so that it is going to be repainted by the next IRQ
// Then set the timeout to 1 frame, so that the cursor
// blinks under key repeat conditions, like on the original KERNAL
lda #$01
sta BLNCT
// FALLTROUGH
cursor_show_end:
lda #$00
sta BLNON
!:
rts