fix errors with multi-key detection, including cursor left/up in VICE. Issue #6.

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-23 09:44:03 +09:30
1 parent 07e7b31b84
commit 201f1a378f
1 file changed
+8 -6
+8 -6
View File
@@ -283,7 +283,6 @@ skip0:
lsr lsr
lsr lsr
and #$01 and #$01
sta $044f
ora key_bucky_state ora key_bucky_state
sta key_bucky_state sta key_bucky_state
@@ -326,7 +325,7 @@ no_case_toggle:
lda ScanResult+7 lda ScanResult+7
cmp #$ff cmp #$ff
beq + beq +
jsr KeyInRow jsr KeyInRow
* *
ldx #8 ldx #8
@@ -384,19 +383,22 @@ no_case_toggle:
RecordKeypress: RecordKeypress:
;; // New Key Detected ;; // New Key Detected
ldy BufferQuantity ldy BufferQuantity
cpy #MaxKeyRollover cpy #$ff
bcc TooManyNewKeys beq +
cpy #MaxKeyRollover-1
bcs TooManyNewKeys
*
iny iny
sty BufferQuantity sty BufferQuantity
sta Buffer,y sta Buffer,y
Exist: Exist:
dex dex
bpl - bpl -
;; // Anything in Buffer? ;; // Anything in Buffer?
ldy BufferQuantity ldy BufferQuantity
bmi BufferEmpty bmi BufferEmpty
;; // Yes: Then return it and tidy up the buffer ;; // Yes: Then return it and tidy up the buffer
dec BufferQuantity dec BufferQuantity
lda Buffer lda Buffer