Color Television Interface Adaptor (CTIA) and its successor Graphic Television Interface Adaptor (GTIA) 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 (text and bitmap) while CTIA/GTIA provides the color for the playfield and adds overlay objects known as player/missile graphics (sprites). 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
Atari 2600 game console and TIA
Atari had created their first display driver chip, the Television Interface Adaptor (TIA) as part of the Atari 2600 console. The TIA display generates four primary moving objects (two "players" and two "missiles") on a "playfield" background. All items for one screen line are generated from simple data in memory registers and produce timed digital signals that a digital-to-analog converter and RF modulator can convert into a television display line. Between lines (during the horizontal flyback of the video beam), the 6507 microprocessor in the 2600 could change the next line's contents by updating the registers. This scheme avoided the use of a video frame buffer, which would have been far too expensive with mid-1970s RAM technology and prices. Over time, 2600 programmers developed techniques that displayed more sprites by updating the registers during a line to make it repeat the same hardware sprites.
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. At first, this was to be an updated 2600-like game console, built around an improved similar basic design. Work on what would become the CTIA started in 1977, and aimed to deliver twice the screen resolution with 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, allowing for four 8-bit players and four 2-bit missiles with an additional mode that combined the four missiles into a fifth player.
Shortly after design began, in the later half of 1977, the home computer revolution started in earnest. In response, Atari decided to release two versions of the new machine: a low-end model as a games console, and a high-end model as a home computer. Racing the beam on the 2600 was an unexpected but welcome result of its low-cost design and the company wanted the new machine to be similarly flexible. For either model, a more complex playfield would be needed, with support for character graphics in the computer role. Design of the CTIA was well advanced at this point, so instead of a redesign, a second chip was added that would effectively automate the process of racing the beam that the 2600's microprocessor had performed. Instead of the microprocessor updating the CTIA's registers based on its interrupt timing, the new ANTIC chip would handle this chore by reading video data from a frame buffer and writing it 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. This allows 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 (aka sprites) 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 (1, 2, or 4 color clocks wide) Each Player/Missile object is vertically the height of the entire screen. Variable pixel height when the data is supplied by ANTIC DMA (single or double scan lines per data) 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 (P/M Graphics vs playfield) 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 (CTIA) color interpretation mode. All colors are generated via indirection through nine color registers. (Four for Player/Missile graphics, four for the Playfield, and one shared between the Playfield and the Fifth Player feature.) Normal color interpretation mode provides choice of colors from a 128 color palette (16 colors with 8 luminance values for each) 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 (bottom buttons only for the Atari 5200 controllers). 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 (Start/Select/Option). 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 CTIAMichael Current, "What are the SALLY, ANTIC, CTIA/GTIA, POKEY, and FREDDIE chips?", Atari 8-Bit Computers: Frequently Asked Questions C014805 — NTSC GTIA C014889 — PAL GTIA C020120 — French SECAM GTIA (FGTIA)
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
Pinout
Pin Name Pin Number(s) Description A0 - A4 2, 1, 40, 39, 38 Address Input AN0 - AN2 18, 19, 20 ANTIC Interface Input COL 21 Color Frequency Output CS 32 Chip Select Input CSYNC 25 Composite Sync Output D0 - D7 7, 6, 5, 4, 37, 36, 35, 34 Data Bus I/O DEL 17 Color Delay Line Input FØ0 29 Fast Phase Clock Output HALT 26 Halt Input L0 - L3 31, 22, 23, 24 Luminance Output N/C 16 Not Connected (PAL on later versions) OSC 28 Oscillator Input R/W 33 Read/Write Input S0 - S3 12, 13, 14, 15 Switch Data I/O T0 - T3 8, 9, 10, 11 Trigger Inputs with internal pull-up Vcc 27 Power +5 Volts Vss 3 Ground Ø2 30 Computer Phase 2 Input
Registers The Atari 8-bit computers map CTIA/GTIA to the $D0xxhex page and the Atari 5200 console maps it to the $C0xxhex page.
CTIA/GTIA provides 54 Read/Write registers controlling Player/Missile graphics, Playfield colors, joystick triggers, and console keys. Many CTIA/GTIA register addresses have dual purposes performing different functions as a Read vs a Write register. Therefore, no code should read Hardware registers expecting to retrieve the previously written value.
This problem is solved for many write registers by Operating System Shadow registers implemented in regular RAM as places to store the last value written to registers. Operating System Shadow registers are copied from RAM to the hardware registers during the vertical blank. Therefore, any write to hardware registers which have corresponding shadow registers will be overwritten by the value of the Shadow registers during the next vertical blank.
Some Write registers do not have corresponding Shadow registers. They can be safely written by an application without the value being overwritten during the vertical blank. If the application needs to know the last state of the register then it is the responsibility of the application to remember what it wrote.
Operating System Shadow registers also exist for some Read registers where reading the value directly from hardware at an unknown stage in the display cycle may return inconsistent results.