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
+16

No files matched your search

+13
View File
@@ -5,6 +5,19 @@
;; cursor_is_visible ;; cursor_is_visible
;; colour_under_cursor ;; 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: blink_cursor:
;; Is the cursor enabled? ;; Is the cursor enabled?
bit cursor_blink_disable bit cursor_blink_disable
+3
View File
@@ -137,6 +137,9 @@ chrout_l1:
jmp screen_advance_to_next_line jmp screen_advance_to_next_line
no_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 ;; Restore X and Y, set carry to mark success on exit
pla pla
tay tay