Zero One wrote: ↑Sat Apr 30, 2022 10:59 amThanks for the help! The write to PPUMASK to enable the screen is done elsewhere; that's why you're not seeing it in the NMI function. Is there ever a point in VBLANK I need to disable the screen?
My general recommendation is to only enable or disable the screen within vblank, in normal situations.
The reason is that it's immediate. So if you enable somewhere in the middle of a frame, you'll see half of that frame get rendered, with bad scrolling. Similarly for disabling it, you'll get half a frame of background colour, though at least the top half will still look normal.
Otherwise, no there's not normally a need to disable it during vblank as rendering is already suspended at that time. You might extend the period you can upload to the PPU with forced blanking, by intentionally keeping it off past the end of vblank and turning back on mid-frame, with very careful timing, but this is a very tricky technique.
Disabling rendering for a forced blank mid-frame (e.g. if you want to make a forced blank near the bottom of the picture and start uploading to the PPU before the NMI begins) can be done but proper timing for this is even trickier.
Finally, turning off one of sprites or background, but not both, is safe to do anywhere, as it doesn't suspend the rendering operation it just hides a layer. That's sometimes useful for e.g. hiding sprites over a status bar.