Revisiting the quest for the most accurate NES palette:

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Revisiting the quest for the most accurate NES palette:

Post by NewRisingSun »

Hojo_Norem wrote:That's because the video generator circuitry inside the C64's VIC-II chip has been accurately modelled.
Oh, I'm not denying that. What I am saying however is that the desaturated slop is the result of improperly converting the VIC-II's accurately-modeled NTSC waveform to RGB. Most C64 color generators (and some capture devices) ignore (1) the color burst as a chroma amplitude reference (2) the 7.5% black-level setup (3) the NTSC to sRGB primaries conversion. All three of these contribute to desaturating the output, and have nothing to do with the user adjusting an imagined CRT. This is only superficially off-topic, as it applies at least in principle to the NES as well, though the difference these things make there is admittedly rather subtle, unlike on the C64.
Hojo_Norem wrote:Custom RGB palettes for machines whose chipsets natively generate composite/Chroma+Luma signals should be consigned to the past
I find them useful for circumventing imperfect built-in color generators.;)
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Revisiting the quest for the most accurate NES palette:

Post by lidnariq »

NewRisingSun wrote:the color burst as a chroma amplitude reference
Could you provide an instance of hardware that uses the colorburst amplitude to scale composite or OTA video? Every single one I've ever looked exclusively uses sync tip depth.
NewRisingSun
Posts: 1510
Joined: Thu May 19, 2005 11:30 am

Re: Revisiting the quest for the most accurate NES palette:

Post by NewRisingSun »

