NES palette > SNES RGB555

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

Moderator: Moderators

Post Reply
psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

NES palette > SNES RGB555

Post by psycopathicteen » Sat Dec 11, 2010 9:32 am

I thought of a method to approximating the NES color palette.

Get 2 identical CRT tvs. Same manufacturer. Same size. Same model. Same settings. Hook an NES to one TV, hook an SNES to the other. Try to match the colors on the SNES with the colors on the NES.

Of course this will take a lot of work involved. So I guess noone would know if it would work.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Sat Dec 11, 2010 10:05 am

Other ways to get RGB values:
  • Bit-extend the 333 palette used in the PlayChoice PPU. I seem to remember either kevtris or the MAME people having done this. It would give colors comparable to the Famicom Titler.
  • Rip the palette out of acNES, the GameCube- and GBA-based NES emulator used by Animal Crossing 1. (The GBA version of this was subsequently used for e-Reader and Classic NES Series.)
  • Rip the palette out of Virtual Console, the Wii-based successor to acNES.
  • Run the NTSC NES signal through a decoder based on the NTSC definition. The TV would apply the same hue warping to the Super NES's output the same way it is to the NES's.
But then these depend on exactly how Super NES RGB colors are translated to the NTSC composite signal. On the NES, we know the signals for colors $x1 through $xC are square waves alternating between the luminance values for $x0 and $xD. Has the Super NES PPU's color encoder been analyzed in similar detail?

User avatar
Dwedit
Posts: 4236
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Sat Dec 11, 2010 10:53 am

What makes Nintendo's selection of a palette for an emulator better than any other? One of Nintendo's own websites once even included Nesticle screenshots.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sat Dec 11, 2010 11:03 am

I agree with Dwedit. I don't see any reason why current Nintendo would have more accurate emulation than everyone else. In fact, we have proof that they make use of things not created by them, such as the iNES header. I seriously doubt that they built their emulators from the ground up.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Sat Dec 11, 2010 12:06 pm

Eyeballing just looks error prone to me. No two CRT SDTVs are exactly alike. If you have the capability to calibrate two TVs to within plus or minus 3 percent, which you'd have to do to eyeball a 5-bit signal, then you likely have the capability to examine the video signal itself.

Eyeballing might be more accurate in a picture-in-picture scenario. My TV will PIP a component signal and a composite signal, or a component signal and an HDMI signal, or a composite signal and an HDMI signal, but not two composite signals. I could do like I normally do, converting composite to HDMI through my DVD recorder, but then I'm relying on my DVD recorder and my TV having the same decoder, which they likely don't.

So assuming we don't want to rely on Nintendo's emulators, the first step is to understand exactly how the 5-bit-per-channel RGB analog signal in the Super NES becomes the NTSC composite signal. Then we can compute the closest Super NES color to each NES color. Has anyone scoped this out (pun intended)?

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru » Sat Dec 11, 2010 12:49 pm

You could also try hooking both the NES and the SNES to the same TV using a cheap switch box. Sure, you won't be able to look at the images side by side, but if you make programs that fill the entire screen with a single color it should be possible to tell when they are similar enough by switching from one to the other.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Sat Dec 11, 2010 1:11 pm

I tried that before. But with a half second of picture rolling after the switch moment as the TV adjusts from one system's vblank phase to another, it's not perfect. It worked better years ago when I tried to discern the Apple II palette by eyeballing it against the 4-bit-per-channel Apple IIGS super-hi-res palette, as I could set the border to one of the Apple II colors and the inside to a solid super-hi-res color.

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen » Sat Dec 11, 2010 2:22 pm

I can easily find an RGB -> YUV formula online but according to them red and blue both go down to -.333 while yellow and cyan both go up to 1.333 when the NTSC limits it's signal to -.2 to 1.2

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Sat Dec 11, 2010 3:26 pm

