V-Sync and Interlacing
Previous: Classic Black & White TV
As stated in the previous section, every interlaced frame of video consists of 525 scanlines, making each field 262.5 scanlines long. But, why is there a half scanline? And why are there so many more lines than the 486 that are visible?
Well, now that we've looked at an individual scanline, it's time to break down a whole frame.
The First Field
Each interlaced field in a frame is exactly 262.5 scanlines long, and this first field (the odd field) is no exception.
The start of every field is known as the vertical blanking interval and, similar to the horizontal blanking interval that occurs per scanline, this is the setup for the TV to know that a new field is imminent.
Here is a diagram of the vertical blanking interval, which is comprised of 20 scanlines. Note that the diagram additionally contains the last visible scanline of the previous field and the first visible scanline of this new field:
At the start of a standard vertical blanking interval is a sequence of six half-scanline-duration pulses (the pre-equalizing pulse interval, "Pre-EQ" in the diagram). This is a buffer between the end of the previous scanline and the vertical sync pulse interval, with a similar purpose as the front porch for a scanline.
We are going to count these six pulses as scanlines 1-3, and they are not only the start of this field, but for illustrative purposes, the start of the entire 525 scanline frame.
After the sixth half-scanline pulse, now the signal drops low for extended lengths of time: this is the vertical sync pulse interval ("VSync" in the diagram), and it is the actual signal to the CRT to send the electron beam back to the upper-left corner (as it just finished in the lower-right) to prepare for this new field. This is another 6 half-scanline pulses: scanlines 4-6.
After that, there are six more half-scanline pulses (scanlines 7-9): the post-equalizing pulse interval ("Post-EQ" in the diagram).
Scanlines 10-20 are still not visible, and are there to allow early CRTs the amount of time necessary to get the electron beam back to the upper-left corner. These look like regular scanlines (they're full-length), but without any visible data in them. At the end of this, the vertical blanking interval ends.
Finally, scanline 21 is the start of the odd field's visible scanlines, which continues until scanline 263.5. Yep, the last visible scanline of the odd frame (scanline 263) is only half-length, and halfway in it stops and the next field's vertical blanking interval begins.
The Second Field
The second field (the even field) starts much like the first one does, except it just unceremoniously starts in the middle of a scanline. Here's a diagram of the second field's vertical blanking interval (plus the half-scanline from the previous field, as well as the initial 1.5 scanlines from this one):
Just like with the first field, this starts with the six-half-scanline pre-equalizing pulse interval (which starts at scanline 263.5 and stops halfway into scanline 266) followed by the vertical sync pulse interval (starting at scanline 266.5 and ending halfway into scanline 269).
Here's where it differs though: the post-equalizing pulse interval has 5 pulses instead of 6, so it runs from scanline 269.5 through the end of scanline 271. From there, we get the same 11 full-sized empty scanlines (scanlines 272-282) as in the first field.
And then, just as the previous field ended with a half-full visible scanline, this field begins with one: the back half of scanline 283 is considered visible (though the first half of that scanline still counts as part of the vertical blanking interval). This half-scanline is technically the first visible scanline in the frame, displaying just above the first scanline from the previous field.
The first full scanline of this second (even) field, then, is scanline 284, and this field continues until the end of scanline 535, after which the cycle of odd/even fields restarts with a new scanline 1.
How Many Visible Scanlines?
By original convention, there are 486 visible scanlines: 242 full scanlines from the first field and 242 from the second, as well as 1 each for the half-visible scanlines. That counts each half-scanline as one scanline each, so it's kinda sorta overcounting by 1.
In the 1980s, however, a new standard came along and defined the signal as having only 480 visible scanlines. Where did those other scanlines go?
- The two half-scanlines no longer count as part of the visible set, as they were never really visible on properly-set-up TVs anyway.
- Additionally, the first two visible scanlines of each field (scanlines 21, 22, 284, and 285 by our count) were also designated as non-visible so they could be used to contain closed captions (lines 21 and 284) or Teletext (lines 22 and 285).
So with those 6 scanlines removed from the visible set, that leaves 480 interlaced scanlines per frame.
(As an interesting aside: if you ever caught an analog broadcast on an LCD TV with no overscan, you may have seen a bunch of garbled-looking lines at the top of the frame. That was the closed captioning data for that channel! Now you know.)
Game Consoles & Fake Progressive Modes
All of this information has talked about interlaced video, but many old game consoles did not use interlacing in their primary modes. How did that work?
Effectively, they used a trick: only send odd fields (or only send even fields), and rather than getting 480 interlaced lines of picture every 30Hz, you could get 240 non-interlaced lines of picture every 60Hz (both doubling the framerate and halving the horizontal resolution).
This did mean, interestingly, that game consoles frequently did not run exactly at a standard framerate: the NES, for instance, ran at something closer to 60.10 frames per second, owing to differences in timings between how it generated its (odd-only) frames and how the standard defined its interlaced frames.
This "only draw half of the scanlines" trick is also why console games had gaps between the scanlines (these gaps are usually just called "scanlines" in emulators). Without drawing alternating frames there were, in fact, little gaps where the other field's scanlines were intended to go.
Color
We've now broken down how the frames of a TV signal are built, as well as how a black & white scanline works. Of course, the majority of folk don't see in pure shades of gray. The world has colors, and eventually people took on the task of getting those colors out of the cathode rays.
Next: Adding Color