Why only 52 colors instead of 256?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

tepples
Posts: 21943
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Why only 52 colors instead of 256?

Post by tepples » Tue Jun 13, 2017 11:43 am

But then some video output amplifiers are affected by slope overload or slew rate. When the output signal has a maximum slope, large changes in voltage take longer than small changes. Passing a square wave through an amplifier with a slew rate turns the rises and falls into trapezoids, adding effective group delay proportional to the square wave's amplitude. Thus when the chroma amplitude of $28 is greater than that of color burst, the amplifier shifts the phase to a greater extent.

Code: Select all

  ___________             ___________             ____
 |           |           |           |           |
_|           |___________|           |___________|
Signal with amplitude 2 lines

   __________              __________              ___
 :/          \           :/          \           :/
_/           :\__________/           :\__________/
Limited to 1 line of rise per character of run
Carrier delayed by 1 character

  ___________             ___________             ____
 |           |           |           |           |
 |           |           |           |           |
 |           |           |           |           |
 |           |           |           |           |
 |           |           |           |           |
_|           |___________|           |___________|
Signal with amplitude 6 lines

       ______                  ______
 :    /      \           :    /      \           :
 :   /       :\          :   /       :\          :   /
 :  /        : \         :  /        : \         :  /
 : /         :  \        : /         :  \        : /
 :/          :   \       :/          :   \       :/
_/           :    \______/           :    \______/
Limited to 1 line of rise per character of run
Carrier delayed by 3 characters
If group delay causes clockwise phase rotation, that might explain why $28 in Dr. Mario pills looks yellow.

The asymmetry of NMOS increases this possibility for delay as well. An NMOS output driver can pull down faster than it can pull up. This tends to widen black vertical lines on white backgrounds, narrow white vertical lines on black backgrounds, and make delay at 3.58 MHz even greater.

Code: Select all

 :         ,'\           :         ,'\           :
 :       ,'  :\          :       ,'  :\          :
 :     ,'    : \         :     ,'    : \         :
 :   ,'      :  \        :   ,'      :  \        :   ,
 : ,'        :   \       : ,'        :   \       : ,'
_,'          :    \______,'          :    \______,'
Limited to rise rate 1/2, fall rate 1

lidnariq
Posts: 9297
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: Why only 52 colors instead of 256?

Post by lidnariq » Tue Jun 13, 2017 12:45 pm

