Wavebeam NES Palette for NESRGB, NT Mini, Emulators, etc

The place for all discussion on gaming hardware
tacoboy42
Posts: 30
Joined: Wed Jul 23, 2014 6:51 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by tacoboy42 »

looking good, thanks for switching that mustard/brown color looks better in SMB3 world 2 now.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Uploaded a new .pal for Wavebeam2 above. Here is the latest comparison with the new brightness balancing and adjusted hues. I tested briefly on CRT today and everything was looking great. The intense blues are finally fixed, and everything seems solid. I think I'm pretty much done with it, but I'll give it a few days before sticking a fork in it.

Image
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

Interesting how purplish your bricks are on Castlevania there. That's almost getting back to the NTSC vesus NTSC-J issue. It's the most affected color when it comes to black level differences. In NTSC-J, those bricks come out as red. In NTSC, they come out showing more purple like yours.


My own palette in this list is based on the PVM and direct-capture results, so it's not going to have that saturated flare these other palettes do. It's basically a neutral 'control subject' in these screenshots.

Your palette looks like if you took mine and FCEUX and made a reasonable 'middle ground' palette of the two. I actually like it for digital displays from what I'm seeing thus far.

The Sony Consumer palette looks definitely old-school. I just don't remember it being that saturated though. Bionic Commando and Mega Man 2 look like someone turned the saturation up a little too much.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Yea, so I included the FCEUX and Nestopia YUV since they are the main contenders on NESRGB (and two of the most popular palettes), yours for accuracy, and the Sony as an example of something altered by an NTSC decoder. I found when going through games that your palette had more hues that rang true to me so I started pushing things that way a bit. I agree the Sony is way overdriven on some values, but not nearly as bad as FCEUX at least haha. Also I think you can sometimes see what hues the developers were intending if you look for clues - for example, look at what highlights are used with the dark olive color in both Super C and Battletoads' first stage and it becomes clear it should be more green than brown. Anyway, awesome work again on the palettes, they are great baseline to have.
User avatar
Shining
Posts: 197
Joined: Mon Jan 16, 2012 6:14 pm
Location: Sweden

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by Shining »

Awesome work, both of you. So.. which palette is preferable when using a SONY consumer crt?
User avatar
xadox
Posts: 65
Joined: Thu Sep 25, 2014 8:37 am

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by xadox »

NTSC Hardware (FBX)
...This is a superb palette for PVM/BVM users, and also looks fantastic on plasma displays. Analog RGB was fed into a calibrated Sony PVM monitor, and then meticulously aligned on each color entry to match as closely as possible to the NTSC feed from an original NES. The only major exception is the blue sky color as used in Super Mario Bros. The blue voltage is out of range of analog RGB, and cannot be reproduced as a result. The color will look more 'dull' on RGB because even a maximum value of 255 in the blue channel is not enough to reproduce the same color as seen from the NTSC NES.
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

Shining wrote:Awesome work, both of you. So.. which palette is preferable when using a SONY consumer crt?
Depends on the TV. More than likely it will look like the "Consumer" palette in the comparison images. However, if it's a BVM or PVM, then it will look like "NTSC Hardware" palette.

I'm actually thinking about tweaking the consumer palette to not be so overblown as an interesting alternative. It hearkens back to the early days of my palette work when I tried to base it off my Sony HDTV.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

FBX wrote:I'm actually thinking about tweaking the consumer palette to not be so overblown as an interesting alternative. It hearkens back to the early days of my palette work when I tried to base it off my Sony HDTV.
That would be awesome. You know, I'm wondering what palette they fed into the decoder formula to get those colors in the first place. If they just picked a random NES palette that could be why some of the colors are overblown. I suppose the RGB colors you captured for Composite Direct or NTSC Hardware would need converted back to YIQ first but that shouldn't be an issue.

Taken from here:

YIQ->RGB (Sony CXA2025AS US decoder matrix)

R = Y + (1.630 * I + 0.317 * Q)
G = Y - (0.378 * I + 0.466 * Q)
B = Y - (1.089 * I - 1.677 * Q)
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

OK couldn't help but do a proof of concept. I decided to try doing the red used for the enemy uniforms in Bionic Commando since it really sticks out as much different than the other palettes (very little blue in Sony's with boosted reds). So I started with converting the Composite Direct RGB color to YIQ with this site, then plugged into formula:

