fix hiding and showing of cursor bugs. Issue #7

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-24 20:36:59 +09:30
1 parent b80f6ad744
commit 4bca352653
3 files changed
+8 -5

No files matched your search

+5 -4
View File
@@ -6,8 +6,8 @@
;; colour_under_cursor ;; colour_under_cursor
show_cursor_if_enabled: show_cursor_if_enabled:
bit cursor_blink_disable bit cursor_is_visible
bpl show_cursor bmi show_cursor
rts rts
show_cursor: show_cursor:
@@ -37,7 +37,7 @@ blink_cursor:
bne undraw_cursor bne undraw_cursor
draw_cursor: draw_cursor:
jsr calculate_screen_line_pointer jsr calculate_screen_line_pointer
ldy current_screen_x ldy current_screen_x
lda (current_screen_line_ptr),y lda (current_screen_line_ptr),y
sta cursor_saved_character sta cursor_saved_character
@@ -51,6 +51,7 @@ draw_cursor:
lda #1 lda #1
sta cursor_is_visible sta cursor_is_visible
jmp reset_blink_timer jmp reset_blink_timer
undraw_cursor: undraw_cursor:
@@ -79,7 +80,7 @@ disable_cursor:
;; FALL THROUGH ;; FALL THROUGH
hide_cursor_if_visible: hide_cursor_if_visible:
bit cursor_is_visible bit cursor_is_visible
bpl undraw_cursor bmi undraw_cursor
rts rts
enable_cursor: enable_cursor:
+3
View File
@@ -604,6 +604,9 @@ line_not_linked_del:
rts rts
screen_advance_to_next_line: screen_advance_to_next_line:
jsr hide_cursor_if_visible
;; Go to start of line ;; Go to start of line
lda #0 lda #0
sta current_screen_x sta current_screen_x
-1
View File
@@ -10,7 +10,6 @@ cint:
;; Initialise cursor blink flags (Compute's Mapping the 64 p215) ;; Initialise cursor blink flags (Compute's Mapping the 64 p215)
lda #$00 lda #$00
sta cursor_blink_disable sta cursor_blink_disable
sta cursor_blink_countdown
;; Set keyboard decode vector (Compute's Mapping the 64 p215) ;; Set keyboard decode vector (Compute's Mapping the 64 p215)