# Some notes on the Atari 2600

August 28, 2010

I’ve been playing with the Atari 2600 ever since I saw Halo 2600. It inspired me to delve once more into the realm of retro game development, and I’ve been gathering some notes related to it. Here’s a bit of summarized information I’ve collected:

## Drawing the screen

The screen has 262 total scanlines of 160 pixels each. Each pixel is one “color-clock” of the TIA (Television Interface Adapter), and there are 228 color-clocks for each scanline. The first 160 color-clocks of a scanline are for the display, while the remaining 68 are for horizontal blank (retrace). For every clock on the Atari’s 6502 (actually a 6508 but it hardly matters), 3 color-clocks on the TIA occur. Of the 262 scanlines, not all are used for the display. Below is a detailed look at how many scanlines are used where.

## Scanline information

• 3 scanlines of vertical synchronization
• 37 scanlines of vertical blank
• 192 scanlines of display
• 30 scanlines of overscan

## An introduction to the TIA

Register Brief description
WSYNC A write halts the 6502 until the next scanline
COLUBK Sets the color of the background
COLUPF Sets the color of the playfield
PF0 Top 4 bits of the playfield (reversed)
PF1 Middle 8 bits of the playfield
PF2 Bottom 8 bits of the playfield (reversed)
CTRLPF Controls the state of the playfield and the ball

Anyways, more to come later, such as a description of this mystical “playfield.”