Revisiting the quest for the most accurate NES palette:
Moderator: Moderators
- Firebrandx
- Posts: 50
- Joined: Fri Aug 26, 2011 3:20 am
Revisiting the quest for the most accurate NES palette:
Some of you may recall my previous thread where I wasn't happy with any of the currently-offered NES palettes on various emulators as well as the NESRGB board. I had decided to take on the challenge to generate the most accurate palette based on the NTSC-USA front-loader NES's composite video output. While I had finalized my 'eyeballed' palette, I had intended to do a more accurate direct-measure/capture of the NES composite video output, but I didn't have the equipment at the time to do it... Well I do now, and I just finished the conversion!
So here's how I went about it:
1. NES front-loader RCA-style video output jack hooked into video capture device calibrated to NTSC color bars.
2. Test ROM loaded into the NES that fills the screen with a single palette entry (advanced to the next entry via the controller).
3. Uncompressed video recorded for several seconds of each palette entry.
4. Screen caps taken of each palette entry shown in the video.
5. Screen caps cropped to the visible color shown, and then Gaussian-blurred to average the color.*
* Part 5 had to be done because the NES doesn't display solid colors with its composite output. Instead, they appear with 'fish-netted' type interference. Here's a pic showing the original captured NES color with my Guassian-blurred single color entry next to it:
As you can see, the Gaussian blurring does a good job of approximating the intended color.
So when I got done generating the captured palette, I was quite surprised at how close my eyeball job was comparison:
I'm calling the matter finished with the direct-captured version. If you're interested in trying it out, here's the download to the .pal file:
http://www.firebrandx.com/downloads/fbx ... apture.zip
So here's how I went about it:
1. NES front-loader RCA-style video output jack hooked into video capture device calibrated to NTSC color bars.
2. Test ROM loaded into the NES that fills the screen with a single palette entry (advanced to the next entry via the controller).
3. Uncompressed video recorded for several seconds of each palette entry.
4. Screen caps taken of each palette entry shown in the video.
5. Screen caps cropped to the visible color shown, and then Gaussian-blurred to average the color.*
* Part 5 had to be done because the NES doesn't display solid colors with its composite output. Instead, they appear with 'fish-netted' type interference. Here's a pic showing the original captured NES color with my Guassian-blurred single color entry next to it:
As you can see, the Gaussian blurring does a good job of approximating the intended color.
So when I got done generating the captured palette, I was quite surprised at how close my eyeball job was comparison:
I'm calling the matter finished with the direct-captured version. If you're interested in trying it out, here's the download to the .pal file:
http://www.firebrandx.com/downloads/fbx ... apture.zip
Re: Revisiting the quest for the most accurate NES palette:
Just a small warning, most image filters on the PC fail to account for gamma.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Revisiting the quest for the most accurate NES palette:
This is great! Gonna integrate this into my graphics pipeline right away.
Re: Revisiting the quest for the most accurate NES palette:
Comparison GIF showing this new palette vs Nintendulator's palette. (The Darker one is the new one)
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: Revisiting the quest for the most accurate NES palette:
This capture card palette has a much greener dark olive ($08) than what I've seen on TVs.
Speaking of "dark olive", I might need to start a new topic about coming up with names of colors that programmers can use when communicating with artists.
Speaking of "dark olive", I might need to start a new topic about coming up with names of colors that programmers can use when communicating with artists.
Re: Revisiting the quest for the most accurate NES palette:
Wow, gray $10 looks so light. Are you sure you don't have the screen brightness too high?
nesdoug.com -- blog/tutorial on programming for the NES
- Firebrandx
- Posts: 50
- Joined: Fri Aug 26, 2011 3:20 am
Re: Revisiting the quest for the most accurate NES palette:
For me, the problem with the emulator palettes like Nestopia's YUV version is the blue-green shades on the right are far too green. I noticed it when playing the first dungeon of Zelda. They have it as pretty much half blue and half green, but the real hardware favors the blue far more than the green. I noticed this in my eyeball tests, and the capture card also detected the same thing.
Re: Revisiting the quest for the most accurate NES palette:
$08 looks kind of green like that on my LCD TV I think.tepples wrote:This capture card palette has a much greener dark olive ($08) than what I've seen on TVs.
Speaking of "dark olive", I might need to start a new topic about coming up with names of colors that programmers can use when communicating with artists.
I like the idea of agreeing on names of the colours.
I've made colour labels in my program to make it easier to remember what colour is what. I just made up names based on how they looked like in the Family BASIC CGSET chart and the Nintendulator palette. If better names was agreed on, I'd love to use those instead.
Here it is (also includes some comments of what games are using what colours):
Code: Select all
;Colour constants:
;Only the 52 unique/safe colours out of the 64 possible colours are included.
;Excluded colours are: The "forbidden greyscale" ($0D, $1D, $2D and $3D), the
;white $20 (since it's identical to $30) and all of the blacks that are
;identical to $0F (the $0E-scale, $1F, $2F and $3F).
;Colour scales goes from 0-3 (darker to lighter).
;Colour names should only be seen as a general guidance.
;For example waterblue and skyblue may both be used for water or sky,
;yellow may also contain orange and purple may contain pink and so on.
;-------------------------------------------------------------------------------
;Black and White
col_black = $0F ;classic black backdrop colour
col_white = $30 ;most commonly used white
;-------------------------------------------------------------------------------
;Grey
col_grey0 = $00 ;dark grey, DQ mountains
col_grey1 = $10 ;light grey, DQ mountains
;-------------------------------------------------------------------------------
;Blue
col_waterblue0 = $01 ;FF menu blue
col_waterblue1 = $11 ;DQ water/sky, Rockman armor (dark part)
col_waterblue2 = $21 ;FF sea, thief hair
col_waterblue3 = $31 ;FF sea
col_skyblue0 = $02
col_skyblue1 = $12 ;DQ hero blue armor
col_skyblue2 = $22 ;Super Mario Bros sky
col_skyblue3 = $32
col_plumblue0 = $03
col_plumblue1 = $13
col_plumblue2 = $23 ;Akumajou Dracula whip
col_plumblue3 = $33
col_purple0 = $04
col_purple1 = $14
col_purple2 = $24 ;Lady pink (Donkey Kong)
col_purple3 = $34 ;Akumajou Dracula whip
;-------------------------------------------------------------------------------
;Red
col_pink0 = $05
col_pink1 = $15
col_pink2 = $25 ;Lady pink (Family BASIC), cursor (Donkey Kong)
col_pink3 = $35 ;Lady skin (Family BASIC), DQ common skin
col_red0 = $06 ;Donkey Kong brown
col_red1 = $16 ;Mario red
col_red2 = $26
col_red3 = $36 ;Mario skin, FF common skin
col_yellow0 = $07
col_yellow1 = $17 ;Lady hair (Family BASIC), barrel brown (Donkey Kong)
col_yellow2 = $27 ;Samus yellow, Lady hair (Donkey Kong), DQ tree stem
col_yellow3 = $37 ;Zelda I ground, DQ desert/hill
col_brown0 = $08
col_brown1 = $18 ;FF monk hair, MetaFight bush
col_brown2 = $28 ;FF thief/monk skin, MetaFight bush
col_brown3 = $38 ;Rockman face and rockbuster beam
;-------------------------------------------------------------------------------
;Green
col_grassgreen0 = $09
col_grassgreen1 = $19 ;Luigi green, FF forest
col_grassgreen2 = $29 ;Link green (Zelda I), DQ grass, FF forest
col_grassgreen3 = $39
col_leafgreen0 = $0A ;MetaFight bush
col_leafgreen1 = $1A ;DQ tree/grass, FF grass/tree/forest
col_leafgreen2 = $2A ;Link green (Zelda II), R.O.B screen flash
col_leafgreen3 = $3A
col_bluegreen0 = $0B
col_bluegreen1 = $1B
col_bluegreen2 = $2B
col_bluegreen3 = $3B
col_turquoise0 = $0C ;DQ title screen backdrop, DQ slime
col_turquoise1 = $1C
col_turquoise2 = $2C ;FF stream, Rockman armor (light part)
col_turquoise3 = $3C
;-------------------------------------------------------------------------------
;64 Famicom colour chart:
;
; ^ Hex:
; |------------------
; | 00 10 20 30 GREY ~ WHITE
; |------------------
; | B 01 11 21 31
; | L 02 12 22 32
; | U 03 13 23 33
; | E 04 14 24 34
; |------------------
; | R 05 15 25 35
; | E 06 16 26 36 EXISTING COLORS
; H D 07 17 27 37
; U 08 18 28 38
; E------------------
; | G 09 19 29 39
; | R 0A 1A 2A 3A
; | E 0B 1B 2B 3B
; | E 0C 1C 2C 3C
; |-N----------------
; | 0D 1D 2D 3D <----- Forbidden greyscale (0D, 1D, 2D, 3D)
; | 0E 1E 2E 3E BLACK
; | 0F 1F 2F 3F
; |------------------
; v
; <-DARK-----LIGHT->
Re: Revisiting the quest for the most accurate NES palette:
Funny, I always thought of the x7 column as oranges and the x8 column as yellows.
And why are the xD grays 'forbidden' ?
And why are the xD grays 'forbidden' ?
nesdoug.com -- blog/tutorial on programming for the NES
Re: Revisiting the quest for the most accurate NES palette:
$0D has a voltage lower than black and can confuse the sync parsing in some TVs.
$1D is equal to $0F.
$2D and $3D are unavailable on 2C03 RGB PPUs, but they're so close to $00 and $10 that they're not too useful anyway.
And I too was about to assign the name "orange" to column 7 and "yellow" to column 8. I guess I need to finish my proposal and post it.
$1D is equal to $0F.
$2D and $3D are unavailable on 2C03 RGB PPUs, but they're so close to $00 and $10 that they're not too useful anyway.
And I too was about to assign the name "orange" to column 7 and "yellow" to column 8. I guess I need to finish my proposal and post it.
Re: Revisiting the quest for the most accurate NES palette:
Ninjad by Tepples about the "forbidden colours". Also any of these forbidden colours may fade into the bad $0D (if you fade by subtracting with $10) unless your fading routine is designed to work around it. So there's so many reasons not to use them I thought.dougeff wrote:Funny, I always thought of the x7 column as oranges and the x8 column as yellows.
And why are the xD grays 'forbidden' ?
I named the x7 column from col_yellow2 since it's the colour of Samus armor and it's known to be yellow. Colours are generally named after one colour in their column not their "actual colour". And for names like bluegreen and turquoise, I'm not sure which is closer to blue and which is closer to green or if they are words with identical meaning even.
- rainwarrior
- Posts: 8758
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Revisiting the quest for the most accurate NES palette:
What about the 7 emphasis states, Firebrandx?
Re: Revisiting the quest for the most accurate NES palette:
Emphasis isn't used all that much by games, pretty much a few games that run in deemphasize all colors mode for some reason, Final Fantasy 1 during battle transitions, and Noah's Ark.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
- rainwarrior
- Posts: 8758
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: Revisiting the quest for the most accurate NES palette:
We have an imcomplete list of emphasis-using games, but I would presume that a "quest for the most accurate NES palette" shouldn't ignore 87.5% of the colours it can produce just because not many games use them.