File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ pause:
38
38
39
39
@pauseSetupPart2:
40
40
jsr updateAudioAndWaitForNmi
41
- lda #$FF
42
- ldx #$02
43
- ldy #$02
44
- jsr memset_page
41
+ jsr resetOAMStaging
45
42
46
43
@pauseLoop:
47
44
lda qualFlag
Original file line number Diff line number Diff line change @@ -50,6 +50,23 @@ random10:
50
50
bpl random10
51
51
rts
52
52
53
+ resetOAMStaging:
54
+ ; Hide a sprite by moving it down offscreen, by writing any values between #$EF-#$FF here.
55
+ ; Sprites are never displayed on the first line of the picture, and it is impossible to place
56
+ ; a sprite partially off the top of the screen.
57
+ ; https://www.nesdev.org/wiki/PPU_OAM
58
+ ldx #$00
59
+ lda #$FF
60
+ @hideY:
61
+ sta oamStaging,x
62
+ inx
63
+ inx
64
+ inx
65
+ inx
66
+ bne @hideY
67
+ rts
68
+
69
+
53
70
; canon is waitForVerticalBlankingInterval
54
71
updateAudioWaitForNmiAndResetOamStaging:
55
72
jsr updateAudio_jmp
@@ -59,10 +76,7 @@ updateAudioWaitForNmiAndResetOamStaging:
59
76
@checkForNmi:
60
77
lda verticalBlankingInterval
61
78
beq @checkForNmi
62
- lda #$FF
63
- ldx #$02
64
- ldy #$02
65
- jsr memset_page
79
+ jsr resetOAMStaging
66
80
rts
67
81
68
82
updateAudioAndWaitForNmi:
You can’t perform that action at this time.
0 commit comments