I am re-writing my PPU code, and something dawned on me..
The PPU has a maximum fine x scroll value of 8 (exclusive), keep this in mind. The PPU also fetches 2 background tiles at the end of each scanline, for the next scanline. Lastly the PPU fetches 32 background tiles while rendering during dots 0-256.
That makes 34 background tiles, at 8 pixels each which gives us 272 background pixels. The screen is 256 pixels wide.
256 + 8 = 264
264 / 8 = 33
The maximum you could ever need is 33 background tiles, so is the last fetch (248-256) even necessary? Is a tile discarded somewhere? Am I missing something?
The PPU has a maximum fine x scroll value of 8 (exclusive), keep this in mind. The PPU also fetches 2 background tiles at the end of each scanline, for the next scanline. Lastly the PPU fetches 32 background tiles while rendering during dots 0-256.
That makes 34 background tiles, at 8 pixels each which gives us 272 background pixels. The screen is 256 pixels wide.
256 + 8 = 264
264 / 8 = 33
The maximum you could ever need is 33 background tiles, so is the last fetch (248-256) even necessary? Is a tile discarded somewhere? Am I missing something?