thumb|[[Atari 2600]]

The Television Interface Adaptor (TIA) is the custom computer chip which, along with a variant of the MOS Technology 6502, constitutes the heart of the 1977 Atari Video Computer System game console. The TIA generates the screen display, sound effects, and reads the controllers. At the time the Atari VCS was designed, even small amounts of RAM were expensive. The chip was designed without the extra circuitry of a framebuffer, instead requiring detailed programming to create even a simple display.

Development of the CO10444/CO11903 TIA was led by Jay Miner, who continued at Atari expanding on the design of the TIA for the Atari 8-bit computers with the ANTIC,CTIA/GTIA and POKEY chips which allow for more graphical and sound capabilities. Miner later led the design of the custom chips for the Amiga computer.

Design

thumb|right|The motherboard of the original six-switch Atari VCS. The 40-pin TIA chip is on the left. The center 28-pin is the MOS Technology 6507, and to its right, the 40-pin MOS Technology 6352 Ram-I/O-Timer (RIOT) chip. The cartridge insertion slot is to the immediate right of the RIOT chip.

Background

Around 1975, Atari's engineers at Cyan Engineering led by Steve Mayer and Ron Milner had been considering alternatives to the development dedicated hardware such as application-specific integrated circuits (ASIC) for arcade video games and home video game consoles. Programmable microprocessors had reached the market, but Atari considered them too expensive for a home application. Sprites would be held as a bitmap in a framebuffer, requiring random-access memory (RAM). RAM was still expensive, costing tens of thousands of dollars per megabyte., and to display a two-color playfield on an 80×48 display would have cost thousands of dollars in memory. On a conventional NTSC color television, maximum resolutions generally fell between 256 and 320 pixels per line, and 192 to 240 lines per screen.

In September 1975, MOS Technology introduced the 6502 microprocessor, one of the first low-cost microprocessors on the market. Mayer and Milner arranged to speak to the chip's designer, Chuck Peddle, on using the 6502 as the basis for their programmable video game console. Over the course of a couple of days, the basic design of the Atari VCS was laid out, with Peddle offering Atari the use of the lower-cost MOS Technology 6507 processor and the MOS Technology 6532 RAM-I/O-Timer (RIOT) as the core of the design. Using a breadboard prototype for the display adapter atop a 6502 testbed system, Milner was able to demonstrate the ability to program a simple version of their Tank game. Joe Decuir was hired on to help convert Milner's proof-of-concept to a functional prototype, sufficient for Atari to give the go-ahead for the development to continue. Horizontal resolution is not uniform, as its size depends on the particular graphics object. The smallest unit of pixel corresponds to 1 color clock cycle of the chip, of which there are 160 visible ones on a line.

To start the process, the game program running on the MOS Technology 6502-based CPU loads the TIA's registers with the data needed to draw the first line of the display. The TIA then waits until the television is ready to draw the line (under the command of the TIA's associated analog hardware) and read out the registers to produce a signal for that line. During the horizontal blanking period between lines, the 6502 quickly changes the TIA's registers as needed for the next line. This process continues down the screen.

This is made more difficult because the MOS Technology 6507 in the 2600 is a pin-reduced version of the 6502 with no support for hardware interrupts. Generally the analog side of the display system generates an interrupt when it finishes drawing a raster line and is getting ready for the next one. The interrupt triggers the code needed to update the screen, and then returns to the "main" program. The 6507 left these pins off of the CPU to save money, however it does have a "RDY" pin to insert wait states into CPU bus cycles. The TIA was specifically designed to use the RDY pin to synchronize the CPU with the raster line timing of the video generated by the TIA: when the CPU writes to a certain register address of the TIA, the TIA lowers its RDY output signal until the end of the current line, a "wait for sync" command.

