CTIA and GTIA


Color Television Interface Adaptor and its successor Graphic Television Interface Adaptor are custom chips used in the Atari 8-bit computers and Atari 5200 home video game console. In these systems, a CTIA or GTIA chip works together with ANTIC to produce the video display. ANTIC generates the playfield graphics while CTIA/GTIA provides the color for the playfield and adds overlay objects known as player/missile graphics. Under the direction of Jay Miner, the CTIA/GTIA chips were designed by George McLeod with the technical assistance of Steve Smith.
Color Television Interface Adaptor and Graphic Television Interface Adaptor are names of the chips as stated in the Atari field service manual. Various publications named the chips differently, sometimes using the alternative spelling Adapter or Graphics, or claiming that the "C" in "CTIA" stands for Colleen/Candy and "G" in "GTIA" is for George.

History

2600 and TIA

Atari had built their first display driver chip, the Television Interface Adaptor universally referred to as the TIA, as part of the Atari 2600 console. The TIA display logically consisted of two primary sets of objects, the "players" and "missiles" that represented moving objects, and the "playfield" which represented the static background image on which the action took place. The chip used data in memory registers to produce digital signals that were converted in realtime via a digital-to-analog converter and RF modulator to produce a television display.
The conventional way to draw the playfield is to use a bitmap held in a frame buffer, in which each memory location in the frame buffer represents one or more locations on the screen. In the case of the 2600, which normally used a resolution of 160x192 pixels, a frame buffer would need to have at least 160x192/8 = 3840 bytes of memory. Built in an era where RAM was very expensive, the TIA could not afford this solution.
Instead, the system implemented a display system that used a single 20-bit memory register that could be copied or mirrored on the right half of the screen to make what was effectively a 40-bit display. Each location could be displayed in one of four colors, from a palette of 128 possible colors. The TIA also included several other display objects, the "players" and "missiles". These consisted of two 8-bit wide objects known as "players", a single 1-bit object known as the "ball", and two 1-bit "missiles". All of these objects could be moved to arbitrary horizontal locations via settings in other registers.
The key to the TIA system, and the 2600's low price, was that the system implemented only enough memory to draw a single line of the display, all of which held in registers. To draw an entire screen full of data, the user code would wait until the television display reached the right side of the screen and update the registers for the playfield and player/missiles to correctly reflect the next line on the display. This scheme drew the screen line-by-line from program code on the ROM cartridge, a technique known as "racing the beam".

CTIA

Atari initially estimated that the 2600 would have short market lifetime of three years when it was designed in 1976, which meant the company would need a new design by 1979. Initially this new design was simply an updated 2600-like game console, and was built around a similar basic design, simply updated. Work on what would become the CTIA started in 1977, and aimed at delivering a system with twice the resolution and twice the number of colours. Moreover, by varying the number of colours in the playfield, much higher resolutions up to 320 pixels horizontally could be supported. Players and missiles were also updated, including four 8-bit players and four 2-bit missiles, but also allowing an additional mode to combine the four missiles into a fifth player.
Shortly after design began, the home computer revolution started in earnest in the later half of 1977. In response, Atari decided to release two versions of the new machine, a low-end model as a games console, and a high-end version as a home computer. In either role, a more complex playfield would be needed, especially support for character graphics in the computer role. Design of the CTIA was well advanced at this point, so instead of a redesign a clever solution was provided by adding a second chip that would effectively automate the process of racing the beam. Instead of the user's programming updating the CTIA's registers based on its interrupt timing, the new ANTIC would handle this chore, reading data from a framebuffer and feeding that to the CTIA on the fly.
As a result of these changes, the new chips provide greatly improved number and selection of graphics modes over the TIA. Instead of a single playfield mode with 20 or 40 bits of resolution, the CTIA/ANTIC pair can display six text modes and eight graphics modes with various resolutions and color depths, allowing the programmer to choose a balance between resolution, colours, and memory use for their display.

CTIA vs. GTIA

