Skip to content

Commit 0fde09a

Browse files
committed
more efficient flow
1 parent 328fbdc commit 0fde09a

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/util/core.asm

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ random10:
5050
bpl random10
5151
rts
5252

53+
; canon is waitForVerticalBlankingInterval
54+
updateAudioWaitForNmiAndResetOamStaging:
55+
jsr updateAudio_jmp
56+
lda #$00
57+
sta verticalBlankingInterval
58+
nop
59+
@checkForNmi:
60+
lda verticalBlankingInterval
61+
beq @checkForNmi
62+
5363
resetOAMStaging:
5464
; Hide a sprite by moving it down offscreen, by writing any values between #$EF-#$FF here.
5565
; Sprites are never displayed on the first line of the picture, and it is impossible to place
@@ -67,18 +77,6 @@ resetOAMStaging:
6777
rts
6878

6979

70-
; canon is waitForVerticalBlankingInterval
71-
updateAudioWaitForNmiAndResetOamStaging:
72-
jsr updateAudio_jmp
73-
lda #$00
74-
sta verticalBlankingInterval
75-
nop
76-
@checkForNmi:
77-
lda verticalBlankingInterval
78-
beq @checkForNmi
79-
jsr resetOAMStaging
80-
rts
81-
8280
updateAudioAndWaitForNmi:
8381
jsr updateAudio_jmp
8482
lda #$00

0 commit comments

Comments
 (0)