added keyboared matrix selection, does not work properly yet

This commit is contained in:
FeralChild64 committed 2020-12-02 18:43:09 +01:00
1 parent 0ea10b24a1
commit 10757046c7
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -160,7 +160,7 @@ m65_scnkey_got_key: ; .Y should now contain the key offset in matrix pointed by
beq m65_scnkey_try_repeat ; branch if the same key as previously
sty LSTX
; Reset key repeat counters XXX turn values into constants
; Reset key repeat counters
lda #CONFIG_KEY_DELAY
sta DELAY
@@ -10,13 +10,8 @@
m65_scnkey_set_keytab:
; Set initial KEYTAB value
lda #<kb_matrix
sta KEYTAB+0
lda #>kb_matrix
sta KEYTAB+1
; Calculate table index
lda SHFLAG
asl ; multiply by 2 - keyboard matrix lookup table consists of words
and #$2E ; we are interested in SHIFT, VENDOR, CTRL and CAPS LOCK keys only
@@ -28,8 +23,13 @@ m65_scnkey_set_keytab:
ora #$10
tax
@1:
; Set KEYTAB
; XXX finish the implementation
ldx kb_matrix_lookup+0, x
sta KEYTAB+0
ldx kb_matrix_lookup+1, x
sta KEYTAB+1
; Fall back to original routine
jmp scnkey_toggle_if_needed