Skip to content

Commit

Permalink
Merge pull request #4 from groessler/something_to_pull
Browse files Browse the repository at this point in the history
c64: fix latency
  • Loading branch information
oliverschmidt authored Oct 1, 2017
2 parents 03b2579 + 83ce9c8 commit d95d403
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/c64input.s
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,18 @@ get_key:
@loop:
jsr get_key_if_available
bcc @loop
@wait_no_cursor:
sei
ldy $cf ; cursor currently displayed?
beq @done ; no
ldy #1 ; yes, wait longer
sty $cd ; set cursor "countdown" counter to low value, fixes typing latency
cli
bne @wait_no_cursor ; jump always
@done:
ldy #1
sty $cc ; cursor off
cli
rts

; use C64 Kernel ROM function to read a key
Expand Down

0 comments on commit d95d403

Please sign in to comment.