Demystifying NTSC Color And Progressive Scan

NTSC

Black and white NTSC is simple – it can, and was, done with vacuum tubes for a long, long time. Color is just weird, though. It runs at 29.976 frames per second, uses different phases of the carrier for different colors, and generally takes a while to wrap your head around. [Sagar] is doing a series on the intricacies of NTSC, and the latest post deals with color and progressive scanning versus interlacing, or as it is better known, how classic game consoles and home computers generate video.

The test bed for [Sagar]’s video experimentations is a circuit containing an ATMega16, a 4-bit shift register, and a 14.31818 MHz clock. This clock is much faster than the 3.579545 MHz clock in an NTSC carrier frequency – exactly four times as fast – allowing the shift register to output four different phases of the carrier frequency a 0°, 90°. 180°, and 270°. Playing with some of the pins on the ATMega in the circuit results in a palette being generated on any old TV.

NTSC requires interlaced scanning, or sending an entire screen of even lines, then an entire screen of odd lines, at around 60 fields per second. The Nintendos and Segas of yesteryear didn’t bother with this, instead opting to send half the vertical resolution at double the frame rate. This is known as a progressive scan. [Sagar] found that this resulted in some image artifacts when displayed on a modern LCD, and moving back to an interlaced mode fixed the problem. All the code and files are up on the gits. If you’re feeling adventurous, this is exactly how projects like the Uzebox have created homebrew game consoles using little more than the ATMega found in [Sagar]’s build.

37 thoughts on “Demystifying NTSC Color And Progressive Scan

      1. Ye Olde Monochrome NTSC (and PAL) needed a clock frequency to time the field rate. The cheapest way to do it was to use the frequency of the incoming alternating current power.

        Why Color NTSC (not Colour ’cause it’s American) went to 29.976 was for a couple of reasons. First was with the analog equipment and vacuum tubes that had pretty wide variances as temperature changed, there was not enough bandwidth in a channel to squeeze the chroma signal in.

        Second was more accurate timing was required. AC line frequency has never been describable as a rock solid reference.

        The third reason was avoiding harmonic interference showing up in the video from other devices on the same circuit or from the AC line the TV was plugged into.

        The key to color was designing a vacuum tube timer circuit that could fit into a television receiver AND be affordable.

        NTSC first got color in 1953 but it wasn’t until the mid 60’s that it really took off. There was little color programming in the USA until 1965 when about half of the shows went to color. IIRC NBC went 100% color in 1966 (except for reruns of course) and by 1967 ABC and CBS went all color too.

        When transistors came along and by the early 70’s had booted vacuum tubes out of television (aside from the display itself), it was possible to make the TV transmission ‘tighter’ so it didn’t need so much bandwidth.

        But there was that huge installed base of old TVs and transmitters and maintaining backwards compatibility, so while new transmitting equipment was most likely more efficient, expansions to NTSC couldn’t be made until the majority of transmitting end equipment had been upgraded. That’s when NTSC got stereo audio, and from there not much* changed until the early 21st century when analog NTSC was booted out for digital ATSC, chosen by the FCC over competitors that provided higher resolution while still maintaining full NTSC analog compatibility.

        *Closed captioning and other things like (unfortunately) Macrovision got shoehorned into space that had always existed in the signal from the early years, the Vertical Blanking Interval. Aside from captioning, and copy protection on video tapes and DVDs, nothing else using VBI data took off in the USA. In some countries in Europe one-way Teletext services were fairly popular until the wide adoption of internet and WWW service.

  1. NTSC is ~29.970 fps (30000/1001). The field rate is 59.940 (60000/1001). The rates you supplied would be correct if you are targeting 24fps originated footage for NTSC (via the 3:2 pulldown process).

      1. I wish I could upvote this comment. Fractional frame rates and interlaced video are things we should have let die a long, long time ago. At least we’ve got square pixels now…

        1. And interlaced video formats should nowadays only be used as containers for progressive video. Not the silly “half of one frame and the other half of the next” that was a necessary evil back in the days.

  2. Possibly worth noting if you want to use a CPU to play with video signals, the Parallax Propeller was designed from the ground up with a video generator designed to bit-bang both NTSC and VGA signals. The rather coarse selection of digital phase shifts available limits the NTSC color output in interesting ways.

    1. I agree, The Propeller is excellent at producing both VGA and NTSC/PAL video.
      I have seen some remarkable video of the Props abilities in this area.
      Nice open-sorce solutions exist so that it takes very little effort to use video out on a Prop…even for a newbie. What is nice is that there are so many old VGA and NTSC monitors available free for the asking….a great opportunity for hobbyists…

  3. “up on the gits” <- either trolling or a complete lack of understanding what git or github are.

    If you troll in the writeup, why wouldn't you expect the commenters to troll you right back?

  4. Now if only there was an easy way to de-progressive an old game console and make it into true 480i rather than 240p, maybe my Atari 2600 would work on LCD TV. Right now on my 32″ it displays weird like the TV’s circuitry blanks out even field because it never got the proper 1/2 line at the end of odd field. So I get full screen comb effect on Atari 2600 games. On a smaller 19″, it only works if I turn on the system first, then turn on the TV and pray it is still set to analog channel 3. Otherwise it’d display no signal. Only on my portable 7″ TV my Atari 2600 (via AV mod) displays fully with no noticeable artifact. The portable TV has only ATSC tuner so I can’t keep the 100′ long RF cable to trip fools (not that it matters, 7″ is pretty small to try and play from 100′ away)

  5. The Uzebox doesn’t use this method to create colors; it offloads the phase stuff to a dedicated chip, the AD725. This (what’s described by the linked article) is even more hard-core though, and interesting to learn from!

  6. Funny, 4 bits is actually how the Apple II generated 16 colors in DHR (Double Hi-Res) mode. All of the colors in high-res modes are simply caused by the monochrome signal changing frequently enough that it gets pushed up into the portion of the band reserved for the color signal in composite video.

    This image from DazzleDraw on the Apple II was generated by my NTSC post-processing shader from a purely monochrome image generated by MESS: http://i.imgur.com/SLpnxBc.jpg

    The shader takes the output image from the emulator, encodes it into a composite NTSC signal at 4x the horizontal resolution by packing 4 samples into each pixel, and then decodes it from composite back to YIQ and then RGB using a second pass.

    1. Hm, that’s a nice bit of work. Have you written it up?

      What video mode were you “emulating” with your filter? How many colours etc? I’d like to see before and after shots. Have you submitted your work to MESS? Or maybe some other emulators?

      I dunno if DOSBOX supports it, but many old CGA games took advantage of IBM’s cheap choice of video encoder chip. By putting certain pixels next to each other, you could produce lots of extra colours from the 4 that CGA graphics was stuck with. Only worked if you used a composite monitor on the matching connector, digital RGBI monitors were stuck with the bloody awful, what-were-they-thinking, palette of black, white, magenta and cyan (eeurgh!).

      That’s why, if you ever played old CGA games, so many of them used vertical stripes so much, they showed up as extra colours on composite.

      If DOSBOX doesn’t support it, or even if it does, your work would very probably find a grateful home in there.

      http://en.wikipedia.org/wiki/Color_Graphics_Adapter

      This page here mentions the composite colour “trick”. It’s similar to the Apple one, or “artifacting” on the Atari 8-bits.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.