SONY PALETTE RGB = 212, 30, 65
COMP. DIRECT RGB = 158, 26, 94
COMP. DIRECT YIQ = 0.287, 0.223, 0.193

R = 0.287 + (1.630 * 0.223 + 0.317 * 0.193)
G = 0.287 - (0.378 * 0.223 + 0.466 * 0.193)
B = 0.287 - (1.089 * 0.223 - 1.677 * 0.193)

R = 0.287 + (0.36349 + 0.061181)
G = 0.287 - (0.084294 + 0.089938)
B = 0.287 - (0.242847 - 0.321731)

R = 0.711671 * 255 = 181
G = 0.112768 * 255 = 29
B = 0.365884 * 255 = 93

Composite Direct - Comp. Direct w/ Sony shift - Sony Palette
Image
Image

So this may be some evidence that the Sony palette could be flawed from bad source colors. I included my work above so you guys can double check me. It would probably be much easier and less error prone to just write a program to do it, and then we'd have flexibility of trying different palettes with it too.

Edit: Also converted the Mario sky and added example, funny because it is almost identical to Wavebeam.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Programming skills to the rescue! Wrote a little app to take in a palette, convert to YIQ, then output a new palette with the Sony shift. Here is Composite Direct as processed by the Sony NTSC decoder:

Composite Direct - Composite Direct Sony Style - Sony Palette
Image

And you can download the palette right here. I still need to double check things and make sure all the math is good (there are a lot of data type conversions going on), but the app seems to line up pretty closely with the two colors I did by hand (app always truncates decimals instead of rounding up or down, need to fix that)

Edit: It's also interesting to notice that the blue push you see above in the comparison screenshots (the Zelda 1st level dungeon for instance) is NOT present on the Composite Direct Sony palette. I'm really wondering who originally created that palette and what they started with. The decoder seems to give a major red push as we probably all expected (CRTs are known for that), but it doesn't seem to be doing much to the blues.

Edit2: Fixed rounding issue and updated download link.
Last edited by nakedarthur on Wed May 10, 2017 1:22 am, edited 1 time in total.
User avatar
tjstogy
Posts: 341
Joined: Tue Sep 01, 2015 1:27 am
Location: New York

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by tjstogy »

Incredible work!! Thanks so much. Combining FBX's palette with the Sony decoder is really the sweet spot! Prob my fav palette of the bunch, but this is just from looking at it on a computer screen so far. I'd say you can safely replace the overdriven Sony one with the new Sony one, since whoever originally made it used an arbitrary palette to begin with :)

Edit: arthur have you tried a/b-ing this in RGB with a composite (unmodded) NES on your consumer Sony? I'd be interested to see how close they are...
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Thanks! No problem, it's fun :)

I haven't messed with it on a CRT at all yet, I think I might have some time tomorrow though. That would definitely be good comparison. I'm actually not sure which IC is in my TV, but I'll check the service manual and see. If it is the same it will be the ultimate comparison :)

So I'm thinking for next NESRGB firmware I'll probably do Wavebeam2, Composite Direct (Sony Style), and NTSC Hardware. Funny because the original Sony palette was much brighter than Wavebeam, but I think Wavebeam is now actually the brightest option.

That said, I'm sure FBX will have some bones to pick with the new Sony palette. Both the yellow and the green for Link are very very red. I'm not sure if it's supposed to be like that or not. I will go back through the code and check everything, but I'm pretty sure its accurate. I actually didn't grow up with Sony TVs so it's a little foreign to me. Perhaps we could always customize a few colors..
User avatar
tjstogy
Posts: 341
Joined: Tue Sep 01, 2015 1:27 am
Location: New York

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by tjstogy »

Awesome. Yeah...One has to wonder, if they used such an arbitrary palette to begin with, how accurate the decoder formula is as well. And who knows what TV's this decoder was even on... it could have been like only from 1983 Sonys or something.
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

Yeah the Bionic Commando bricks don't look quite right. I'm thinking more of borrowing elements from the Sony palette and doing a mash-up, but we'll see after I finish my commission work.
User avatar
xadox
Posts: 65
Joined: Thu Sep 25, 2014 8:37 am

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by xadox »