Given this complexity, early games using the system tended to be simple in layout, using the TIA to create symmetric playfields with players on top. This was the original intention of the system: to run the handful of arcade games Atari had already produced like Tank and Pong. In these cases the playfield data was typically laid out in the 2 kB ROM memory in the game cartridge. As each line used 20 bits of data, and there were 192 lines on an NTSC display, a display with a different layout on every line needed only 480 bytes (192 x 20 / 8) of the cartridge's 4 kB to hold a single hard-coded display. In this case the kernel simply advanced 20 bits through ROM for every line as the TIA advanced down the screen, a task that took only a few cycles of CPU time. This can be further reduced by using the same data for multiple lines, either doubling them vertically, or reading one way through the list for the top and then back the other way for the bottom, producing a vertically mirrored display of only 240 bytes.

thumb|Rainbow effect visible in [[Barnstorming (video game)|Barnstorming game]]

A key advance was the licensing of Space Invaders for the platform, which required many more player graphics to draw the enemy aliens. The solution was to change the player data for every line as the image was being drawn, creating an apparent large number of players. Another advance was made by (partially) coding the display as CPU instructions instead of storing it as fixed data in ROM. Adventure uses this concept to produce a wide variety of maps by combining different portions of the data in ROM, jumping back and forth through it during the screen drawing. This allowed the game to have 30 rooms, which would have otherwise required 14 kB of ROM.

As programmers grew more accustomed to the odd timing needed to get things to work properly on-screen, they began to use the inherent flexibility in the TIA to greatly improve the displays. One common technique was to change the color registers that were used to draw the 1 and 0 states of the playfield, resulting in displays with rainbow-like effects. Later games could modify the playfield mid-line to generate asymmetric patterns, repositioning and changing player sprites mid-screen to generate additional sprites.

TIA Color Capabilities

The TIA uses different color palettes depending on the television signal format used. For NTSC format (part number CO10444),

The result is a cheap frequency divider capable of detuned notes and the odd tuned frequency. The TIA is not a musical chip unless the composer works within the frequency limits or modulates between two detuned frequencies to create a vibrato tuned note. The TIA is tuned to the inverted harmonic series due to each frequency being the base frequency divided by a whole number.

Audio Control (AUDC0/1)

The Audio Control register generates and manipulates a pulse wave to create complex pulses or noise. The following tables (with designed duplicates) explains how its tones are generated:

{| class="wikitable" style="margin-left:1em"

|-

! HEX

! style="background-color:#C0C0C0" | D7

! style="background-color:#C0C0C0" | D6

! style="background-color:#C0C0C0" | D5

! style="background-color:#C0C0C0" | D4

! style="background-color:#00FFFF" | D3

! style="background-color:#00FFFF" | D2

! style="background-color:#00FFFF" | D1

! style="background-color:#00FFFF" | D0

! Type of noise or division

|-

| style="text-align:center" | 0

| rowspan="16" colspan="4" |  

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 0

| Set to 1 (volume only)

|-

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 1

| 4 bit poly

|-

| style="text-align:center" | 2

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 0

| ÷ 15 → 4 bit poly

|-

| style="text-align:center" | 3

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 1

| 5 bit poly → 4 bit poly

|-

| style="text-align:center" | 4

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 0

| ÷ 2

|-

| style="text-align:center" | 5

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 1

| ÷ 2

|-

| style="text-align:center" | 6

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 0

| ÷ 31

|-

| style="text-align:center" | 7

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 1

| 5 bit poly → ÷ 2

|-

| style="text-align:center" | 8

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 0

| 9-bit poly (white noise)

|-

| style="text-align:center" | 9

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 0

| style="text-align:center" | 1

| 5-bit poly

|-

| style="text-align:center" | A

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 0

| ÷ 31

|-

| style="text-align:center" | B

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 1

| style="text-align:center" | 1

| Set last 4 bits to 1

|-

| style="text-align:center" | C

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 0

| ÷ 6

|-

| style="text-align:center" | D

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 0

| style="text-align:center" | 1

| ÷ 6

|-

| style="text-align:center" | E

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 0

| ÷ 93

|-

| style="text-align:center" | F

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 1

| style="text-align:center" | 1

| 5-bit poly ÷ 6

|}

References

Sources

  • ATARI 2600 Programming for Newbies
  • TIA technical information
  • TIA technical manual
  • TIA schematics
  • TIA high resolution die shots
  • Programming the Atari 2600, and Me - Part 1, part 1 of an 8-part series
  • Atari 2600 Development by Joe Decuir