The truth about the black entries of the NTSC NES:
Moderator: Moderators
- Firebrandx
- Posts: 50
- Joined: Fri Aug 26, 2011 3:20 am
The truth about the black entries of the NTSC NES:
So after hearing of other palette makers deciding to increase entry 1D (and its mirrors) to a grey shade due to 0D being darker, I decided to use a test ROM on an umodded front-loader NTSC NES hooked into a 20M2U PVM with the brightness turned all the way up. I ended up discovering some things I never knew before, and apparently are not accurately reflected in online documentation as far as I could google for an hour. Here's what I found:
0E, 1E, 2E, 3E, 0F, 1F, 2F, 3F are all the same exact shade on the PVM even when brightness is cranked all the way up. There's no difference. They also do not respond to emphasis bit settings. This is known behavior.
1D with emphasis bits turned off is identical in shade to the E and F entries. Turning different emphasis bits on and off will actually change the hue of 1D. Turning on all emphasis bits turns 1D into the same shade as the default 0D. This last part I have not seen documented clearly anywhere.
0D by default is darker then 1D by default. 0D also responds to emphasis bits, where the hue is changed just like with 1D, only at a darker scale. Turning on all emphasis bits for 0D makes it an even darker black! Here again, I've not seen this documented.
I apologize ahead of time if I missed a page that explains all this as I have, but the pages and threads I've read about these black entries all seem to have missing information, wrong information, or conflicting information.
0E, 1E, 2E, 3E, 0F, 1F, 2F, 3F are all the same exact shade on the PVM even when brightness is cranked all the way up. There's no difference. They also do not respond to emphasis bit settings. This is known behavior.
1D with emphasis bits turned off is identical in shade to the E and F entries. Turning different emphasis bits on and off will actually change the hue of 1D. Turning on all emphasis bits turns 1D into the same shade as the default 0D. This last part I have not seen documented clearly anywhere.
0D by default is darker then 1D by default. 0D also responds to emphasis bits, where the hue is changed just like with 1D, only at a darker scale. Turning on all emphasis bits for 0D makes it an even darker black! Here again, I've not seen this documented.
I apologize ahead of time if I missed a page that explains all this as I have, but the pages and threads I've read about these black entries all seem to have missing information, wrong information, or conflicting information.
- Firebrandx
- Posts: 50
- Joined: Fri Aug 26, 2011 3:20 am
Re: The truth about the black entries of the NTSC NES:
Ah dammit, I found the related info that does match my findings in the NTSC video section (rather than the palette section):
https://wiki.nesdev.com/w/index.php/NTSC_video
https://wiki.nesdev.com/w/index.php/NTSC_video
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: The truth about the black entries of the NTSC NES:
Everything you've stated is documented here, but not necessarily in the terms you've expressed: Wiki:NTSC video
$0D being darker when under emphasis it never calls out that specific colour but it's stated that the $D column is included in emphasis effects. I don't think there's really a need to say something special about that one particular entry? It works the same as the others in this respect.
1D + emphasis = 0D is not said anywhere, but how accurately is this measured? There are specific measurements given for the base voltages and an explicit formula given for emphasis attenuation, but what I'd gather from applying those is that they should be fairly close but not really the same?
$0D being darker when under emphasis it never calls out that specific colour but it's stated that the $D column is included in emphasis effects. I don't think there's really a need to say something special about that one particular entry? It works the same as the others in this respect.
1D + emphasis = 0D is not said anywhere, but how accurately is this measured? There are specific measurements given for the base voltages and an explicit formula given for emphasis attenuation, but what I'd gather from applying those is that they should be fairly close but not really the same?
Re: The truth about the black entries of the NTSC NES:
Just checking the wiki: It says that 0D = -0.117, and 1D with all emphasis on would be -0.0912. Pretty close, but 0D should be slightly darker.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
- Firebrandx
- Posts: 50
- Joined: Fri Aug 26, 2011 3:20 am
Re: The truth about the black entries of the NTSC NES:
Yeah the difference there is a small enough margin that my eyes couldn't pick up the difference on my PVM. I'm thinking about hooking my own NES up to my Rygol scope using 75-ohm termination and measuring the amplitude specific to my NES. If just to satisfy my OCD anyway.Dwedit wrote:Just checking the wiki: It says that 0D = -0.117, and 1D with all emphasis on would be -0.0912. Pretty close, but 0D should be slightly darker.
- gravelstudios
- Posts: 159
- Joined: Mon Mar 13, 2017 5:21 pm
- Contact:
Re: The truth about the black entries of the NTSC NES:
Thanks for this. I was going to make a post asking if all the black entries are different or the same. Now I don't have to.
Re: The truth about the black entries of the NTSC NES:
I too have been ignorant of this information until now, but one question remains for me about 1D. It's nice to have it affected by the emphasis bits, but is it "safe" on TVs when not all three bits are set at once?
Re: The truth about the black entries of the NTSC NES:
I'm not sure if $1D is unsafe with the emphasis bits set or not since it's so close to $0D when set? It should be safe when the bits are clear though. According to the wiki it's identically black to the $xE and $xF columns when emphasis isn't set. The only difference is that it's affected by the emphasis bits while the $xE/$xF columns aren't.
To be super safe you can just ignore the whole $xD column to avoid fading into $0D (in case a fading routine is used that just subtracts $10 from the palette entry). It only really has two useful colours, the two greys $2D and $3D, which aren't too much different from the two "safe" greys $00 and $10 anyway. $2D and $3D are black on RGB PPUs (2C03 and 2C05) so there are compatibility reasons to not use them as well.
To be super safe you can just ignore the whole $xD column to avoid fading into $0D (in case a fading routine is used that just subtracts $10 from the palette entry). It only really has two useful colours, the two greys $2D and $3D, which aren't too much different from the two "safe" greys $00 and $10 anyway. $2D and $3D are black on RGB PPUs (2C03 and 2C05) so there are compatibility reasons to not use them as well.
- gravelstudios
- Posts: 159
- Joined: Mon Mar 13, 2017 5:21 pm
- Contact:
Re: The truth about the black entries of the NTSC NES:
I like using the $XD column because it gives me more options in terms of shades of gray I can use. in my fade-out routine, I do it in 8 steps, alternating between setting all the color emphasis bits to slightly darken the screen, then dropping to the next palette row darker, and any value that becomes negative I set to $0F. I added a few instructions to also check if anything drops to $1D or $0D and reset those to $0F as well. I figure the chance of anybody ever playing my game on an RGB PPU is so slim, I'm not really concerned about it. out of curiosity, is there any way (in code) to determine what PPU it's running on?
-
- Posts: 1510
- Joined: Thu May 19, 2005 11:30 am
Re: The truth about the black entries of the NTSC NES:
I have hypothesized that one could detect the RP2C03 PPU by the lack of skipped pixel in the pre-render scanline. I have not made, or seen somebody else make, a proof of concept however. One could take the respective part from blargg's PPU tests, which includes a detection of the skipped pixel, as a starting point.
Re: The truth about the black entries of the NTSC NES:
Forever ago, thefox wrote a demo that detected that the RGB PPU allowed 1/6 of one more instruction cycle to execute per vsync. When I asked them to repost it, they declined on the grounds of it being too fragile.
... although I can't find where I asked anymore.
... although I can't find where I asked anymore.
Re: The truth about the black entries of the NTSC NES:
I would have written such a test except that I lack a device with an RGB PPU on which to run it.
Re: The truth about the black entries of the NTSC NES:
I assume we could cajole memblers or lupin3rd to run a test on their Vs. Systems.