Skip to content

Commit c3b4e9c

Browse files
committed
fix b-type crash when using keyboard code
1 parent d312cc2 commit c3b4e9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/gamemodestate/initstate.asm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,16 @@ L8824: ldx #rng_seed
299299
tay
300300
lda #EMPTY_TILE
301301
sta playfield,y
302+
.if KEYBOARD = 1
303+
; this can probably be the same whether keyboard or not.
304+
; the keyboard code adds the keyboard reading right before the oam staging reset.
305+
; the additional keyboard reading cycles causes the b type setup to crash.
306+
; Using the wait routine that skips the oam staging reset (and keyboard read) for now and
307+
; keeping separate until b-type board test is developed.
308+
jsr updateAudioAndWaitForNmi
309+
.else
302310
jsr updateAudioWaitForNmiAndResetOamStaging
311+
.endif
303312
dec generalCounter
304313
bne L87E7
305314
L884A:

0 commit comments

Comments
 (0)