fix for possible cursor-related scren corruption
This commit is contained in:
1 parent
0b747ded64
commit
7527c7a220
3 files changed
+48
-10
No files matched your search
@@ -10,10 +10,28 @@
|
||||
// - GDCOL (colour under cursor)
|
||||
//
|
||||
|
||||
|
||||
m65_cursor_disable: // XXX utilize this!
|
||||
|
||||
// Make sure IRQ won't interfere by increasing the counter XXX reuse in legacy mode
|
||||
lda #$FF
|
||||
sta BLNCT
|
||||
|
||||
// Disable cursor blinking
|
||||
lda #$80
|
||||
sta BLNSW
|
||||
|
||||
// FALLTHROUGH
|
||||
|
||||
m65_cursor_hide_if_visible:
|
||||
|
||||
// Set countdown to high value, to prevent IRQ interference
|
||||
lda #$FF
|
||||
sta BLNCT
|
||||
|
||||
// If cursor is not visible, nothing to do
|
||||
lda BLNON
|
||||
beq m65_cursor_end
|
||||
beq m65_cursor_blink_timer_reset
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
@@ -21,8 +39,10 @@ m65_cursor_undraw:
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
lda #$80
|
||||
sta BLNSW
|
||||
|
||||
// Mark cursor as not drawn
|
||||
lda #0
|
||||
sta BLNON
|
||||
|
||||
rts
|
||||
|
||||
@@ -35,6 +55,14 @@ m65_cursor_show_if_enabled:
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_cursor_end:
|
||||
m65_cursor_blink_timer_reset: // XXX reuse code from main KERNAL
|
||||
|
||||
rts
|
||||
// Rest blink counter (Mapping the 64, p39-40)
|
||||
lda #20
|
||||
sta BLNCT
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
m65_cursor_blink_end:
|
||||
|
||||
rts
|
||||
Reference in new issue
Block a user