A SNES palette questions/inquiry (possibly silly questions)

Discussion of hardware and software development for Super NES and Super Famicom. See the SNESdev wiki for more information.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: A SNES palette questions/inquiry (possibly silly questio

Post by tepples »

There are 15 colors in a sprite palette on the Super NES. Up to eight different palettes may be used at any time. Each sprite may have only one palette, but a single character may be made of more than one sprite each with its own palette.

Colors are specified in an RGB space, with each component's value ranging from 0 (least intensity) to 31 (greatest intensity). You get colors closer to gray if the components' values are close together. For example, (24, 16, 8) is a brownish gray (██████), while (31, 16, 0) is a brighter orange (██████).
User avatar
caramelpuffpuff
Posts: 64
Joined: Sat Feb 23, 2013 4:16 pm

Re: A SNES palette questions/inquiry (possibly silly questio

Post by caramelpuffpuff »

tepples wrote:There are 15 colors in a sprite palette on the Super NES. Up to eight different palettes may be used at any time. Each sprite may have only one palette, but a single character may be made of more than one sprite each with its own palette.

Colors are specified in an RGB space, with each component's value ranging from 0 (least intensity) to 31 (greatest intensity). You get colors closer to gray if the components' values are close together. For example, (24, 16, 8) is a brownish gray (██████), while (31, 16, 0) is a brighter orange (██████).
You get colors closer to gray if the components' values are close together. For example, (24, 16, 8) is a brownish gray (██████), while (31, 16, 0) is a brighter orange (██████).

Example where I get confused easily. So, there's more colors that it's not viewable in raw palette? Or, so the gray-colors mixed with other colors is PART of the entire SNES palette?
I am thinking of requesting a tutor [free] to learn NES programming in 6502 Assembly, as I am still baffled on the Bunnyboy 6504 lessons. If anyone want to help, I'm happy.
Bear in mind I may act silly or have trouble understanding, so please bear with me.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: A SNES palette questions/inquiry (possibly silly questio

Post by lidnariq »

caramelpuffpuff wrote:Example where I get confused easily. So, there's more colors that it's not viewable in raw palette? Or, so the gray-colors mixed with other colors is PART of the entire SNES palette?
The SNES, as well as many more modern computers, directly produces video in RGB. The "saturation" of a color is related to the difference between the highest number and lowest number of the three numbers that specify an RGB color. The lower the saturation, the more grayish the color is.
User avatar
caramelpuffpuff
Posts: 64
Joined: Sat Feb 23, 2013 4:16 pm

Re: A SNES palette questions/inquiry (possibly silly questio

Post by caramelpuffpuff »

lidnariq wrote:
caramelpuffpuff wrote:Example where I get confused easily. So, there's more colors that it's not viewable in raw palette? Or, so the gray-colors mixed with other colors is PART of the entire SNES palette?
The SNES, as well as many more modern computers, directly produces video in RGB. The "saturation" of a color is related to the difference between the highest number and lowest number of the three numbers that specify an RGB color. The lower the saturation, the more grayish the color is.
Oh. so the SNES 20000+ palette is in purest form, with saturation ability in them?
I am thinking of requesting a tutor [free] to learn NES programming in 6502 Assembly, as I am still baffled on the Bunnyboy 6504 lessons. If anyone want to help, I'm happy.
Bear in mind I may act silly or have trouble understanding, so please bear with me.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: A SNES palette questions/inquiry (possibly silly questio

Post by lidnariq »

caramelpuffpuff wrote:Oh. so the SNES 20000+ palette is in purest form, with saturation ability in them?
Right. The SNES provides three numbers from 0 to 31, and the three numbers correspond to red, green, and blue brightness respectively. Maybe wikipedia's article on computer palettes is helpful?
Peperocket
Posts: 20
Joined: Mon Nov 14, 2016 3:12 pm
Location: France

Re: A SNES palette questions/inquiry (possibly silly questio

Post by Peperocket »

koitsu wrote: Using mode 3 as an example: you have two backgrounds available, one which supports up to 256 colours (i.e. 256 entries in a palette), and another which supports only 16.
Hello all!

Could someone can explain to me how you can use 256 colors palette entries in mode 3 when the PPP tile map index is 3 bits only?

SNES doesn't use the 8bpp RGB color value rather palette entries?

Thanks you for any explanation.
creaothceann
Posts: 611
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany
Contact:

Re: A SNES palette questions/inquiry (possibly silly questio

Post by creaothceann »

In a 256-color-mode, the tile data for every pixel is 8 bits wide and indexes across the entire palette. Therefore PPP has no effect (except in Direct Color mode).
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: A SNES palette questions/inquiry (possibly silly questio

Post by psycopathicteen »

I just want to point out, the Wikipedia palette isn't perfectly accurate. I've played around with it with GIMP and I noticed it's not linear RGB. It might be Byuu's CRT palette but I don't know.

Anyway, I find it funny how much people criticize SNES games for having "washed out pastel colors" when they were meant to be played on a CRT.
User avatar
HihiDanni
Posts: 186
Joined: Tue Apr 05, 2016 5:25 pm

Re: A SNES palette questions/inquiry (possibly silly questio

Post by HihiDanni »

Really? I think the SNES colors look great on just about any type of display.
SNES NTSC 2/1/3 1CHIP | serial number UN318588627
Peperocket
Posts: 20
Joined: Mon Nov 14, 2016 3:12 pm
Location: France

Re: A SNES palette questions/inquiry (possibly silly questio

Post by Peperocket »

creaothceann wrote:In a 256-color-mode, the tile data for every pixel is 8 bits wide and indexes across the entire palette. Therefore PPP has no effect (except in Direct Color mode).
Great!! Thank you for your answer!
Peperocket
Posts: 20
Joined: Mon Nov 14, 2016 3:12 pm
Location: France

Re: A SNES palette questions/inquiry (possibly silly questio

Post by Peperocket »

Hello!

In mode 3, I must use an unique 256 colors palette for the two backgrounds (256 and 16 colors) or can I use 2 differents palettes?

Thanks!
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: A SNES palette questions/inquiry (possibly silly questio

Post by psycopathicteen »

Peperocket wrote:Hello!

In mode 3, I must use an unique 256 colors palette for the two backgrounds (256 and 16 colors) or can I use 2 differents palettes?

Thanks!
The 256 color background has to share colors with sprites and BG2. Of course not every color has to be used, but the 256 colors you can use for BG1 would include BG2 and sprite colors.
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: A SNES palette questions/inquiry (possibly silly questio

Post by lidnariq »

Unless, very specifically, the 8-bit layer uses the hardware R3G3B2 palette. Then you can have a different palette for the 4bpp layer and for sprites from the 8bpp layer.
Peperocket
Posts: 20
Joined: Mon Nov 14, 2016 3:12 pm
Location: France

Re: A SNES palette questions/inquiry (possibly silly questio

Post by Peperocket »

psycopathicteen wrote:
Peperocket wrote:Hello!

In mode 3, I must use an unique 256 colors palette for the two backgrounds (256 and 16 colors) or can I use 2 differents palettes?

Thanks!
The 256 color background has to share colors with sprites and BG2. Of course not every color has to be used, but the 256 colors you can use for BG1 would include BG2 and sprite colors.
Thank you for your answer. However, I don't understand this diagram:

MODE # of BGs Max Colors/Tile Palettes Colors Total

3 2 BG1:256 BG2:16 BG1:1 BG2:8 BG1:256 BG2:128


It indicated BG2 is 16 colors but talk about 8 palettes for 128 colors. Is it a mistake or must I understand BG2 can display 16 colors from the 8 first palettes?

Thanks by advance for your help.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: A SNES palette questions/inquiry (possibly silly questio

Post by tepples »

You almost have it.

The 4-bit-per-pixel (4bpp) backgrounds are are BG1 in modes 1, 2, 5, 6, and BG2 in modes 1, 2, and 3. They can display up to 120 colors from CGRAM indices 1-15, 17-31, 33-47, ..., 113-127. Each of these eight sets of 15 colors is one palette. Each map entry sets which of these eight palettes is used for that entry's pixels, allowing one tile to be reused in multiple places with different palettes. Colors 16, 32, 48, ..., and 112 are not usable on a 4bpp background, as they show the layer behind it if any, and color 0 is the backdrop.

Have you programmed NES, TG16, Genesis, Game Boy Color, or Game Boy Advance?
Post Reply