tl;dr

Overview

The goal of this page is to explain what is meant by the term "active area" specifically as it applies to its use in formatting and encoding video game footage. The connection between active area and pixel aspect ratio will be established, as well as techniques for using knowledge of a console's active area for accurately sizing emulator recordings. Gross misrepresentations of how analog signals appear will be presented in the pursuit of convenient visualizations to make the topic easier to convey, so it is highly recommended that you learn a little about analog TV first by checking out the recommended reading/viewing section.

Recommended Reading/Viewing

Why? How does this information help with encoding speedruns?

Understanding active area will help you understand a few cool tricks that you can use to stretch and resize your emulator video dump so that it will look like it would on a television, since it is not the same as the emulator's output (usually). You may have heard about how TVs would stretch the game image to a 4:3 ratio (this is a misconception); the information on this page will explain what's actually going on there and how to accurately emulate it.
"Wait, the 256x224px video that my NES emulator gave me isn't how it's supposed to look?" Ignoring for now the deeply difficult question of how games were intended to look by the developers, old video game consoles designed to display on analog TVs did not display their framebuffers' square pixels as square on the TV - they were almost always stretched or squished horizontally a bit. The ratio of width to height of the dots on the TV is what is known as Pixel Aspect Ratio (PAR). This means that to accurately represent the game as it would appear on a television, you've got to distort the video's proportions a bit, and the amount is different for each console.

Oversimplifications, Misrepresentations, and Damned Lies

The purpose of this page is not to explain how analog television works any more than is needed to explain the active area. There are any number of good sources on the internet (check the recommended links sections for a few) that should be consulted for that. As a lot of the details of how analog TV works are quite complicated and actually make explaining the active area concept more difficult, there will be inaccurate or misleading information on this page because it makes explaining the necessary concepts more practical for the purposes of encoding speedruns. While all attempts will be made to make it clear when inaccurate information is being conveyed, I would be remiss in not laying out these details explicitly, so here is a list.

Going From Time to Pixels

  1. The parts of a TV signal that are responsible for actually drawing an image to the TV screen are individually called the "active time" or "active period" of the signal. Active area is defined as discontinuous periods of time at its most basic level.
  2. If we relate the the active periods of the TV signal to the physical, 4:3 area on the screen that the cathode ray strikes during those times, you get a rectangle in physical space. Active area can be represented as rectangular physical dimensions in space this way.
  3. Consoles put their pixels into the physical dimensions of the active area by varying the signal levels at a certain frequency, thereby sampling the active area into a grid of lines of samples. With an input device like a console, active area can be represented as a grid of samples. These samples are (usually) not squares - they will be little roundish rectangles.
  4. Modern display devices can't display samples of varying sizes, they display square pixels. If we take the lines of samples from the active area, and convert each sample into a square pixel, we resolve the active area into a grid of square pixels.
  5. The grid of pixels we get from the previous step won't be a 4:3 rectangle, even though the physical dimensions of the active area were, because we changed the size of the samples when converting them to square pixels. If we take our grid of pixels and scale the horizontal dimension so that the whole image now forms a 4:3 rectangle again, we will have converted our square pixels into non-square pixels. These non-square pixels will have a pixel aspect ratio that matches the aspect ratio of the samples, and thus the original image will be recovered.

Active area as time

A significant chunk of an NTSC signal contains no visual information. For each line, there is color burst information used to keep the chroma subcarrier synchronized, and front/back porch sections used to allow voltages to stabilize. These parts of the lines are not shown on the TV screen anywhere, and occur before the electron gun/beam is turned on again. There is also information in the signal outside of the time where a frame is being drawn. For instance, there is quite a bit of time in the signal allotted to allowing the electron beam to return to its starting position (VBLANK).
When you hear about an NTSC signal containing 525 lines, what that means is that there are 525 lines' worth of time for every frame. There is a part of the signal that lasts for 486 lines which can contain visual information, and the TV's active area lives on those lines. In each of those 486 lines, the part of the lines that actually contain visual information is the Active Area.

Active Area Visualized as Physical Space

Let's take the diagram from the previous section, isolate just one line, and add some color to it. The green part of the signal is the active area - the part that contains visual information to display on the line. The orange part is the rest of the signal that makes up the line, the part that isn't shown:
During much of the orange part of the signal above, the electron beam gets turned off (or to a very weak level actually) and starts its journey back to the left side of the screen. If we creatively apply some dimensionality to this one-dimensional signal by stacking the signal diagrams to represent the line signal's "positioning" on the screen, we get this:
Finally, lets expand this art experiment to cover an entire virtual television, and also include all of the vertical blanking period, which is a huge chunk of the signal with no visual information at all (no green part):
If we pretend that the TV's electron beam could scan for the entirety of an NTSC signal, and visualize that as a rectangle of space in front of a TV, we get the orange + green rectangle in the image above. The electron beam in this example would instantly "teleport" from the bottom-right corner of the orange + green rectangle (end of frame), to the upper-left corner of the rectangle (beginning of next frame).
The part of the orange rectangle above the viewable area is mostly the vertical blanking (VBLANK) time, where not much is happening in the signal because we have to wait for the TV's electron beam to reset. In this example we are pretending that this happens instantly, but in reality it takes time for the beam to get back to the top because the inductive forces that control the beam can not change instantly. The part of the rectangle to the left of the viewable area would be where the horizontal blanking occurs, or HBLANK. See the diagram of the NTSC signal line above to see the various parts of HBLANK.
The green rectangle is the Active Area of the signal. It is the physical space over which the TVs electron beam can actually draw an image, though depending on the construction and quality of the TV, not all of the space will be useable. In the graphic above, the TV's bezel would cover some of the useable space, a very common real-world scenario. Most consumer televisions also overscanned, which has the effect of "zooming in" or making the green rectangle larger, cutting away even more useable space.
You'll notice in the above image that the game's image does not fill the entire Active Area. In the idealized TV in the image, it perfectly displays the image in exactly the proportions that the NTSC signal specifies. But in reality, television sets were built within manufacturing tolerances, some looser than others. On cheaper TV sets, the quality of the image towards the edges of the TV glass would degrade quickly. This is due partially to the curve of the TV screen's glass, but also because cheaper components could not maintain quality near the edges of of the electron gun's operational limits. To combat this, manufacturers of these cheap sets would tune these TVs' parameters to "zoom in" the image so that the part of the image that was drawn poorly would be outside of the viewing area of the television set. This is what is commonly known as overscan. This is the reason a lot of people remember their video games taking up the entire TV screen - their TVs were zoomed in!

Active Area Visualized as Samples

// TODO

HomePages/Zinfidel/ActiveArea last edited by Zinfidel on 3/27/2022 12:57 AM
Page History Latest diff List referrers View Source