We already know how an NTSC decoder decodes the NES video signal. If the Super NES PPU were strictly standard-conforming, we could just grab a palette out of any current emulator and plug those numbers into the Super NES PPU. But the hard part is figuring out how close the primaries on the Super NES PPU come to the NTSC primaries. For example, do the SMPTE color bars look the same through a Super NES as through a dedicated signal generator?

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen » Sat Dec 11, 2010 4:48 pm

I could swear I've seen better yellows than that when I've played SNES games on my 2004 Sanyo CRT.

I have noticed my 2004 Sanyo in my bedroom has bright peach skintones while the older 1998 Sayno in my parents bedroom has duller greyer looking skintones.

User avatar
Memblers
Site Admin
Posts: 3770
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: NES palette > SNES RGB555

Post by Memblers » Sat Dec 11, 2010 10:55 pm

psycopathicteen wrote: Get 2 identical CRT tvs. Same manufacturer. Same size. Same model. Same settings.
It still seems questionable though, there are plenty of analogue parts where errors are tolerated within % of difference. They might have been calibrated or re-calibrated by different people.

Since the settings aren't digital, that's the hard part.

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Post by psycopathicteen » Fri Dec 17, 2010 12:03 pm

I know there are RGB to NTSC converter chips that most new game systems use. How do those chips do pure red, yellow, cyan and blue? Do they output colors in 70% saturation, and expect you to have the saturation dial on your TV yanked up?

mkwong98
Posts: 221
Joined: Mon May 30, 2011 9:01 pm

Post by mkwong98 » Thu Jun 09, 2011 10:05 pm

How about connect them to a TV card or some digital recording equipments and compare them?

Drag
Posts: 1286
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag » Thu Jun 09, 2011 10:34 pm

It's funny you should bring this up, I've been interested in being able to generate an accurate-looking NES palette, based on what my Panasonic CRT television's colors are. I use one of the palette testing homebrews on my PowerPak to do this.

Using a straight-up YIQ -> RGB matrix will give you values that are out of RGB range. The biggest problem are colors 22 and 23, since they're the most out-of-range.

On my TV, color 22 looks like a brilliant cerulean, and color 28 is a bright marigold. Color 08 is the darkest color in the NES palette (a brown that's nearly black). Colors 3C and 2C are cyan, but 1C and 0C turn bluer and bluer as it gets darker. Color 26 is strange, it's supposed to be a bright light-red color, but it's extremely easy to make it too pink, or too orange.

Of course, just using a palette test program isn't going to give you exact accuracy, you need to play games in order to see what non-adjacent colors look like when placed next to each other. Lately, I've been using Goonies II to test some of these. :P

The problem I get when trying to use a YIQ -> RGB matrix is that color x8 is too dark. Color 18 on my TV is brighter than you'd expect, but trying to generate it with the matrix makes it too dark. 28 comes out too dark too, it doesn't look like marigold, but a dirty gold color.

Color 22 warps to purple-blue when you clip it, and color xC doesn't get bluer as it gets darker.

I figured I was just missing something, like, I don't know how to emulate the CRT's gamma curves properly, and I don't know how to clip the out-of-gamut colors (like color 22) without warping them, or causing them to lose apparent brilliance.

Heh, the funny thing is, the palette looks almost perfect when you turn the contrast (white level) way down, but then it's too dark.

Edit: Another phenomenon is that the colors in the 0x range don't mix. For example, the first three colors are straight-up blue (but with slightly different brightnesses), then there's a purple color, followed by 3 pure reds (again, with different brightnesses), and then the superdark 08 brown, and then there's a few dark pure greens, and then a nice blue (not quite cyan) from 0C. It's as though the hues break down into the most dominant color channel as the luminance goes lower. Using a YIQ->RGB matrix doesn't reflect this.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Fri Jun 10, 2011 4:34 am

One way to separate NES behavior from TV behavior is to use your Panasonic CRT television as your computer monitor. Some PCs have a TV output; others need a $30 adapter cable.

Post Reply