How many scanlines are in VBlank period?
Time-wise, there are about 21 scanlines during VBlank. Consult the NES Technical docs for more details. • What’s up with $2005/2006? It’s a bitter relationship trying to get the PPU to do what you want it to. $2005 and $2006 are tied together in their displaying of the NES background. Although this oversimplifies things a bit, $2005 doesn’t control scrolling absolutely; it’s more like it “gives suggestions” to $2006 about where to begin updating the background based on what part of the name table. Vertical scrolling can be affected by $2005 only during the VBlank period. After that, it’s all up to $2006 to begin drawing from that point. During screen drawing, writes to $2005 affect horizontal scrolling only, and only partially at that. Say for example you are doing some wavy scrolling effects. If your scrolling routine offsets the background from its original horizontal position by more than 8 pixels [1 column of tiles, coincidentally…] there will be scrolling glitches visible on the