fix bucky key detection

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-20 02:35:39 +09:30
1 parent ce30caeb74
commit 91f2dd02fd
1 file changed
+8 -4
+8 -4
View File
@@ -98,7 +98,7 @@ scan_keyboard:
KeyInRow: KeyInRow:
ldy #7 ldy #7
* *
asl ror
bcs nokey bcs nokey
jsr KeyFound jsr KeyFound
nokey: nokey:
@@ -148,7 +148,11 @@ OverFlow:
;; // Exit Routine for: No Activity ;; // Exit Routine for: No Activity
NoActivityDetected: NoActivityDetected:
;; // Exit With A = #$01, Carry Set & Reset BufferOld. ;; So cancel all bucky keys
lda key_bucky_state
sta key_last_bucky_state
lda #$00
sta key_bucky_state
stx BufferOld stx BufferOld
stx BufferOld+1 stx BufferOld+1
@@ -254,8 +258,8 @@ skip0:
lda ScanResult+6 lda ScanResult+6
eor #$ff eor #$ff
and #%10000000 ;// Left Shift and #%10000000 ;// Left Shift
asl rol
asl rol
and #$01 and #$01
ora key_bucky_state ora key_bucky_state
sta key_bucky_state sta key_bucky_state