fix keyboard buffer emptying handling

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-20 02:15:53 +09:30
1 parent 8a4f4928e5
commit a60f262d84
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ chrin:
sta keyboard_buffer,x
inx
iny
cpy keys_in_key_buffer
cpy key_buffer_size
bne -
dec keys_in_key_buffer
cli
+2
View File
@@ -75,6 +75,7 @@ scan_keyboard:
;; Convert matrix position to key code
;; XXX - Add offset of $40, $80 or $C0 if shift, CONTROL or C= are held down
and #$3f
tax
lda keyboard_matrixes,x
@@ -86,6 +87,7 @@ scan_keyboard:
inc keys_in_key_buffer
*
lda keys_in_key_buffer
rts