Trying to figure out which RGB palette is canonical

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Fiskbit
Posts: 891
Joined: Sat Nov 18, 2017 9:15 pm

Re: Trying to figure out which RGB palette is canonical

Post by Fiskbit »

Yes. The first 1 to 2 million frontloading NES consoles used 2C02E. The rest used 2C02G.
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Trying to figure out which RGB palette is canonical

Post by DRW »

Is there an actual visual difference between those two? (Even if the difference is small.) Or are they functionally identical?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Trying to figure out which RGB palette is canonical

Post by Pokun »

I think the answer is in Lidnariq's initial statement:
Lidnariq wrote: different versions of the PPU generate (subtly) different colors.
I interpret that as they are visibly different on each and every PPU version and variant, although probably not enough to be a big deal in most cases (especially considering different TV-sets all interpret them differently anyway).


I have another question. How come that the hues on the PPU are in angles, degrees and clockwise etc, and not voltage levels? Does it have something to do with NTSC and PAL color encoding?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

Pokun wrote: Thu Aug 04, 2022 2:28 pm I have another question. How come that the hues on the PPU are in angles, degrees and clockwise etc, and not voltage levels? Does it have something to do with NTSC and PAL color encoding?
Because they natively generate video in the composite domain. It's why the TMS99x8A datasheet has NTSC voltages specified only as "luminance" and "chrominance" voltages, but PAL voltages in Y Pr Pb:
Attachments
TMS9918A-p2-17.png
Bavi_H
Posts: 193
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Bavi_H »

Pokun wrote: Thu Aug 04, 2022 2:28 pmHow come that the hues on the PPU are in angles, degrees and clockwise etc, and not voltage levels?
(Adapted from previous post Re: Palette/colors clarification:)

In the NTSC composite signal, the signal is made of phase, amplitude, and average level as shown in this diagram [image link updated to use web.archive.org].

The angle in degrees represents the phase between the sinusoidal color burst at the beginning of each line and the sinusoidal parts in the main signal. Changing the phase of the sinusoidal parts in the main signal will affect the hue the TV will show.

lidnariq wrote: Thu Aug 04, 2022 2:45 pmBecause they natively generate video in the composite domain. It's why the TMS99x8A datasheet has NTSC voltages specified only as "luminance" and "chrominance" voltages [...] [attached image of table]
In that table, I think the "luminance" corresponds to the "average level" in the diagram I mentioned and the "chrominance" corresponds to the the "amplitude" in the diagram I mentioned. But the phase isn't specified in that table. Does that example table with "luminance" and "chrominance" values help explain why hues are specified in angles in degrees?
Last edited by Bavi_H on Thu Aug 04, 2022 5:59 pm, edited 1 time in total.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

I don't know why it's usually expressed in degrees. Maybe the typography for specifying angles in radians would be messier?
User avatar
TmEE
Posts: 960
Joined: Wed Feb 13, 2008 9:10 am
Location: Norway (50 and 60Hz compatible :P)
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by TmEE »

Phase shifts are specified in degrees in all materials I see them in as far as electronics go.
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Trying to figure out which RGB palette is canonical

Post by Pokun »

I was wondering why it's an angular unit at all, not specifically why its in degrees instead of radians.
So it's the phase shift between the color burst part and the actual color information part of the NTSC scanline signal. And since phase is indeed measured as an angular unit, that perfectly explains it to me.

Thank you all for the explanations!
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

You could think of chrominance as a phasor ... but if you were already comfortable with phasors, you wouldn't ask this question, so ...

Perhaps another way to look at it is: U,V or I,Q or Pr,Pb are all Cartesian coordinates. But the NES, 2600, and other early consoles work natively in composite, and the different hues are specified by different amounts of delay in time. Because the signal is repetitive, you can thus instead express it in polar coordinates: angle and magnitude.
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Trying to figure out which RGB palette is canonical

Post by DRW »