The original design of the CTIA chip also included three additional color interpretations of the normal graphics modes. This feature provides alternate expressions of ANTIC's high-resolution graphics modes presenting 1 bit per pixel, 2 colors with one-half color clock wide pixels as 4 bits per pixel, up to 16 colors, two-color clock wide pixels. This feature was ready before the computers' November 1979 debut, but was delayed so much in the development cycle that Atari had already ordered a batch of about 100,000 CTIA chips with the graphics modes missing. Not wanting to throw away the already-produced chips, the company decided to use them in the initial release of the Atari 400 and 800 models in the US market. The CTIA-equipped computers, lacking the 3 extra color modes, were shipped until October–November 1981. From this point, all new Atari units were equipped with the new chip, now called GTIA, that supported the new color interpretation modes.
The original Atari 800/400 operating system supported the GTIA alternate color interpretation modes from the start, which allowed for easy replacement of the CTIA with the GTIA once it was ready. Atari authorized service centers would install a GTIA chip in CTIA-equipped computers free of charge if the computer was under warranty; otherwise the replacement would cost $62.52.
GTIA was also mounted in all later Atari XL and XE computers and Atari 5200 consoles.

Features

The list below describes CTIA/GTIA's inherent hardware capabilities meaning the intended functionality of the hardware itself, not including results achieved by CPU-serviced interrupts or display kernels driving frequent register changes.
CTIA/GTIA is a television interface device with the following features:
  • Interprets the Playfield graphics data stream from ANTIC to apply color to the display.
  • Merges four Player and four Missile overlay objects with ANTIC's Playfield graphics. Player/Missile features include:
  • * Player/Missile pixel positioning is independent of the Playfield:
  • ** Player/Missile objects function normally in the vertical and horizontal overscan areas beyond the displayed Playfield.
  • ** Player/Missile objects function normally without an ANTIC Playfield.
  • * Eight-bit wide Player objects and two-bit wide Missile objects where each bit represents one displayed pixel.
  • * Variable pixel width
  • * Each Player/Missile object is vertically the height of the entire screen.
  • * Variable pixel height when the data is supplied by ANTIC DMA
  • * Ability to independently shift each P/M object by one scan line vertically when operating on double scan lines per data.
  • * Each Player and its associated Missile has a dedicated color register separate from the Playfield colors.
  • * Multiple priority schemes for the order of graphics layers
  • * Color merging between Players and Playfield producing extra colors.
  • * Color merging between pairs of Players producing multi-color Players.
  • * Missiles can be grouped together into a Fifth Player that uses a separate color register.
  • * Collision detection between Players, Missiles, and Playfield graphics.
  • There are no fixed colors for normal color interpretation mode. All colors are generated via indirection through nine color registers.
  • * Normal color interpretation mode provides choice of colors from a 128 color palette
  • * A GTIA color interpretation mode can generate 16 luminances per color providing a 256 color palette.
  • The GTIA version of the chip adds three alternate color interpretation modes for the Playfield graphics.
  • * 16 shades of a single hue from the 16 possible hues in the Atari palette. This is accessible in Atari BASIC as Graphics 9.
  • * 15 hues in a single shade/luminance value plus background. This is accessible in Atari BASIC as Graphics 11.
  • * 9 colors in any hue and luminance from the palette accomplished using all the Player/Missile and Playfield color registers for the Playfield colors. This is accessible in Atari BASIC as Graphics 10.
  • Reads the state of the joystick triggers.
  • It includes four input/output pins that are used in different ways depending on the system:
  • * In Atari 8-bit computers, three of the pins are used to read state of the console keys.
  • * The fourth pin controls the speaker built into the Atari 400/800 to generate keyboard clicks. On later models there is no speaker, but the key click is still generated by GTIA and mixed with the regular audio output.
  • * In the Atari 5200, the pins are used as part of the process to read the controller keyboards.

    Versions

by part number
  • C012295 — NTSC CTIA
  • C014805 — NTSC GTIA
  • C014889 — PAL GTIA
  • C020120 — French SECAM GTIA
Atari, Inc. intended to combine functions of the ANTIC and GTIA chips in one integrated circuit to reduce production costs of Atari computers and 5200 consoles. Two such prototype circuits were being developed, however none of them entered production.
  • C020577 — CGIA
  • C021737 — KERI