kbhit checks KBEDG and getc resets KBEDG

This commit is contained in:
Fabrizio Caruso
2019-10-30 09:14:17 +01:00
committed by greg-king5
parent 43f24afe29
commit 78d660da55
2 changed files with 13 additions and 7 deletions

View File

@@ -29,6 +29,8 @@ KBNPR: .byte 0
.code
_kbhit:
lda KBEDG
bne L1
lda $FCB0 ; Read the Opt buttons
and #$0c
sta KBTMP
@@ -49,6 +51,6 @@ _kbhit:
sta KBNPR ; inverted previous ones pressed
stx KBPRV
lda KBEDG
@L1: tax ; No new keys hit
L1: ldx #$00
rts