Pokun wrote: Thu Aug 04, 2022 2:28 pm I think the answer is in Lidnariq's initial statement:
Lidnariq wrote: different versions of the PPU generate (subtly) different colors.
Yeah, but when I asked again, he only quoted my "difference between PAL and NTSC and between early and later Famicoms" part, while he didn't include "differences within standard NTSC front loader NESs".

Pokun wrote: Thu Aug 04, 2022 2:28 pm I interpret that as they are visibly different on each and every PPU version and variant, although probably not enough to be a big deal in most cases
And that's what I'd like to know for sure. I only have one NES at home, so I cannot test it myself. That's why I'm asking the experts here:

Do the different PPU revisions in standard American NTSC front loader NES consoles produce slightly different results? Or are they exactly the same, no matter the revision number?
(Or does maybe even every PPU unit produce slightly different colors from another PPU unit anyway, i.e. even within the same revision, so that no two NES boards are completely alike?)

Pokun wrote: Thu Aug 04, 2022 2:28 pm (especially considering different TV-sets all interpret them differently anyway).
Sure, the TVs are another variable. But I'm curious what happens if you connect one NES that was bought in winter 1985 and a later NES, for example from 1989 or 1991, to the same TV: Are there any differences? Or do they produce exactly the same output?
And if there are any differences: What if I connect two NESs from 1985 (or two NESs from 1991) to the same TV? Can they differ as well or are they really the same?
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Trying to figure out which RGB palette is canonical

Post by lidnariq »

DRW wrote: Thu Aug 04, 2022 11:08 pm Do the different PPU revisions in standard American NTSC front loader NES consoles produce slightly different results?
Yes.

2C02E, 2C02G both exist in significant numbers and differ. Not a lot, but definitely measurably.
2C02H probably differs measurably too, but we haven't measured it yet.

All three revisions occurred in NTSC front-loaders.
And if there are any differences: What if I connect two NESs from 1985 (or two NESs from 1991) to the same TV? Can they differ as well or are they really the same?
Assuming the same PPU revision, the same mainboard revision, and both having had their electrolytic capacitors replaced recently, I'd expect the results to be indistinguishable.
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Trying to figure out which RGB palette is canonical

Post by DRW »

lidnariq wrote: Thu Aug 04, 2022 11:46 pm
DRW wrote: Thu Aug 04, 2022 11:08 pm Do the different PPU revisions in standard American NTSC front loader NES consoles produce slightly different results?
Yes.

2C02E, 2C02G both exist in significant numbers and differ. Not a lot, but definitely measurably.
2C02H probably differs measurably too, but we haven't measured it yet.
Thanks for the information.

Is there any example available where I can actually see or read this? Like pictures or videos that were taken with the same TV and with two consoles? Or maybe some descriptions where actual examples are named, like "this and that color is darker on this revision" or "the yellow color is more greenish on this revision and less greenish on that revision"? Some practical examples since, in the moment, it's all quite abstract.

lidnariq wrote: Thu Aug 04, 2022 11:46 pm and both having had their electrolytic capacitors replaced recently
In what way can this influence the output? (Sorry if the quetsion sounds stupid. I know next to nothing about the hardware quirks that are related to revisions or age).
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: Trying to figure out which RGB palette is canonical

Post by Drag »

Based on what I know about the PPU (which may be outdated by now), I would hypothesize:

The luminance and saturation between each row of the palette can vary slightly, enough that you can measure it with an oscilloscope, but not enough that you'll notice it visually on the screen, because the various voltage levels the PPU outputs are analog and likely within a tolerance of what we've documented but not always the exact same, and the step in brightness between each row of the palette is quite large so you wouldn't wind up with a situation that, for example, a color on row 1x looks lighter visually than a color on row 2x on one PPU but not another.

