Hello all, it's me again! I know, you're not surprised at all.
This time I have questions about the timing of sprite evaluation steps, namely what happens when the last 8 sprites are the only sprites in range, and other circumstances.
In my calculations, a "failed" sprite evaluation takes 2 ppu cycles (1 cycle to read the y-coord from oam, and 1 cycle to evaluate), whereas "successful" evaluations take 8 ppu cycles (1 cycle to read y, 1 cycle to evaluate/store y, 1 to read name, 1 to store name, etc).
Based on those assumptions, I came up with some scenarios, and how long it would take the ppu to handle them. The following numbers are more of a time stamp for when the evaluation would effectively finish, as they have the 64 ppu cycles where evaluation is initialized worked in.
No sprites are in range: 192 ppu cycles.
All sprites are in range: 576 ppu cycles (would stop after 256, of course).
8 sprites are in range: 240 ppu cycles.
Is my timing calculation correct? If not, why?
Also, side note: Could we get the sprite evaluation section of the wiki cleaned up? Maybe add some pseudo-code? It just seems like one of those things that is difficult to explain with a hierarchical ordered list. Maybe it's just me.
This time I have questions about the timing of sprite evaluation steps, namely what happens when the last 8 sprites are the only sprites in range, and other circumstances.
In my calculations, a "failed" sprite evaluation takes 2 ppu cycles (1 cycle to read the y-coord from oam, and 1 cycle to evaluate), whereas "successful" evaluations take 8 ppu cycles (1 cycle to read y, 1 cycle to evaluate/store y, 1 to read name, 1 to store name, etc).
Based on those assumptions, I came up with some scenarios, and how long it would take the ppu to handle them. The following numbers are more of a time stamp for when the evaluation would effectively finish, as they have the 64 ppu cycles where evaluation is initialized worked in.
No sprites are in range: 192 ppu cycles.
All sprites are in range: 576 ppu cycles (would stop after 256, of course).
8 sprites are in range: 240 ppu cycles.
Is my timing calculation correct? If not, why?
Also, side note: Could we get the sprite evaluation section of the wiki cleaned up? Maybe add some pseudo-code? It just seems like one of those things that is difficult to explain with a hierarchical ordered list. Maybe it's just me.