.pal: Difference between revisions
(fixed a couple broken links. This page needs inbound links) |
m (Special:WantedPages cleanup to make the archived copy cleaner) |
||
Line 1: | Line 1: | ||
'''.pal''' is an extension used by | '''.pal''' is an extension used by palette files for NES emulators. | ||
Palette files are required for emulation of the RGB PPUs of the VS Unisystem, PlayChoice 10, and Famicom Titler systems. | Palette files are required for emulation of the RGB PPUs of the VS Unisystem, PlayChoice 10, and Famicom Titler systems. | ||
Before [[NTSC video]] was fully understood, emulators also used palette files to translate the [[PPU]]'s HSV color values into sRGB values for the PC display. | Before [[NTSC video]] was fully understood, emulators also used palette files to translate the [[PPU]]'s HSV color values into sRGB values for the PC display. |
Revision as of 18:54, 23 April 2012
.pal is an extension used by palette files for NES emulators. Palette files are required for emulation of the RGB PPUs of the VS Unisystem, PlayChoice 10, and Famicom Titler systems. Before NTSC video was fully understood, emulators also used palette files to translate the PPU's HSV color values into sRGB values for the PC display.
Most palette files used by NES emulators are 192 bytes in size.
The .pal file MUST contain at least 64 entries, one for each of 64 NES color values. Emulators MUST ignore entries beyond the first 64.
Each entry MUST consist of three unsigned 8-bit bytes, in the order red intensity, green intensity, and blue intensity. The intensity values SHOULD represent the color used by a flat area of this NES color value, using the sRGB color space. The value 0 MUST represent black, and the highest intensity value in the file MUST represent full intensity.
A program that writes .pal files SHOULD use the range 0-255 or 0-63 depending on the emulator that will use the file. (The original VGA used only 64 intensity levels, but modern video cards use 256.)
An optional extension of the .pal format (currently only known to be supported by Nintendulator 0.965 beta) lengthens the file to 1536 bytes in order to store each palette value when colour (de-)emphasis bits are applied. For VS and PlayChoice, this is vital, as their RGB PPUs actually perform colour emphasis by forcing the specified color channels to maximum intensity.