make cursor visible immediately after printing a character, but for only 1 frame, to match C64 KERNAL behaviour

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-20 23:43:12 +09:30
1 parent ace97a364c
commit 00591676dc
2 files changed
+17 -1

No files matched your search

+13
View File
@@ -4,6 +4,19 @@
;; cursor_saved_character
;; cursor_is_visible
;; colour_under_cursor
show_cursor:
;; Set cursor as though it had just finished the off phase,
;; so that the call to blink_cursor paints it
lda #$00
sta cursor_blink_countdown
sta cursor_is_visible
jsr blink_cursor
;; Then set the timeout to 1 frame, so that the cursor
;; blinks under key repeat conditions, like on the original KERNAL
lda #$01
sta cursor_blink_countdown
rts
blink_cursor:
;; Is the cursor enabled?
+4 -1
View File
@@ -136,7 +136,10 @@ chrout_l1:
bcc no_screen_advance_to_next_line
jmp screen_advance_to_next_line
no_screen_advance_to_next_line:
chrout_done:
chrout_done:
;; Make cursor immediately visible
jsr show_cursor
;; Restore X and Y, set carry to mark success on exit
pla
tay