PAL / SECAM gamut palette test
Moderator: Moderators
PAL / SECAM gamut palette test
I started thinking about what would constitute an accurate palette from PAL / SECAM gamut space.
This test is directly from the hardware capable PAL gamut, at 12 equal steps along the possible range.
Row 10 ~ 1F is PAL gamut:
xR-0.64
yR-0.33
xG-0.29
yG-0.60
xB-0.15
yB-0.06
White point D65 (X0.3127, Y0.329)
Then row 0, 2 & 3 are luminance steps based on row 1.
This palette also includes a hack for getting a better 00 ~ 30, 0D~3D range. Reckless!! Use at own risk
Attached is the PAL gamut palette in .aco, .act & .pal formats.
I think I have the .pal file laid out correctly, but not really sure how to convert for FCEUX to test out. If anyone can help?
This test is directly from the hardware capable PAL gamut, at 12 equal steps along the possible range.
Row 10 ~ 1F is PAL gamut:
xR-0.64
yR-0.33
xG-0.29
yG-0.60
xB-0.15
yB-0.06
White point D65 (X0.3127, Y0.329)
Then row 0, 2 & 3 are luminance steps based on row 1.
This palette also includes a hack for getting a better 00 ~ 30, 0D~3D range. Reckless!! Use at own risk
Attached is the PAL gamut palette in .aco, .act & .pal formats.
I think I have the .pal file laid out correctly, but not really sure how to convert for FCEUX to test out. If anyone can help?
- Attachments
-
- NES-SECAMPALHK.zip
- (6.25 KiB) Downloaded 269 times
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: PAL / SECAM gamut palette test
Why would you do this? If it's intended for use in an emulator it'll just make games that use $20 as white look dull. If it's intended for use in making NES graphics, those colours aren't going to work on the real thing.hawken wrote:This palette also includes a hack for getting a better 00 ~ 30, 0D~3D range. Reckless!! Use at own risk
The .pal file should have 64 x 3-byte RGB entries (or 512 if including emphasis), so either 192 or 1536 bytes. I don't know how you arrived at 631 bytes.hawken wrote:I think I have the .pal file laid out correctly, but not really sure how to convert for FCEUX to test out. If anyone can help?
Re: PAL / SECAM gamut palette test
There is possibly, maybe some utility to having a "standardized" copy of the UM6559 SECAM generator palette, given how much it differs from the standard palette...
Re: PAL / SECAM gamut palette test
(theoretically it's just a luminance ramp, $20 was "meant" to be light grey. Would be interesting to know how it came out on actual PAL / SECAM sets with their differing chrominance. As shown above, $20 is a light grey on SECAM - although that might be the machine - I imagine artists went for $30 as white?)rainwarrior wrote:Why would you do this? If it's intended for use in an emulator it'll just make games that use $20 as white look dull. If it's intended for use in making NES graphics, those colours aren't going to work on the real thing.hawken wrote:This palette also includes a hack for getting a better 00 ~ 30, 0D~3D range. Reckless!! Use at own risk
Can take these out of the final .pal, this is just a test.
The .pal file is output from ASEprite (64 lines plus header), I may be out of my depth here but why does FCEUX need .pal in 8bit colour space?rainwarrior wrote:The .pal file should have 64 x 3-byte RGB entries (or 512 if including emphasis), so either 192 or 1536 bytes. I don't know how you arrived at 631 bytes.hawken wrote:I think I have the .pal file laid out correctly, but not really sure how to convert for FCEUX to test out. If anyone can help?
Last edited by hawken on Sun Mar 05, 2017 10:26 pm, edited 1 time in total.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: PAL / SECAM gamut palette test
Opening it with a hex editor I discovered it's a "JASC-PAL" format. Never heard of this one before, but it looks like a simple text file containing a list of decimal triples.hawken wrote:The .pal file is output from ASEprite (64 lines plus header), is there a utility that can convert to the way FCEUX needs it?
Apparently there's also a Microsoft .pal format that's different.
Anyhow, no I don't know of any converter tool, but you could write a converter in python or some other convenient language in probably like 20 lines.
Re: PAL / SECAM gamut palette test
I'm pretty certain the UM6559 palette (that link) should just be considered Wrong™.hawken wrote:As shown above, $20 is a light grey on SECAM - although that might be the machine - I imagine artists went for $30 as white?)
In the 2C02/2C07, colors $00 $10 $20 $30 are "1 2 3 3" and colors $0d $1d $2d $3d are "-1 0 1 2" (and colors $0e $1e $2e $3e $0f $1f $2f $3f all "0"), but in the UM6559 all four columns/rows are "0 1 2 3"
Then it's also very similar to GIMP's and Fractint's palette formats too, and trivially converted to a PPM (type "P3") image.rainwarrior wrote:Opening it with a hex editor I discovered it's a "JASC-PAL" format. Never heard of this one before, but it looks like a simple text file containing a list of decimal triples.
Re: PAL / SECAM gamut palette test
Those are the two most common .pal formats, FCEUX is customrainwarrior wrote:Opening it with a hex editor I discovered it's a "JASC-PAL" format. Never heard of this one before, but it looks like a simple text file containing a list of decimal triples.hawken wrote:The .pal file is output from ASEprite (64 lines plus header), is there a utility that can convert to the way FCEUX needs it?
Apparently there's also a Microsoft .pal format that's different.
Thanks I'll look in to converting to 8bit colour space 3-byte. The FCEUX .pal files are a little confusing (at least to me) in a text editor as there's 12 rows of 8 entries (96 entries) [edit: ah I get it]. Also does anyone know why do they need to be in 8bit colour space?
Last edited by hawken on Sun Mar 05, 2017 10:50 pm, edited 4 times in total.
Re: PAL / SECAM gamut palette test
Jasc palette files seem to originate from JASC PSP, and not a Sony PSP!
Re: PAL / SECAM gamut palette test
Could this be considered a "fix"?lidnariq wrote:
In the 2C02/2C07, colors $00 $10 $20 $30 are "1 2 3 3" and colors $0d $1d $2d $3d are "-1 0 1 2" (and colors $0e $1e $2e $3e $0f $1f $2f $3f all "0"), but in the UM6559 all four columns/rows are "0 1 2 3"
I'll edit the .pal so that it conforms to 2C02/2C07 luminance shifting, could this be considered a "bug"?
Would be interesting to know what the true intention of these $00 ~ $30, $0D ~ $3D were meant to be... I'm totally up for making a palette that conveyed the true intentions of the original hardware.
Last edited by hawken on Sun Mar 05, 2017 10:52 pm, edited 1 time in total.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: PAL / SECAM gamut palette test
It's a very simple and natural format used by other NES emulators, though. It's not intended for anything but NES palettes, e.g. there's no header to say how many entries there are supposed to be, because there's only one way to do it, really. I don't think it originated with FCEUX, either.hawken wrote:Those are the two most common .pal formats, FCEUX is custom
Oh, so the idea is based on some particular piece of Dendy clone hardware?hawken wrote:As shown above, $20 is a light grey on SECAM - although that might be the machine
In NES games, no, not really. $20 and $30 are supposed to be the same white, and there are practical reasons why you might want to use $20 instead of $30. The main one I can think of is that it makes fading out look more natural when white doesn't persist for an extra step of the fadeout.hawken wrote:I imagine artists went for $30 as white?)
Some games prefer $30, some prefer $20. (Some appear to use both, e.g. Jaws.)
Last edited by rainwarrior on Sun Mar 05, 2017 10:44 pm, edited 1 time in total.
Re: PAL / SECAM gamut palette test
Ah good pointrainwarrior wrote:In NES games, no, not really. $20 and $30 are supposed to be the same white, and there are practical reasons why you might want to use $20 instead of $30. The main one I can think of is that it makes fading out look more natural when white doesn't persist for an extra step of the fadeout.
Re: PAL / SECAM gamut palette test
It also allows for a slight dim of all palete but whites in, for example, a "P A U S E" sign. If you use $20 in the game and $30 to paint the sign you can dim the whole palette retaining pure white.
Re: PAL / SECAM gamut palette test
I was reading a bit about what "official" games were allowed to use and Jaws is a pretty rare case, apparently developers were asked not to use $30 because it caused problems with some CRT sets as it was "whiter than white" - indeed games would be rejected by Nintendo if they used #30. The same went for $0d as it was "blacker than black" (not sure what damage that could do though). $e & $f range were not allowed either.
Having trouble converting this for FCEUX (as it requires 8bit colour depth), which this is not. The quest ends here
Having trouble converting this for FCEUX (as it requires 8bit colour depth), which this is not. The quest ends here
Last edited by hawken on Thu Mar 09, 2017 8:04 pm, edited 1 time in total.
Re: PAL / SECAM gamut palette test
Where did you get this information? I don't think I've ever heard this before...hawken wrote:apparently developers were asked not to use $30 because it caused problems with some CRT sets as it was "whiter than white" - indeed games would be rejected by Nintendo if they used #30.
Blacker than black is a well known issue... It doesn't cause any actual damage, but some TV mistake this color for sync signals, distorting the picture or causing it to "roll".The same went for $0d as it was "blacker than black" (not sure what damage that could do though).
Again, never heard of this. $0f is widely used for black in homebrew games.$e & $f range were not allowed either.
- rainwarrior
- Posts: 8735
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Re: PAL / SECAM gamut palette test
I don't know what your sources are for this but they're completely bogus. (If you'd care to share the source, I'm sure there's people here who wouldn't mind correcting them.)hawken wrote:I was reading a bit about what "official" games were allowed to use and Jaws is a pretty rare case, apparently developers were asked not to use $30 because it caused problems with some CRT sets as it was "whiter than white" - indeed games would be rejected by Nintendo if they used #30. The same went for $0d as it was "blacker than black" (not sure what damage that could do though). $e & $f range were not allowed either.
Having trouble converting this for FCEUX as it requires 8bit colour depth, which this is not. The quest ends here
Again, $30 is the same as $20 by design, so this "whiter than white" idea makes no sense.
Super Mario Bros. uses $0F for black, and $30 for white. (So do a lot of games.) I'm certain that $0E is acceptable too, but I don't have a common example offhand.
I mentioned Jaws only as a weird case that I happened to notice uses both $20 and $30 on the same screen.
Nintendo didn't really have a way to test for and reject $0D either. For example, the common TMNT uses $0D and it made it through all licencing tests and was one of the highest selling games for the system. It doesn't use large amounts of it on the screen, just for sprite outlines, so I don't think it tends to cause the common desync problems, but my point is I don't believe they did any sort of categorical test for the use of $0D.