You guys never get finished :D
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Alright, so I had some time today to double check the code. I made a test where I converted the YIQ back to RGB just to verify everything was working on that end and the resulting palette was only 1 off max for each RGB value (to be expected from lossy conversion). With that out of the way I started looking at the Sony formula again. I found another website with some good info (lost link for now but I'll find it), but it had the following formulas:

YIV -> RGB (FCC sanctioned decoder matrix)
R = Y + 0.946882 * I + 0.623557 * Q
G = Y - 0.274788 * I - 0.635691 * Q
B = Y - 1.108545 * I + 1.709007 * Q

YIV -> RGB (Sony CXA2025AS US decoder matrix)
R = Y + 1.630 * I + 0.317 * Q
G = Y - 0.378 * I - 0.466 * Q
B = Y - 1.089 * I + 1.677 * Q

So it was illuminating to see it's the same general formula, it's just the values that are tweaked for each set. This got me thinking, if we had the exact YIQ values for each color in the NES, and the decoder matrix's for a bunch of different types of TVs you should be able to very closely reproduce them. I think FBX's Composite Direct is probably very close, but there are many values in the palette that are out of range of RGB, and we'd want to keep those in the calculations until the very last step when it's finally converted to RGB. Of course there's the problem of finding someone with a vectorscope to get the YIQ values, as well as digging up more documentation on ICs, but it's not impossible.

FBX - I saw on an old post of yours you were talking to an electrical engineer about getting the values from a vectorscope, anything ever come of that?

Anyhow, one difference I noticed with the first Sony formula I was using is that the Blue calculation had a - where a + should be so I fixed that. It didn't seem to make any noticeable difference to the palette, but I went ahead and updated the link above with the latest to be safe. Also, I did play around with it a bit, it seems to be the 1.630 value in the R calculation that's turning the yellow reddish. I think it is correct as far as the TV is concerned.
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

nakedarthur wrote: FBX - I saw on an old post of yours you were talking to an electrical engineer about getting the values from a vectorscope, anything ever come of that?
We tried it out on the bottom darkest colors as a test, and the values came out ridiculously oversaturated. They were roughly the same hue as my own work, just so overblown as to be unusable.
User avatar
Link83
Posts: 343
Joined: Tue May 21, 2013 2:39 am

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by Link83 »

I'm glad you decided to look into the Sony CXA2025AS palette, as its always troubled me that we dont really have any information about where it came from, or how they arrived at those values.

I am curious though why the brick color in Bionic Commando look so different with the Composite Direct 'Sony Style' palette though? The bricks on Composite Direct and the Sony CXA2025AS palettes look reasonably similar, but the Composite Direct 'Sony Style' palette looks quite different.

I would also be curious to see how NTSC Hardware and PVM Style D93 would look with the Sony decoder calculations applied? (I feel the PVM Style D93 palette needs more love! Its nice to see a palette that finally takes the NTSC-J differences into account)
Last edited by Link83 on Wed May 10, 2017 6:01 pm, edited 1 time in total.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Link83 wrote:I'm glad you decided to look into the Sony CXA2025AS palette, as its always troubled me that we dont really have any information about where it came from, or how someone arrived at those values.

I am curious though why the brick color in Bionic Commando look so different with the 'Sony style' palette though? The bricks on Composite Direct and the Sony CXA2025AS palettes look reasonably similar, but the Composite Direct 'Sony style' palette looks quite different.

I would also be curious to see how NTSC Hardware and PVM Style D93 would look with the Sony decoder calculations applied? (I feel the PVM Style D93 palette needs more love! Its nice to see a palette that finally takes the NTSC-J differences into account)
I've played around with it a bit, and I think it has to do with the relationship between the primaries. If you boost the blue channel on that color a bit before decoding then the red isn't so strong. It's hard to say what's right without having a TV with the same exact chip to compare to though. NTSC Hardware looks very similar btw. I'd like to see what straight YIQ looks like without being converted to RGB first, but outside of using a scope I think the only way is to write a color synthesizer like bisqwit's. I'm looking into that now as an alternative, I'll let you know if I have any progress.
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

I got bisqwit's color synthesizer ported over this evening. It's kind of interesting, the NES doesn't actually store its colors in memory like other consoles. When it outputs a color it uses a process to generate the hue and luminance based off squarewaves. This synthesizer basically recreates that process in code. I exported the synthesized YIQ palette to RGB in two different ways, the standard FCC decoder and the Sony decoder. I haven't messed with gamma and some other settings yet so it could still be improved. It's very interesting though that this looks closer to FBX's palette decoded with the Sony matrix than the official one I've been questioning...

You can download the Sony version of the synthesized palette if you're brave.

FCC - Sony
Image
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

That FCC one looks a heck of a lot like my PVM-based "NTSC Hardware" work.
User avatar
FBX
Posts: 2348
Joined: Wed Feb 18, 2015 10:18 am
Location: DFW area, Texas
Contact:

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by FBX »

Got a severe lecturing in email this morning from someone upset that I gave up without doing a Sony palette. So I fleshed one out today, and it's looking pretty darn close to my Sony set thus far. Here are some screen samples:

Image

And here's the wip link if you're interested in seeing what I've got done on it:

http://www.firebrandx.com/downloads/son ... bx-wip.zip


.
User avatar
xadox
Posts: 65
Joined: Thu Sep 25, 2014 8:37 am

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by xadox »

I gets quiet here :)
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

