Skip to content

Commit 55e4e44

Browse files
committed
fix bugs after testing
1 parent 7875127 commit 55e4e44

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/nmi/pollkeyboard.asm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ kbMappedStart = keyReturn
5454

5555

5656
pollKeyboard:
57-
@kbTmp1 = generalCounter
5857
@upDown = BUTTON_UP|BUTTON_DOWN
5958
@leftRight = BUTTON_LEFT|BUTTON_RIGHT
6059

@@ -88,15 +87,15 @@ pollKeyboard:
8887
asl
8988
asl
9089
beq @ret ; assume 4 simultaneously pressed keys in one row indicates no keyboard
91-
sta @kbTmp1
90+
sta generalCounter
9291

9392
ldy #3
9493
jsr @keyboardReadWait
9594
lda JOY2_APUFC
9695

9796
and #KB_MASK
9897
lsr
99-
ora @kbTmp1
98+
ora generalCounter
10099
eor #$FF
101100
sta keyboardInput,x
102101
dex
@@ -111,6 +110,7 @@ pollKeyboard:
111110
@readKeyLoop:
112111
clc
113112
ldy @mappedRows,x
113+
lda keyboardInput,y
114114
and @mappedMasks,x
115115
beq @notPressed
116116
sec
@@ -339,6 +339,7 @@ readKbScoreInput:
339339
@checkRight:
340340
cmp #kbScoreRight
341341
beq @signalCursorShift
342+
bne @normal
342343

343344
@delete:
344345
lda #$00
@@ -376,7 +377,7 @@ readKey:
376377
lsr
377378
lsr
378379
lsr
379-
and $0F
380+
and #$0F
380381
tay
381382

382383
; determine if char is shifted

0 commit comments

Comments
 (0)