When background/sprite clipping is enabled in $2001 which palette color entry should be used for those left 8 screen pixels? I can't seem to find an answer in existing documentation. I'm hoping this isn't a totally dumb question...it's been an incredibly long time since I've messed with my PPU logic and I don't remember a lot of the intricacies. :-/
Thanks!
Sprite clipping doesn't really have anything to do with this (I mean, lack of sprites = transparency, not a solid color), but when the background is clipped, color 0 is used, the one at $3F00.
Excellent! That's what I was looking for. I figured it had something to do with transparency. Thanks! =D
In fact, I think from the emu's author's viewpoint it is : When a background or sprite falls into a disabled area (either because of left clipping or beacuase of total disabling through $2001.3/4), there is only transparent color showing.
When both sprites and backgrounds are transparent, the BG color (palette entry $00 at $3f00) is shown.
The only exeption to this is if $2006 points to palette area ($3f00-$3fff) then the corresponding color "becomes" the BG color, even if it's not color $00.
A "trick" is that NTSC NES also uses the BG color outside of the rendered image, while the PAL NES simply uses black (but no emus emulate the area outside the rendered image anyway).
Bregalad wrote:
if $2006 points to palette area ($3f00-$3fff) then the corresponding color "becomes" the BG color, even if it's not color $00.
Does this happen in the clipped area too? I thought this was just when rendering was disabled.
Okay, so I understand that when clipping is turned on for sprites/background each pixel should reference the palette's (i.e. $3F00) transparency index for rendering (so that they are not displayed). But at which point in the sprite and background rendering pipelines should this transparency substitution take place? When I refer to "pipelines" I'm referring to the pipelines as described in Brad Taylor's 2C02 tech reference.
You could think as layers like that :
Sprite w.o. priority bit -> BG -> Sprite with priority flag -> BG color @ $3f00
This isn't exactly true as priority is determined between sprites first, and then the priority of the "selected" sprite collides with BG. Castlevania uses this.