http://wiki.nesdev.com/w/index.php/PPU_palettes wrote:If rendering is disabled in PPUMASK ($2001), and the current VRAM address points in $3F00-$3FFF, this color will be shown on screen instead of the backdrop color. A loop that fills the palette will cause each color in turn to be shown on the screen. So to avoid horizontal rainbow bar glitches while loading the palette, wait for a real vertical blank first using an NMI technique.
I find this a bit ambiguous.
So what does it render on the screen, if the address points to $3F11 for instance, does it render color #$11, or does it render color that is in palette at index #$11?
Last edited by Bisqwit on Tue Oct 18, 2011 9:00 am, edited 1 time in total.
I seriously doubt it, as the PPU only enters in it's special "forced blanking" mode when both BG and sprites are disabled, and in this state, left-clipping state does not matter and is overriden.
In any other state (if BG OR sprites OR both are enabled), the PPU does ALL it's fetches even for the disabled planes, and even for the tiles/sprites that falls behind the possibly behind the left-clipped area, it's just that the disabled BG/sprite/left-clipping areas are replaced by transparent pixels at a later stage, and then the transparent color is used.
Bisqwit wrote:Does the special rule also apply to the 8 pixel edge areas if background rendering is disabled on the 8 pixel edges but not otherwise on the screen?
Background clipping shouldn't occur when the background is disabled, the same goes for sprites.
Bisqwit wrote:So what does it render on the screen, if the address points to $3F11 for instance, does it render color #$11, or does it render color that is in palette at index #$11?
It renders color that is in palette at index #$11. Ditto.
Try Micro Machines.
Bisqwit wrote:So what does it render on the screen, if the address points to $3F11 for instance, does it render color #$11, or does it render color that is in palette at index #$11?
It renders color that is in palette at index #$11. Ditto.
Thanks.
Does the palette index get shown on the edges if the user pokes in $3F11 while the PPU is rendering an edge (and background rendering is not globally disabled but is disabled on the 8 pixel edges)?
beannaich wrote:Background clipping shouldn't occur when the background is disabled, the same goes for sprites.
I did not claim it would, and your post does not address my question.
If that's not what you meant by the "8 pixels edge in the background" then ignore what I said.
To answer your first question, when background rendering is off, and the PPU address points to a palette index, that color is drawn to the screen. That is what the code I posted shows.
If the address is $3F11, and the dot is 25, scanline 40. Then the color at 25,40 will be whatever color palette[paletteRam[$11]] is.
This behavior can be tested with blargg's full palette test ROMs.
Bisqwit, I think you're confusing us all with "8 pixel edges"... What exactly do you mean by that?
Do you mean the leftmost 8-pixel column we can ask the PPU not to render? That will always show up as color 0. The only time when the PPU renders the color pointed to by the VRAM address is when rendering is completely disabled (sprites and background are turned off).
Note that there are certain entries of the palette that can only be seen this way. The colors at memory locations $3F04, $3F08 and 3F0C will be displayed if you point to them while rendering is off, but when rendering is on they will show whatever color 0 is.
tokumaru wrote:Bisqwit, I think you're confusing us all with "8 pixel edges"... What exactly do you mean by that?
Do you mean the leftmost 8-pixel column we can ask the PPU not to render?
Yes. I don't know how I could have been clearer about it.
That will always show up as color 0. The only time when the PPU renders the color pointed to by the VRAM address is when rendering is completely disabled (sprites and background are turned off).
Note that there are certain entries of the palette that can only be seen this way. The colors at memory locations $3F04, $3F08 and 3F0C will be displayed if you point to them while rendering is off, but when rendering is on they will show whatever color 0 is.
Allright. Thank you. You get brownie points for the very clear and comprehensive answer. :-)
EDIT: One more thing. Is the color shown when rendering is off and memory location points to $3Fxx, subject to de-emphasis and grayscale control bits?
Bisqwit wrote:One more thing. Is the color shown when rendering is off and memory location points to $3Fxx, subject to de-emphasis and grayscale control bits?
Good question. Well, fortunately, there's a way to check it out. Try SMB3 - once you beat the castle boss (Boom-Boom), the screen clipping is enabled and the screen flashes in black and white. If you have the cart and a modern TV (LCD, LED etc.), try out.
Bisqwit wrote:One more thing. Is the color shown when rendering is off and memory location points to $3Fxx, subject to de-emphasis and grayscale control bits?
Good question. Well, fortunately, there's a way to check it out. Try SMB3 - once you beat the castle boss (Boom-Boom), the screen clipping is enabled and the screen flashes in black and white. If you have the cart and a modern TV (LCD, LED etc.), try out.
Or just cast Heal in Dragon Warrior 1, or have the old man restore your MP.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!