ppu background and sprite disabled

ppu background and sprite disabled
by on (#3322)
what does the ppu do when either of these are dsabled ?

what counters are or are not updated?

does the ppu skip over that pixel and drae black?

thanks
matt

by on (#3327)
When only one is disabled, things operate normally, only the BG or sprite pixel (whichever is disabled) is not rendered to the screen. However I believe that even if BG rendering are disabled, the tiles are still fetched and the PPU operates just as it would if BG rendering were on. Same for sprites -- all the normal sprite checks are made and tiles fetched even if sprites are disabled.

When both are disabled, the PPU sort of enters a disabled state ... at which time:

- No counters are updated

- No tiles fetched

- If the PPU address is between ppu$3F00-$3FFF or any mirrored area of that, that's the color it draws to the screen. Otherwise, ppu$3F00 is the color drawn.

- I'd just assume that tile/attribute/pattern buffers used for loading tiles are cleared -- so if the BG is flipped on midframe it still won't be visible for another 8-15 cycles (counters have to reload -- pipeline effect). I am not 100% sure on this one though, but it seems the most logical. Either this or the PPU outputs garbage for 8-15 pixels (or the last tiles to be loaded into those buffers).

by on (#3328)
if bg and sprites are disabled at the beginning, and the counters are not loaded, then isnt the whole screen trashed ?

and if bg and sprites are disabled midframe, then isnt the whole line trashed ?

thanks

matt

by on (#3329)
I don't know what you mean by 'trashed'. If the PPU is off (bg and spr disabled) during cycles 0-255 of a scanline (the cycles that render pixels), the PPU outputs the color determined by the PPU address as I mentioned in the above post.

Assuming that the PPU address does not change the color (usually the case): When the PPU is off for a full frame, the frame would appear a solid color. Or if the PPU is off for only a single scanline, that scanline would appear a solid color. Or if the PPU is off for even a fraction of a scanline, the fraction will appear a solid color.

Usually ppu$3F00 (the normal BG color) is the color rendered when the PPU is off. However some games (notably Micro Machines, Bee52) change the PPU address to make a different color show -- they use this to create fancy horizontal bars across the screen.

by on (#3330)
i guess i meant that if the coutners do update when disabled and then it starts rendering again, then would the address be wrong since the counters were not updated ?

oh well, ill try that and see what happens

matt

by on (#3331)
When both background AND sprites are disabled, the VRAM address stops updating and the PPU bus (i.e. between the PPU and CHR ROM/RAM and nametables) goes completely idle, allowing you to mess with $2006/$2007 freely.

by on (#3332)
ok, then that leads to my other post. i was looking at brad taylors docs ( yes i read that it was inaccurate) and id the ppu address that is used for rendering the same address that is used when reading or writing to 2007 ?

does the ppu put the address on the bus for that or does the cpu, or cpu latch, do that ?

are the same ppu counters used for that address? incrementing by 1 or 32 ?

matt