fix pressing of same key masking problem. Issue #4.

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-24 08:16:18 +09:30
1 parent ca382f4dc7
commit dc8090478d
1 file changed
+11 -4
+11 -4
View File
@@ -179,9 +179,13 @@ ReturnNoKeys:
sta BufferQuantity sta BufferQuantity
lda #$FF lda #$FF
sta last_key_matrix_position sta last_key_matrix_position
sta Buffer+0 ldx #MaxKeyRollover-1
sta Buffer+1 *
sta Buffer+2 sta Buffer,x
sta BufferOld,x
dex
bpl -
rts rts
@@ -189,6 +193,7 @@ ReturnNoKeys:
;; // Exit Routine for: No Activity ;; // Exit Routine for: No Activity
NoActivityDetected: NoActivityDetected:
;; So cancel all bucky keys ;; So cancel all bucky keys
lda key_bucky_state lda key_bucky_state
sta key_last_bucky_state sta key_last_bucky_state
@@ -217,7 +222,8 @@ Main:
sty $dc00 ;// Connect all Keyboard Rows sty $dc00 ;// Connect all Keyboard Rows
cpx $dc01 cpx $dc01
beq NoActivityDetected bne skip0
jmp NoActivityDetected
skip0: skip0:
@@ -442,6 +448,7 @@ KeyHeld:
cmp last_key_matrix_position cmp last_key_matrix_position
beq SameKeyHeld beq SameKeyHeld
;; Different key held ;; Different key held
sta last_key_matrix_position sta last_key_matrix_position
pha pha