reordered and size-optimized some screen routines
This commit is contained in:
1 parent
e6e921e740
commit
a442bf910f
12 files changed
+183
-151
No files matched your search
@@ -0,0 +1,34 @@
|
||||
|
||||
//
|
||||
// Variables used:
|
||||
// - BLNSW (cursor blink switch)
|
||||
// - BLNON (if cursor is visible)
|
||||
// - BLNCT (cursor blink countdown)
|
||||
//
|
||||
|
||||
cursor_show_if_enabled:
|
||||
lda BLNSW
|
||||
bne cursor_show_end
|
||||
lda BLNON
|
||||
bne cursor_show_end
|
||||
|
||||
// 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
|
||||
|
||||
// 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:
|
||||
rts
|
||||
Reference in new issue
Block a user