I'm trying to get a better idea of how PAL consoles behave when it comes to sprite evaluation and $2004 reads/writes.
In this old post, jsr said the oam_test on their PAL NES returned bad values from the middle of line 3, to the start of line 8.
As far as I can tell, this implies that, when rendering is disabled on a PAL NES, sprite evaluation is only active from around scanline 264 to the end of vblank (scanline 310). Implementing this in Mesen gives roughly the same result as jsr described:
oam_read_001.png [ 1.66 KiB | Viewed 11246 times ]
So it seems like when vblank ends, sprite evaluation also stops if rendering is disabled - is this correct?
Quotes from a few pages on the wiki:
But if that's the case, it would contradict jsr's results for their PAL console. If sprite evaluation can't be disabled, the $2004 reads should give invalid results until the last line of the test.
Could someone confirm the output of blargg's oam_read test on a PAL console?
Also relevant is this video of a PAL NES running the "Quantum Disco Brothers" demo with a powerpak. This means the demo works correctly on a PAL console. This demo performs a sprite DMA during vblank which ends around scanline 264, cycle ~60. If I turn on sprite evaluation on scanline 263, the demo breaks (artifacts appear on the screen, or the scrolling stops). Turning on sprite evaluation at the start of scanline 264 makes it work (which means the last writes of sprite DMA may or may not be important in this case - so can't use this as a precise measurement).
So far, what I'm understanding from all this is that:
-It looks like PAL sprite evaluation can be turned off during scanlines 0-239 if rendering is disabled (how does that make sense vs OAM decay, since apparently PAL OAM ram can't decay, even with rendering disabled?)
-Sprite evaluation/oam refresh begins around the start of scanline 264 during vblank.
In this old post, jsr said the oam_test on their PAL NES returned bad values from the middle of line 3, to the start of line 8.
As far as I can tell, this implies that, when rendering is disabled on a PAL NES, sprite evaluation is only active from around scanline 264 to the end of vblank (scanline 310). Implementing this in Mesen gives roughly the same result as jsr described:
Attachment:
oam_read_001.png [ 1.66 KiB | Viewed 11246 times ]
So it seems like when vblank ends, sprite evaluation also stops if rendering is disabled - is this correct?
Quotes from a few pages on the wiki:
Quote:
(1) To compensate for PAL's longer vblank period, the 2C07 always enables the OAM refresh logic, regardless of whether rendering is enabled.
(2) Additionally, it will continue to refresh during the visible portion of the screen even if rendering is disabled. Because of this, OAM DMA must be done near the beginning of vertical blank on PAL, and everywhere else it is liable to conflict with the refresh
(3) In the 2C07, sprite evaluation can never be fully disabled, and will always start 20 scanlines after the start of vblank
This mixes sprite evaluation and oam refresh - are they 2 unrelated processes? These make it sound like sprite evaluation is always on during scanlines 0-239, even if rendering is off?(2) Additionally, it will continue to refresh during the visible portion of the screen even if rendering is disabled. Because of this, OAM DMA must be done near the beginning of vertical blank on PAL, and everywhere else it is liable to conflict with the refresh
(3) In the 2C07, sprite evaluation can never be fully disabled, and will always start 20 scanlines after the start of vblank
But if that's the case, it would contradict jsr's results for their PAL console. If sprite evaluation can't be disabled, the $2004 reads should give invalid results until the last line of the test.
Could someone confirm the output of blargg's oam_read test on a PAL console?
Also relevant is this video of a PAL NES running the "Quantum Disco Brothers" demo with a powerpak. This means the demo works correctly on a PAL console. This demo performs a sprite DMA during vblank which ends around scanline 264, cycle ~60. If I turn on sprite evaluation on scanline 263, the demo breaks (artifacts appear on the screen, or the scrolling stops). Turning on sprite evaluation at the start of scanline 264 makes it work (which means the last writes of sprite DMA may or may not be important in this case - so can't use this as a precise measurement).
So far, what I'm understanding from all this is that:
-It looks like PAL sprite evaluation can be turned off during scanlines 0-239 if rendering is disabled (how does that make sense vs OAM decay, since apparently PAL OAM ram can't decay, even with rendering disabled?)
-Sprite evaluation/oam refresh begins around the start of scanline 264 during vblank.