I stated that the color burst amplitude that should be used as a reference for the chroma amplitude (i.e. saturation), not the entire video composite signal. The entire video signal should only be scaled by the sync tip level, as you mentioned. But to answer your question, my Sony KV-21X4D CRT unfortunately indeed uses the color burst amplitude to scale the entire composite signal (both in NTSC and PAL modes), which wreaks havoc with the output of my Tandy 1000 TX. :( If I could only find that service manual I once had, I could even tell you what picture processing IC inside that TV does the dastardly deed. Edit: A Motorola MC44002P.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Revisiting the quest for the most accurate NES palette:

Post by tepples »

lidnariq wrote:Fact of the matter is, we already know exactly how the digital portion works, and the outside-the-IC part is so simple there's nothing variable there.
Is this known for both the NES and Super NES?
The only possible remaining variation in colors would be if the output impedance from the NES varies significantly across the 10 different voltages the PPU can emit. And even then, that should really just come down to a little variation in net hue rotation, net brightness, or net saturation.
Slew rate effects may produce a saturation-dependent hue rotation, where the more saturated colors ($1x and $2x) are rotated more than the ones with weaker chroma ($0x and $3x).
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Revisiting the quest for the most accurate NES palette:

Post by psycopathicteen »

NewRisingSun wrote:It would appear that there are as many "accurate" NES palettes as there are people with capture devices. Meanwhile, both developers and players back in the day would just tweak their TV sets to make them look "nice". At least most of these "accurate" NES palettes still look halfway decent, unlike that desaturated slop from those "accurate" Commodore 64 palettes.
Speaking of which, has anybody noticed how muddy the colors look on the AVGN videos?
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: Revisiting the quest for the most accurate NES palette:

Post by mikejmoffitt »

psycopathicteen wrote:
NewRisingSun wrote:It would appear that there are as many "accurate" NES palettes as there are people with capture devices. Meanwhile, both developers and players back in the day would just tweak their TV sets to make them look "nice". At least most of these "accurate" NES palettes still look halfway decent, unlike that desaturated slop from those "accurate" Commodore 64 palettes.
Speaking of which, has anybody noticed how muddy the colors look on the AVGN videos?
You have an extra layer there, since James records his sessions with a DVD recorder for a playthrough.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Revisiting the quest for the most accurate NES palette:

Post by tepples »

At what quality on the DVD recorder? DVD recorders have 704-pixel* modes and 352-pixel modes. The pixel counts refer to luma; chroma is half as fine. So long as there are at least 280 chroma pixels across, which the 704-pixel mode has, it should be able to cover the entire bandwidth of the NES's composite output, or even the Super NES's S-Video signal if your DVD recorder happens to be compatible with your Super NES (mine isn't except through RF) and the game isn't using 512px mode. Cheap real-time MPEG-2 encoders, however, might mess with this.

Commodore 64 is a different story. Its pixel clock is 16/7, and 426.67 pixels fit across the 4:3 screen width (including 53.33 pixels of border at each side). This is enough for luma in all modes or for chroma in multicolor modes, but it's just barely not enough for chroma in high resolution mode. I know the C64's native output is S-Video, but that pixel clock (8 high resolution pixels per 3.5 color subcarrier cycles) is 14% too wide even for S-Video without artifacts. I wonder how its chroma output is actually defined.

In either case, at least flat areas of color shouldn't be affected.


* The 704-pixel modes actually store 720 pixels, including 16 undisplayed "nominal analog blanking" pixels at the sides that are out of the 4:3 or 16:9 frame.
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: Revisiting the quest for the most accurate NES palette:

Post by Firebrandx »

So I wrapped up my finalized NES 'accuracy' palette. It's an amalgam of a few personal tweaks, the hue alignment from my direct-capture results, and uses the top-end values from the 'natural' palette. The end result looked absolutely kosher on every game I tried (using an Everdrive N8 to have access to 99.9% of the library). I tested all the Mega Mans, Castlevanias, Zeldas, Punch-Out!!, Ninja Gaiden, Double Dragons, Bionic Commando, and many other games. I tested for so long that I got burnt out. This is finally the palette I can rest on.

Here's the zipped palette file:

http://www.firebrandx.com/downloads/fbx ... alette.zip

One thing I will point out is I discovered some displays cannot handle the blueish-purple color entries coming from the real NES hardware. As a result, some graphics that were meant to be purple came out as straight blue. This is where the direct-capture hue values came in real handy in that it shows the purple tinge on those entries correctly. Examples of the bluish-purple would be in the intro to Mega Man 5 (where it shows Proto Man in blueish-purple in front of the blue robots behind him), and the first stage of Double Dragon II's floor is also bluish-purple. ON some displays, these will appear entirely blue.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Revisiting the quest for the most accurate NES palette:

Post by tepples »

This is what the palette looks like, in case you want to use it in a paint program:
fbx-palette.png
fbx-palette.png (2.93 KiB) Viewed 7934 times
Its colors are less muted than the palette that I had been using.

The Python program that produced this image:

Code: Select all

#!/usr/bin/env python
"""
indexed image palette replacer
made by Damian Yerrick, licensed under CC Zero
"""
from PIL import Image

with open("FBX-Accuracy.pal", "rb") as infp:
    palette = infp.read()
palette = palette[:192]*4

# this png file is written by savtool available at
# https://pineight.com/nes/#editor
im = Image.open("savtool-swatches.png")
im.putpalette(palette)
im.save("fbx-palette.png")
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: Revisiting the quest for the most accurate NES palette:

Post by Firebrandx »

On request, I slightly reduced the purple tinge that shows up on Protoman in the intro of Mega Man 5. While the intended look was meant to have a purple tinge, many TVs have trouble interpreting it, and so most people remember seeing those colors in a more blue hue. The same entries also show up in Metroid quite a bit, so it was the best compromise between 'intended' and 'what people remember'.

The file has been uploaded to the same link.
Great Hierophant
Posts: 780
Joined: Tue Nov 23, 2004 9:35 pm

Re: Revisiting the quest for the most accurate NES palette:

Post by Great Hierophant »

Regarding the purples. On Double Dragon II's street, my CRT shows a color that aligns with Nestopia's default palette. If I shift the tint control (from center) two notches to the left to the red, I will see Firebrandx's color.

Although I did not download Firebrandx's original final palette, if I keep my CRT's tint control at the level to see Firebrandx's purple street, I can make out a purplish outline for Protoman in Mega Man V. With his newer palette, I see the blue color I would see if my tint control was in the center.

I believe Super Mario Bros. and Super Mario Bros. 2 use the same palette entry for the sky in the overworld stages. However, if you look at the Japanese commercial for each game (easily available on youtube), the TV shows a more purplish sky for SMB2 than for SMB. Issues like these must cause nothing but headaches for people who want a consistent color palette.
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: Revisiting the quest for the most accurate NES palette:

Post by Firebrandx »

So I finally got to the bottom of why my direct-capture palette conversions looked like crap compared to my eyeballed method. Turns out there was some horribly incorrect color conversion going on with blown out colors. I was able to make a new direct-capture palette where FINALLY everything is beautiful and accurate to the real console!

Here's the finalized Direct-Capture palette:

http://www.firebrandx.com/downloads/FBX ... -Final.zip

Every game I reviewed looks 100% kosher with it, and it's all purely a math-driven palette (i.e. no eyeballing).
AWJ
Posts: 433
Joined: Mon Nov 10, 2008 3:09 pm

Re: Revisiting the quest for the most accurate NES palette:

Post by AWJ »

Great Hierophant wrote:I believe Super Mario Bros. and Super Mario Bros. 2 use the same palette entry for the sky in the overworld stages. However, if you look at the Japanese commercial for each game (easily available on youtube), the TV shows a more purplish sky for SMB2 than for SMB. Issues like these must cause nothing but headaches for people who want a consistent color palette.
SMB1 and SMB2J have the same sky color, $22. SMB2US does not--its sky color is $21. $x2 is a weird choice for sky; most games use $x1 or $xC. I think the popularity of emulator palettes with highly inaccurate $x2 hues is related to people misremembering SMB1's sky color (confusing it with other games). If you play SMB1 on real hardware after playing a bunch of other NES games I guarantee your reaction will be "huh, why is the sky so purple?"
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: Revisiting the quest for the most accurate NES palette:

Post by Firebrandx »

Sorry to post yet another palette update, but really the only complaint I got about the new direct capture palette on other forums was that it was too low on saturation. I made a new one with heavier saturation here:

http://www.firebrandx.com/downloads/FBX ... urated.zip

It could be just considered an alternative if you like the more vibrant colors.

Cheers!
User avatar
Firebrandx
Posts: 50
Joined: Fri Aug 26, 2011 3:20 am

Re: Revisiting the quest for the most accurate NES palette:

Post by Firebrandx »

I wrote up a web page showcasing my latest (and last) palette. It also goes into full detail on how each color was derived:

http://www.firebrandx.com/nespalette.html

I really cannot stand to work on this project any further, so no matter what, I'm retired from the project. :-P
Besides, those pics look superb if I say so myself. :-)
Post Reply