xadox wrote:I gets quiet here :)
I finished Wavebeam, but I was waiting for the updated NESRGB firmware from Tim before making an official announcement. I will update when I hear back from him. For everyone else, you can grab the final .pal from the site right now. All the screenshot comparisons there have been updated as well.

My palette days aren't completely over yet though. I'm still working on the NTSC decoder app I mentioned above, and have a few cool things in the works with it. It's still a little too early to talk about it yet though. Unfortunately progress has been much slower than I anticipated due to busy work schedule and illness.
User avatar
werk91
Posts: 395
Joined: Sun Jun 17, 2012 12:22 am
Location: UK

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by werk91 »

I will be getting my Famicom AV modded for RGB as soon as that NESRGB firmware is available with the updated Wavebeam pallette. Found a nice modder who doesn't mind flashing FW with any pallete combination for me. Good job nakedarthur and FBX! The combination of Wavebeam, NTSC Hardware and the Sony pallete seems the best to me for all displays. How well does the Sony palette do on digital displays btw?
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

werk91 wrote:I will be getting my Famicom AV modded for RGB as soon as that NESRGB firmware is available with the updated Wavebeam pallette. Found a nice modder who doesn't mind flashing FW with any pallete combination for me. Good job nakedarthur and FBX! The combination of Wavebeam, NTSC Hardware and the Sony pallete seems the best to me for all displays. How well does the Sony palette do on digital displays btw?
Awesome, thanks! I think the Sony palette works equally well on digital and CRT. Some of the colors are a little overblown as we discussed above, but it's a fun alternative and still better than FCEUX.
vaanen
Posts: 8
Joined: Sun Jun 18, 2017 6:55 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by vaanen »

Hello, first of all thank you for your work ! I wanted to know, how is it going ? I'm holding off my purchase of the NESRGB just to get the latest version because it looks so good:)
User avatar
xadox
Posts: 65
Joined: Thu Sep 25, 2014 8:37 am

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by xadox »

nakedarthur wrote:I finished Wavebeam, but I was waiting for the updated NESRGB firmware from Tim before making an official announcement...
Any update from Tim?
User avatar
nakedarthur
Posts: 218
Joined: Tue Jul 21, 2015 8:20 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by nakedarthur »

Sorry guys, no update from Tim yet on the NESRGB firmware. I saw over in FBX's thread he's looking into a problem for him, so I'm guessing when he gets around to NESRGB stuff he will take care of both. I will update the thread as soon as I hear back.

I made a few more tweaks to the palette recently by the way, so be sure to grab the latest .pal from the site if you're playing on Analogue NT, Raspberry Pi, emulator, etc. I also made a video showing off natural gameplay:

https://www.youtube.com/watch?v=jLb8mYEkUR8
vaanen
Posts: 8
Joined: Sun Jun 18, 2017 6:55 pm

Re: Wavebeam NES CRT Palette for NESRGB, Analogue NT, etc

Post by vaanen »

nakedarthur wrote:Sorry guys, no update from Tim yet on the NESRGB firmware. I saw over in FBX's thread he's looking into a problem for him, so I'm guessing when he gets around to NESRGB stuff he will take care of both. I will update the thread as soon as I hear back.

I made a few more tweaks to the palette recently by the way, so be sure to grab the latest .pal from the site if you're playing on Analogue NT, Raspberry Pi, emulator, etc. I also made a video showing off natural gameplay:

https://www.youtube.com/watch?v=jLb8mYEkUR8
Okok, in any case i can't wait ! The NTSC Original palette + Wavebeam + sony combo should be the default palettes coming on NESRGB, they're so much better !
Post Reply