NTSC CVSB Question

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

Moderator: Moderators

Post Reply
Brovidio
Posts: 6
Joined: Wed Dec 02, 2020 10:34 am

NTSC CVSB Question

Post by Brovidio » Wed Dec 02, 2020 10:59 am

I apologize if this topic has been beaten to death, I’m just trying to wrap my head around it.

Like any encoded format, Composite Video could not exist without specifications detailing how it should be encoded and decoded.

If provided with a clean signal, how could there be ambiguity in how to properly decode it with respect to a specific standard?

Wouldn’t it be a simple this-means-that operation?

I understand different standards exists, but there should only be one proper way to decode the signal per standard.

When it comes to the NES, I realize that the signal coming out of it is not perfect, but by knowing what is permitted by the encoding standards, wouldn’t it be possible to infer what the PPU is TRYING to generate?

Unless people are trying to reproduce the imperfections of the various decoder chips in CRTs, I don’t see how there’s so much ambiguity in the NES palettes.

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

Re: NTSC CVSB Question

Post by tepples » Wed Dec 02, 2020 12:01 pm

There are at least two dimensions of difference:
  1. The values fed from the palette into the PPU's DAC vs. the DAC's actual response. In the process used, rises are slower than falls especially at higher signal levels, which noticeably affects hue of 21-2C and 31-3C.
  2. How the standard specifies to decode and display the signal that the console generates vs. how period TVs imperfectly decoded and displayed it. The color space described in the NTSC standard of 1953 uses different RGB primary colors from what TVs of the late 1970s to mid-1980s were using, and I imagine developers were testing their games on the latter. In addition, TVs were using electrically simpler YUV decoding rather than standard YIQ decoding.

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

Re: NTSC CVSB Question

Post by lidnariq » Wed Dec 02, 2020 12:59 pm

Brovidio wrote:
Wed Dec 02, 2020 10:59 am
If provided with a clean signal, how could there be ambiguity in how to properly decode it with respect to a specific standard?
The standards only specify behavior when the input is valid. The NES's output often isn't. (Also the 2600, VIC-20, and Plus/4.)
Wouldn’t it be a simple this-means-that operation?
NTSC was designed in an era when everything was valve based. Think vacuum tubes, matrix math, and lots of nonlinearity even in the valid range of inputs.

1970s TVs started switching to silicon instead of valves, but it was still analog. Only in the late 1980s did it even begin to make sense to think about sampling the input and doing the math entirely digitally.

Alternatively, what happens when you try to draw the color <60%,-10%,20%> ? Negative green doesn't have a meaning. You can't cheat your way to a larger gamut.

Brovidio
Posts: 6
Joined: Wed Dec 02, 2020 10:34 am

Re: NTSC CVSB Question

Post by Brovidio » Wed Dec 02, 2020 6:20 pm

Thanks for the responses.

I have no idea how the PPU DAC works.

BUT, does its design give any insight into why this particular set of colors was chosen?

Are they mathematically convenient in some way?
Or are they the result of evenly dividing some range of input states?

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

Re: NTSC CVSB Question

Post by lidnariq » Wed Dec 02, 2020 6:27 pm

Yes. In the ideal – which the PPU isn't – it's just the dividing the YUV plane along 12 angles. Much like how the Apple 2 and CGA divide the YUV plane into 8 angles, the 2600 into 15, or the VIC-20, C64, and TED into 5, 6, or 14 out of 16.

Try playing around with Drag's generator here: http://drag.wootest.net/misc/palgen.html

Brovidio
Posts: 6
Joined: Wed Dec 02, 2020 10:34 am

Re: NTSC CVSB Question

Post by Brovidio » Thu Dec 03, 2020 11:42 am

lidnariq wrote:
Wed Dec 02, 2020 6:27 pm
Yes. In the ideal – which the PPU isn't – it's just the dividing the YUV plane along 12 angles. Much like how the Apple 2 and CGA divide the YUV plane into 8 angles, the 2600 into 15, or the VIC-20, C64, and TED into 5, 6, or 14 out of 16.

Try playing around with Drag's generator here: http://drag.wootest.net/misc/palgen.html
This is fascinating!

Notably, there is no yellow, and there are way more shades of blue than anything else.

Thanks for this!

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

Re: NTSC CVSB Question

Post by psycopathicteen » Mon Feb 22, 2021 10:50 am

Ever since I learned how NTSC color standards work, I've been scratching my head at how I don't remember NTSC artifacts being that bad, and if they weren't that bad, what kind of black magic was in the NTSC decoding chips?
Last edited by psycopathicteen on Mon Feb 22, 2021 11:31 am, edited 1 time in total.

NewRisingSun
Posts: 1296
Joined: Thu May 19, 2005 11:30 am

Re: NTSC CVSB Question

Post by NewRisingSun » Mon Feb 22, 2021 11:23 am

The NES PPU produces excessive cross-luma artifacts due to its lack of filter on the chrominance component to the standardized bandwidth. NTSC decoders expect no chrominance information above 1 MHz, yet the PPU outputs such. As a result, the chrominance information above 1 MHz is seen as jagged vertical lines in the demodulated luminance signal. Television screens of the 1980s and 1990s had a dot pitch far lower than today's HDTVs or computer monitors, which served to partially hide the cross-luma artifacts.

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

Re: NTSC CVSB Question

Post by psycopathicteen » Mon Feb 22, 2021 11:48 am

1 Mhz for the stopband, or at -3db level?

NewRisingSun
Posts: 1296
Joined: Thu May 19, 2005 11:30 am

Re: NTSC CVSB Question

Post by NewRisingSun » Mon Feb 22, 2021 12:19 pm

SMPTE 170M 'Composite Analog Video Signal - NTSC for Studio Applications' wrote: 7.2 The color-difference signals shall be bandwidth limited prior to modulation as follows:
  • less than 2 db down at 1.3 MHz;
  • at least 20 db down at 3.6 MHz.
(...) This standard does not preclude the continued use of equipment built to the NTSC 1953 color television transmission standard for which the I signal bandwidth is as specified in 7.2 and the Q signal bandwidth is limited as follows:
  • at 0.4 MHz less than 2 db down;
  • at 0.5 MHz less than 6 db down;
  • at 0.6 MHz at least 6 db down.

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

Re: NTSC CVSB Question

Post by psycopathicteen » Mon Feb 22, 2021 5:34 pm

Analog TV standards are so sloppy, there's no hard cutoff point between where the luma bandwidth ends and the chroma bandwidth begins.

User avatar
TmEE
Posts: 779
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: NTSC CVSB Question

Post by TmEE » Mon Feb 22, 2021 9:22 pm

Perfect filters don't exist, those figures given are achievable with real world parts in cost effective manner.

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

Re: NTSC CVSB Question

Post by psycopathicteen » Tue Mar 02, 2021 12:25 pm

Something that I wonder about are comb filters that are good for video games, bad at the Snell and Willcox test, and comb filters that are good at the Snell and Willcox test bad for video games?

Post Reply