Skip to content

Commit 350e56c

Browse files
committed
read 10th row instead of first
This was skipping rows 1-9 because keyboardFlag was 0, but worked anyway as expected. Doing a full read when detecting anyway.
1 parent 42610a6 commit 350e56c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/keyboard/poll.asm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
pollKeyboard:
77
lda keyboardFlag
8-
bne @init
8+
bne pollKeyboardInit
99
rts
10-
@init:
10+
pollKeyboardInit:
1111
lda #KB_INIT
1212
sta JOY1
1313

@@ -128,7 +128,7 @@ detectKeyboard:
128128
; read 10th row, expect 1E
129129
; disable keyboard, expect 00
130130
; see https://www.nesdev.org/wiki/Family_BASIC_Keyboard#Keyboard_detection_in_other_games
131-
jsr pollKeyboard
131+
jsr pollKeyboardInit
132132
ldy #KB_COL_0
133133
sty JOY1
134134
ldy #6

0 commit comments

Comments
 (0)