Page 1 of 1

quick questions (PPU related)

Posted: Mon Apr 18, 2016 7:55 pm
by Zepper
1. In the pre-rendered scanline, are the sprites evaluated the same way of other lines?

2. Are writes to $2006 allowed if backgroud or sprites are enabled? I'm just getting writes around cycle 256 (a bit before, a bit later) and it makes the title screen of Kick Master "waving".

Re: quick questions (PPU related)

Posted: Mon Apr 18, 2016 8:34 pm
by tepples
2. Writes to $2005 and $2006 during active picture affect the scroll in ways described in "The skinny on NES scrolling", now incorporated into "PPU scrolling" on the wiki.

Re: quick questions (PPU related)

Posted: Mon Apr 18, 2016 8:46 pm
by tokumaru
Zepper wrote:1. In the pre-rendered scanline, are the sprites evaluated the same way of other lines?
I'm gonna guess "no", since no sprites are rendered in scanline 0, but I'd like a definitive answer too.
2. Are writes to $2006 allowed if backgroud or sprites are enabled? I'm just getting writes around cycle 256 (a bit before, a bit later) and it makes the title screen of Kick Master "waving".
$2006 writes are always allowed, and they can affect the temporary address register or the actual address register, as explained in loopy's "skinny" document, even during rendering. Since the actual address register is also incremented/modified automatically by the PPU during rendering, the order in which programmatical modifications and automatic modifications are applied is very important.

Re: quick questions (PPU related)

Posted: Tue Apr 19, 2016 2:31 pm
by Zepper
I believe my 2nd question wasn't clear. :oops:
From the tracelogs, there's a "conflict" between Y increment (+0x1000) and a write to $2006. If the increment at dot 256 occurs after the $2006 write, the screen is "waving" (loopy_v gets an increment); otherwise, it's fine (loopy_v = loopy_t after the increment).