improved key repeat handling
This commit is contained in:
1 parent
c571e0babb
commit
0ea10b24a1
3 files changed
+20
-28
No files matched your search
@@ -389,6 +389,8 @@
|
|||||||
!ifdef CONFIG_JOY1_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
!ifdef CONFIG_JOY1_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||||
!ifdef CONFIG_JOY2_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
!ifdef CONFIG_JOY2_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||||
|
|
||||||
|
!ifdef CONFIG_RS232_UP9600 { !set CONFIG_KEY_DELAY = $18 } else { !set CONFIG_KEY_DELAY = $16 }
|
||||||
|
|
||||||
|
|
||||||
; Handle debug configuration
|
; Handle debug configuration
|
||||||
|
|
||||||
|
|||||||
@@ -298,11 +298,7 @@ scnkey_got_key: ; .Y should now contain the key offset in matrix pointed by KEYT
|
|||||||
;
|
;
|
||||||
; Besides - since I am the one who writes the code, I will make the values exactly how I like them :D
|
; Besides - since I am the one who writes the code, I will make the values exactly how I like them :D
|
||||||
|
|
||||||
!ifndef CONFIG_RS232_UP9600 {
|
lda #CONFIG_KEY_DELAY
|
||||||
lda #$16
|
|
||||||
} else {
|
|
||||||
lda #$18
|
|
||||||
}
|
|
||||||
sta DELAY
|
sta DELAY
|
||||||
|
|
||||||
; FALLTROUGH
|
; FALLTROUGH
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ m65_scnkey_keytab_set_done:
|
|||||||
jsr m65_scnkey_init_pressed
|
jsr m65_scnkey_init_pressed
|
||||||
|
|
||||||
lda M65_KB_COLSUM
|
lda M65_KB_COLSUM
|
||||||
+beq m65_scnkey_no_keys ; branch if no key was pressed XXX try joystick
|
beq m65_scnkey_no_keys ; branch if no key was pressed XXX try joystick
|
||||||
|
|
||||||
ldx #$08
|
ldx #$08
|
||||||
|
|
||||||
@@ -162,11 +162,7 @@ m65_scnkey_got_key: ; .Y should now contain the key offset in matrix pointed by
|
|||||||
|
|
||||||
; Reset key repeat counters XXX turn values into constants
|
; Reset key repeat counters XXX turn values into constants
|
||||||
|
|
||||||
!ifndef CONFIG_RS232_UP9600 {
|
lda #CONFIG_KEY_DELAY
|
||||||
lda #$16
|
|
||||||
} else {
|
|
||||||
lda #$18
|
|
||||||
}
|
|
||||||
sta DELAY
|
sta DELAY
|
||||||
|
|
||||||
; FALLTROUGH
|
; FALLTROUGH
|
||||||
@@ -209,6 +205,21 @@ m65_scnkey_done:
|
|||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
m65_scnkey_jam:
|
||||||
|
|
||||||
|
pla
|
||||||
|
jsr m65_scnkey_init_pressed
|
||||||
|
|
||||||
|
; FALLTROUGH
|
||||||
|
|
||||||
|
m65_scnkey_no_keys:
|
||||||
|
|
||||||
|
; Mark no key press
|
||||||
|
|
||||||
|
lda #$48
|
||||||
|
sta LSTX
|
||||||
|
rts
|
||||||
|
|
||||||
m65_scnkey_try_repeat:
|
m65_scnkey_try_repeat:
|
||||||
|
|
||||||
!ifndef CONFIG_KEY_REPEAT_ALWAYS {
|
!ifndef CONFIG_KEY_REPEAT_ALWAYS {
|
||||||
@@ -248,20 +259,3 @@ m65_scnkey_handle_repeat:
|
|||||||
dec KOUNT
|
dec KOUNT
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
m65_scnkey_jam:
|
|
||||||
|
|
||||||
pla
|
|
||||||
|
|
||||||
; XXX
|
|
||||||
|
|
||||||
jmp m65_scnkey_init_pressed
|
|
||||||
|
|
||||||
m65_scnkey_no_keys:
|
|
||||||
|
|
||||||
; XXX
|
|
||||||
|
|
||||||
rts
|
|
||||||
Reference in new issue
Block a user