The 2C02/2C07 and subsequent hardware is not slew-rate limited (the output stage is a resistor ladder and an analog multiplexer). Slew-rate limitations only happen when there's a feedback path (clamping and integration, or a digital stage) in the generation; the NES's video output stage is "just" a series of lowpass filters, highpass filters, and discrete amplifiers with bandwidth substantially higher than needed. (And, to head that off: even if these discrete amplifiers weren't higher bandwidth than needed, they would just become another lowpass filter)

What is true is that the DAC used in the 2C02/2C07 is effectively a voltage-controlled filter, producing a slightly different delay depending on the specific tap used, and in turn, a slightly different hue angle as the brightness changes. However, entertaining this level of precision means that any given column of the master palette isn't a constant hue: it is still incorrect to say that "2C02 phase $x8 is yellow".

User avatar
Bregalad
Posts: 7872
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why only 52 colors instead of 256?

Post by Bregalad » Tue Jun 13, 2017 11:11 pm

Your dislike for the 2600 is very clear, but there's just no denying that 15 hues at 8 brightness levels is objectively better than 12 hues at 4 brightness levels.
Indeed - and I had absolutely no idea the 2600 had such an "advanced" palette. I assumed you were saying that it was supperior to the NES because it had not fully saturated colours or something in the like.

Also - I'm sorry to insist but 2600 looks awful no matter whether you look by today or back then standards. Even the post you linked to look awfull. I grew up with a PC and a Playstation 1, but the NES graphics are no problem to me, even in the earliest games. Sure they might not look great but they didn't directly interfere with the development of games. 2600 graphics did.

NES palette is hardly a problem, sure it is limited but I don't remember to ever have the problem that I needed a colour that wasn't in the palette. If that was the case I just pick the closest one and that's the end of the story.

User avatar
tokumaru
Posts: 11646
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Why only 52 colors instead of 256?

Post by tokumaru » Wed Jun 14, 2017 1:18 am

Bregalad wrote:Even the post you linked to look awfull.
That link was mostly for the Intellivision stuff. Have you ever seen what Intellivision graphics from back in the day looked like? Alp's work is in a completely different level. I can't say for sure that he followed every restriction imposed by the hardware accurately because I'm not very familiar with the Intellivision, but if he did, that'd be one very impressive game!

Alp's version of Cat Quest for the 2600 looks pretty good to me too, but tiled backgrounds are a real challenge on the 2600, I'll give you that. Any attempt at detailed tiled backgrounds will look extra chunky, no way around that. I wouldn't personally go that route, I'd rather use the blocky playfield pixels to draw the basic layout of the backgrounds but use objects (players, missiles, ball, whatever is available) for any details that are necessary, even if the details end up being somewhat sparse.
I grew up with a PC and a Playstation 1, but the NES graphics are no problem to me, even in the earliest games. Sure they might not look great but they didn't directly interfere with the development of games.
Of course the graphics interfered with the development of games on the NES! There's stuff the NES cannot do, so it wasn't done, just as is the case with the 2600. The NES, being newer, can do more than the 2600, but its limitations are also pretty harsh.

BTW, I'm not trying to make anyone like the 2600. There's plenty of stuff I don't like that I don't want people trying to convince me to change my mind. If you don't like it, that's fine, I totally see where you're coming from, considering that lots of 2600 games look (and play!) absolutely terrible. My only reason for bringing it up here was its color palette, which's undeniably broader than the NES'.
NES palette is hardly a problem, sure it is limited but I don't remember to ever have the problem that I needed a colour that wasn't in the palette. If that was the case I just pick the closest one and that's the end of the story.
Indeed, it's not such a terrible problem at all. And I honestly believe there's no point in complaining about this or that characteristic of retro consoles, because they are what they are and there's nothing we can do about that. If something bothers someone that much, they should just go work with another platform. But I still think it's fun to analyze WHY things are how they are and imagine how they could have been if different choices had been made, but just as a fun exercise, not as an attempt to actually "fix" anything or badmouth the people responsible for the existing designs.

User avatar
rainwarrior
Posts: 7803
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why only 52 colors instead of 256?

Post by rainwarrior » Wed Jun 14, 2017 2:18 am

tokumaru wrote:Yeah, they certainly screwed up the PAL 2600 palette (not nearly as badly as with the SECAM version, WTF is up with that?!?)
98874793.jpg
GOOD GRIEF, SECAM!

na_th_an
Posts: 554
Joined: Mon May 27, 2013 9:40 am

Re: Why only 52 colors instead of 256?

Post by na_th_an » Wed Jun 14, 2017 5:55 am

As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.

psycopathicteen
Posts: 2923
Joined: Wed May 19, 2010 6:12 pm

Re: Why only 52 colors instead of 256?

Post by psycopathicteen » Wed Jun 14, 2017 8:30 am

I just noticed that the NTSC color signal has the colors in MBCGYR order instead of the more common RYGCBM order.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Why only 52 colors instead of 256?

Post by FrankenGraphics » Wed Jun 14, 2017 8:47 am

na_th_an wrote:As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.
There is actually a solution to this, of sorts, at a cost.

1)Set all emphasis bits to 1.
2)Adjust your subpalettes to be brighter, except the darks you want to use.
3)Et voilà!

-The 'bright pastels' can actually become more useful this way, depending on application, as half-desaturated mid-brights.
-Depending on how you look at it, the washed-out effect it has can be viewed as a downside or unique feature of style. It is a bit more Commodore 64-esque.
-The biggest downsides are there's no pure white any more, and that you can't mix and match with non-damped colours.
-But you can, with some limitation and unless i'm missing something, decide per scanline (for example keep full saturation and use white in the status bar and damp the scenery, or vice versa).
http://www.frankengraphics.com - personal NES blog

psycopathicteen
Posts: 2923
Joined: Wed May 19, 2010 6:12 pm

Re: Why only 52 colors instead of 256?

Post by psycopathicteen » Wed Jun 14, 2017 11:39 am

FrankenGraphics wrote:
na_th_an wrote:As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.
There is actually a solution to this, of sorts, at a cost.

1)Set all emphasis bits to 1.
2)Adjust your subpalettes to be brighter, except the darks you want to use.
3)Et voilà!

-The 'bright pastels' can actually become more useful this way, depending on application, as half-desaturated mid-brights.
-Depending on how you look at it, the washed-out effect it has can be viewed as a downside or unique feature of style. It is a bit more Commodore 64-esque.
-The biggest downsides are there's no pure white any more, and that you can't mix and match with non-damped colours.
-But you can, with some limitation and unless i'm missing something, decide per scanline (for example keep full saturation and use white in the status bar and damp the scenery, or vice versa).
The only way that could work is if you're making a "dark forest" level.

User avatar
Alp
Posts: 220
Joined: Mon Oct 06, 2014 12:37 am

Re: Why only 52 colors instead of 256?