I think the hue of each color can be expected to be the same from PPU to PPU of the same region (NTSC or PAL), because the color subcarrier is completely digital. It is essentially a clock signal fed through a 12-step shift register, to create 12 phases of the same {color subcarrier frequency}mHz clock. The phase used for the colorburst reference, which determines what hue all the colors will have, is just one of the phases from the shift register all of the rest of the phases come from, so I'd expect that hues from PPU to PPU will be the same.

==========

As far as capacitors go, this is just my speculation, if there are capacitors on the PPU's video output signal, then they will affect how quickly the voltage level will rise or fall, remembering that everything the PPU outputs, including the color subcarrier, is rectangular and not sinusoidal. I can imagine that the TV's color decoder may see different rectangular slopes as slight phase offsets, which would shift the hue slightly. Consider this:

Code: Select all

  _   _
 | | |
_| |_|
       _
  /\  /
_/  \/
These two waveforms have their transitions at the same time, but the second one has a slower slew rate than the first, which makes it "look" like it has a different phase from the first waveform even though it technically doesn't. I can imagine that DC bias can introduce a "travel time" (because of a capacitor filling up or emptying), which then creates an additional phase delay compared to the colorburst reference. If this is true, then the individual rows of the palette can have a slight hue offset from each other. Not individual colors, but the entire row would be shifted slightly.

We know electrolytic capacitors can fail over time, and when they do, they can change their capacitance and introduce extra resistance. If the capacitance is wrong, that can create a larger or a smaller hue shift (as well as other full-screen artifacts such as sharpening, softening, darkening, etc), but if the capacitor is fine, it ought to have the same capacitance as equivalent capacitors on other NES/FC boards, meaning that any hue shifting should be the same from console to console.

Still though, I'd expect any differences to be the kind where you don't notice with your eyes, but can measure them with an oscilloscope; of two PPUs, I wouldn't expect one to output a noticeably greenish yellow and the other to output a noticeably reddish yellow, but I've been wrong plenty of times before. :P
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Trying to figure out which RGB palette is canonical

Post by Pokun »

As far as chip revision goes, the vast majority of Famicoms would have all the same chips as the NTSC NES (except the lockout chip of course). PPU revision E-0 (also used in early NTSC NES) came sometime in 1984 I believe when round buttons were already the norm, so the earlier chip revisions than that are very uncommon compared to later ones since they were quickly replaced within the first two years. And considering the Famicom was manufactured well into the 2000s (as the AV Famicom model), while NES was discontinued sometime in the mid '90s (as the top-loader model), there is no shortage of late-chip Famicoms.

In other words the NTSC NES wouldn't be any different from most Famicoms (red & white or AV) if we don't consider the motherboard layout differences.

lidnariq wrote: Thu Aug 04, 2022 11:46 pm Not a lot, but definitely measurably.
Measurably doesn't necessarily mean visibly. Do you think it's noticeable for the human eye?
Pokun
Posts: 2681
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: Trying to figure out which RGB palette is canonical

Post by Pokun »

Drag wrote: Fri Aug 05, 2022 12:14 pm The luminance and saturation between each row of the palette can vary slightly, enough that you can measure it with an oscilloscope, but not enough that you'll notice it visually on the screen, because the various voltage levels the PPU outputs are analog and likely within a tolerance of what we've documented but not always the exact same, and the step in brightness between each row of the palette is quite large so you wouldn't wind up with a situation that, for example, a color on row 1x looks lighter visually than a color on row 2x on one PPU but not another.

I think the hue of each color can be expected to be the same from PPU to PPU of the same region (NTSC or PAL), because the color subcarrier is completely digital. It is essentially a clock signal fed through a 12-step shift register, to create 12 phases of the same {color subcarrier frequency}mHz clock. The phase used for the colorburst reference, which determines what hue all the colors will have, is just one of the phases from the shift register all of the rest of the phases come from, so I'd expect that hues from PPU to PPU will be the same.
OK that would be an answer to my question, thanks.
Post Reply