This section discusses how to get multiple colors out of a single color graphics mode through the use of television artifacts.
The ANTIC modes with which this can be accomplished are 2,3, and 15. ANTIC mode 2 corresponds to BASIC mode 0, ANTIC mode 15 is BASIC mode 8, and ANTIC mode 3 has no corresponding BASIC mode. Each of these modes has a pixel resolution of one half color clock by one scan line. They are generally considered to have one color and two luminances. With the use of artifacts, pixels of four different colors can be displayed on the screen in each of these modes.
The term TV artifacts refers to a spot or "pixel" on the screen that displays a different color than the one assigned to it.
A simple example of artifacts using the ATARI Computer is shown by entering the following lines:
These statements will plot two points on a black background; however each pixel will have a different color.
To understand the cause of these differing colors one must first understand that all the display information for the television display is contained in a modulated television signal.
The two major components of this signal are the luminance, or brightness, and the color, or tint. The luminance information is the primary signal, containing not only the brightness data but also the horizontal and vertical syncs and blanks. The color signal contains the color information and is combined or modulated into the luminance waveform.
The luminance of a pixel on the screen is directly dependent on the amplitude of the luminance signal at that point. The higher the amplitude of the signal, the brighter the pixel.
The color information, however, is a phase shifted signal. A phaseshifted signal is a constantly oscillating waveform that has been delayed by some amount of time relative to a reference signal, and this time delay is translated into the color.
The color signal oscillates at a constant rate of about 3.579 MHz, thus defining the highest horizontal color resolution of a television set. This appears on the screen in the form of 160 visible color cycles across one scan line. (There are actually 228 color cycles including the horizontal blank and sync, and any overscan.)
The term "color clock" refers to one color cycle and is the term generally used throughout the ATARI documentation to describe units of measurement across the screen. The graphics mode 7 is an example of one color clock resolution, where each color clock pixel can be a different color. (There are microprocessor limitations though.)
Atari also offers a "high resolution" mode (GRAPHICS 8) that displays 320 pixels across one line. This is generated by varying the amplitude of the luminance signal at about 7.16 MHz, which is twice the color frequency.
Since the two signals are theoretically independent, one should be able to assign a "background" color to be displayed and then merely vary the luminance on a pixel-by-pixel basis. This in fact is the way mode 8 works, the "background" color coming from playfield register 2, and the luminances coming from both playfield registers 1 and 2.
The problem is that in practice the color and luminance signals are not independent. They are part of a modulated signal that must be demodulated to be used. Since the luminance is the primary signal, whenever it changes, it also forces a change in the color phase shift. For one or more color clocks of constant luminance this is no problem, since the color phase shift will be unchanged in this area. However, if the luminance changes on a half color clock boundary it will force a fast color shift at that point. Moreover, that color cannot be altered from the transmitting end of the signal (the ATARI Computer).
Since the luminance can change on half color clock boundaries, this implies that two false color, or artifact pixel types can be generated. This is basically true. However, these two pixels can be combined to form two types of full color clock pixels. This is illustrated below:
Note that each of these pixels requires one color clock of distance and therefore has a horizontal resolution of 160.
The colors A through D are different for each television set, usually because the tint knob settings vary. Thus they cannot be described as absolute colors, for example, red; but they are definitely distinct from each other, and programs have been written that utilize these colors.
To illustrate a simple application of artifacting, refer to the example below. This program draws lines in each of the four artifact colors and then fills in areas using three of the colors. (Note that displaying many pixels of either type C or D next to each other results in the same thing: a line or constant luminance with background color.)
The POKE 87,7 command causes the OS to treat this mode as mode 7 and to use two-bit masks when setting bits in the display memory. To generate color A, use COLOR 1, color B uses COLOR 2, and color C uses COLOR 3. Color D is generated by displaying COLOR 1 to the left of COLOR 2.
10 GRAPHICS 8:POKE 87,7:POKE 710,0:POKE 709,14