Post by Alp » Wed Jun 14, 2017 12:04 pm

tokumaru wrote: That link was mostly for the Intellivision stuff. Have you ever seen what Intellivision graphics from back in the day looked like? Alp's work is in a completely different level. I can't say for sure that he followed every restriction imposed by the hardware accurately because I'm not very familiar with the Intellivision, but if he did, that'd be one very impressive game!

Alp's version of Cat Quest for the 2600 looks pretty good to me too, but tiled backgrounds are a real challenge on the 2600, I'll give you that. Any attempt at detailed tiled backgrounds will look extra chunky, no way around that. I wouldn't personally go that route, I'd rather use the blocky playfield pixels to draw the basic layout of the backgrounds but use objects (players, missiles, ball, whatever is available) for any details that are necessary, even if the details end up being somewhat sparse.
Thanks! ...and yeah, I did follow every hardware restriction, and the game was impressive (so I hear). PM sent.

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Why only 52 colors instead of 256?

Post by FrankenGraphics » Wed Jun 14, 2017 12:33 pm

psycopathicteen wrote:
FrankenGraphics wrote:
na_th_an wrote:As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.
There is actually a solution to this, of sorts, at a cost.

1)Set all emphasis bits to 1.
2)Adjust your subpalettes to be brighter, except the darks you want to use.
3)Et voilà!

-The 'bright pastels' can actually become more useful this way, depending on application, as half-desaturated mid-brights.
-Depending on how you look at it, the washed-out effect it has can be viewed as a downside or unique feature of style. It is a bit more Commodore 64-esque.
-The biggest downsides are there's no pure white any more, and that you can't mix and match with non-damped colours.
-But you can, with some limitation and unless i'm missing something, decide per scanline (for example keep full saturation and use white in the status bar and damp the scenery, or vice versa).
The only way that could work is if you're making a "dark forest" level.

It also worked rather well in the firefly demo. Assuming you don't need to move the band, you could design your stage so that an upper or lower segment, or both, is/are damped and keep the main field of play bright. It could be pretty impressive if done right. A cave, the sewers, underwater...
http://www.frankengraphics.com - personal NES blog

User avatar
rainwarrior
Posts: 7803
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why only 52 colors instead of 256?

Post by rainwarrior » Wed Jun 14, 2017 12:44 pm

FrankenGraphics wrote:1)Set all emphasis bits to 1.
psycopathicteen wrote:The only way that could work is if you're making a "dark forest" level.
It also worked rather well in the firefly demo.
We actually have a list of games that do it:
https://wiki.nesdev.com/w/index.php/Col ... asis_games

User avatar
Bregalad
Posts: 7872
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Why only 52 colors instead of 256?

Post by Bregalad » Wed Jun 14, 2017 11:40 pm

na_th_an wrote:As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.
Actually, a very clever use of black colour has always been the key to good NES graphics, I've noticed. Although not always the case, black is typically the BG colour, so it comes for free in any BG palette, and a correct use of black allow to link different coloured areas well.

User avatar
rainwarrior
Posts: 7803
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Why only 52 colors instead of 256?

Post by rainwarrior » Thu Jun 15, 2017 1:18 am

Bregalad wrote:
na_th_an wrote:As a pixel artist, I wish I had more dark shades to work with. Creating dark graphics usually ends up with tons of pitch black on screen as dithering looks awful.
Actually, a very clever use of black colour has always been the key to good NES graphics, I've noticed. Although not always the case, black is typically the BG colour, so it comes for free in any BG palette, and a correct use of black allow to link different coloured areas well.
Speaking of which, I just randomly stumbled onto the game Knight Rider. Not a very good game but it has two portraits that I thought were very nicely done, BG only no sprites:
knight_rider_portraits.png
knight_rider_portraits.png (11.38 KiB) Viewed 2401 times

6502freak
Posts: 92
Joined: Sun Dec 07, 2008 1:11 pm

Re: Why only 52 colors instead of 256?

Post by 6502freak » Mon Jun 26, 2017 12:59 pm

Bregalad wrote:I grew up with a PC and a Playstation 1, but the NES graphics are no problem to me, even in the earliest games. Sure they might not look great but they didn't directly interfere with the development of games. 2600 graphics did.
I think if there is one system whose graphics capabilities haven't aged well, it is the Playstation 1. Lack of sub-pixel accuracy and affine texture mapping with 15-bit color dithering might be quite off-putting for a modern gamer, contrary to the more simple, but clean NES graphics.

Concerning the 2600: you got the philosophy wrong. Designing a game with this machine is all about making deliberate choices as a top-notch 6502 coder. ;) It's a zen-like challenge.

Post Reply