Source: Mapping the Atari, by Ian Chadwick
D000-D003 (W): HPOSP0-HPOSP3 D004-D007 (W): HPOSM0-HPOSM3 D008-D00B (W): SIZEP0-SIZEP3 D00C (W): SIZEM D00D-D010 (W): GRAFP0-GRAFP3 D011 (W): GRAFM D012-D015 (W): COLPM0-COLPM3 D016-D019 (W): COLPF0-COLPF3 D01A (W): COLBK D01B (W): PRIOR D01C (W): VDELAY D01D (W): GRACTL D01E (W): HITCLR D000-D003 (R): M0PF-M3PF D004-D007 (R): P0PF-P3PF D008-D00B (R): M0PL-M3PL D00C-D00F (R): P0PL-P3PL D010-D013 (R): TRIG0-TRIG3 D014 (R): PAL D01F: CONSOL
Horizontal position of the players, in color clocks. The playfield boundaries for a normal size screen are 48 and 207. The usable screen area (at least on my television) ranges from 44 to 215. C/GTIA will not attempt to display anything outside the range 34-221.
Horizontal position of the missiles, in color clocks. The playfield boundaries for a normal size screen are 48 and 207. The usable screen area (at least on my television) ranges from 44 to 215. C/GTIA will not attempt to display anything outside the range 34-221.
unused | Size |
Size: Sets the width of each player:
0: 8 color clocks (1 per pixel)
1: 16 color clocks (2 per pixel)
2: 8 color clocks (1 per pixel)
3: 32 color clocks (4 per pixel)
Size Missile 3 | Size Missile 2 | Size Missile 1 | Size Missile 0 |
Size Missile n: Sets the width of the missile:
0: 8 color clocks (1 per pixel)
1: 16 color clocks (2 per pixel)
2: 8 color clocks (1 per pixel)
3: 32 color clocks (4 per pixel)
Graphics data for each player. If GRACTL player bit is set, these bytes are updated from ANTIC on every scan line. If the player bit is clear, the bytes remain at the last value written and will extend the height of the screen.
Missile 3 | Missile 2 | Missile 1 | Missile 0 |
Graphics data for all missiles. If GRACTL missile bit is set, these bytes are updated from ANTIC on every scan line. If the missile bit is clear, the bytes remain at the last value written and will extend the height of the screen.
Hue | Luminance | unused |
Color registers. See ANTIC for a description of how playfield pixel values are translated to colors.
If PRIOR 5th player bit is clear, missiles use the same colors as their respective players; if the 5th player bit is set, missiles use the color COLPF3. Otherwise, COLPF3 is only available in ANTIC text modes 4-7.
Only 3 bits of the luminance field are actually stored. However, 4 bits of luminance are used in GTIA modes. See PRIOR for a full description.
GTIA Mode | Overlap Color | 5th Player | Priority Order |
GTIA Mode: (Has no effect on CTIA chips)
0: Normal colors
1: Single hue, 16 luminances
2: Nine colors
3: 16 hues, single luminance
GTIA modes are normally only used with ANTIC's luminance-only graphics mode (F). However, GTIA will happily use the color data from any ANTIC mode line. It combines two bits from an even numbered color block with two bits from the following odd numbered color clock to get the GTIA pixel value.
In mode 1, all hues are set by the hue of COLBK. The luminances are set by the formula ((COLBKlum AND #E) OR pixel_value). This means that if the background luminance is set to 0, you can have 16 levels of luminance on the screen.
In mode 2, colors are assigned according to the following table:
Pixel Value | Color |
0 | COLPM0 |
1 | COLPM1 |
2 | COLPM2 |
3 | COLPM3 |
4 | COLPF0 |
5 | COLPF1 |
6 | COLPF2 |
7 | COLPF3 |
8 | COLBK |
9 | COLBK |
A | COLBK |
B | COLBK |
C | COLPF0 |
D | COLPF1 |
E | COLPF2 |
F | COLPF3 |
In mode 3, the color of pixel value 0 has a hue set by COLBK and a luminance of 0. The color of all other pixels have a hue set by the formula (COLBKhue OR pixel_value) and a luminance of COLBKlum. This means that if the background hue is set to 0, you can have all 16 hues showing on the screen. Note also that you cannot change the luminance of the background.
Overlap Color (unverified): If this bit is set, the overlap region of players 1 & 2 or players 3 & 4 will be the combined color of the two players - specifically, COLPMx OR COLPMy. If this bit is clear, the overlapping region will be black.
5th Player (unverified): If this bit is set, all missiles take on the color COLPF3. If this bit is clear, each missile will be the same color as its respective player.
Priority Order (needs more research): Determines which color will be shown when two or more objects overlap. Notes: In GTIA modes 1 and 3, all playfield colors count as COLBK. In CTIA mode, on ANTIC's luminance-only mode lines, priority only affects the hue; the luminance is applied to whatever color wins out. Priorities are determined by color rather than playfield value and player number. This means that in GTIA mode 2, a pixel value of 3 has the same priority as player 3, and a pixel value of C has the same priority as playfield 0 (color 1 in normal color modes).
Player 3 | Player 2 | Player 1 | Player 0 | Missile 3 | Missile 2 | Missile 1 | Missile 0 |
Vertical delay. If a bit is set, GTIA will update the corresponding player or missile on every odd scan line rather than every scan line. For double-line resolution, this has the effect of moving the player or missile down one scan line. For single-line resolution, it effectively changes the player or missile to a double-line resolution object by skipping every other scan line.
Notes: The playfield boundaries for a standard playfield (a display list starting with 24 skipped lines and 192 displayed lines) are 32 and 223. The usable screen area (at least on my television) ranges from 16 to 235. C/GTIA will not attempt to display anything outside the range 8-247. The byte offset for single-line players is the same as the scan line number, 2 * VCOUNT.
Setting different missile bits in this register shows that each missile is read independently.
unused | Latch Triggers | Player DMA | Missile DMA |
Latch Triggers: If this bit is set when a joystick trigger is pressed, TRIGn will be set to 0 and stay that way. When this bit is cleared, all TRIGn will be set to the current state of the joystick buttons.
Player DMA: When set, GRAFPn will be updated from ANTIC on every scan line (every odd scan line if VDELAY is set). If clear, GRAFPn will retain the last value written to it.
Missile DMA: When set, GRAFM will be updated from ANTIC on every scan line (every odd scan line if VDELAY is set). If clear, GRAFM will retain the last value written to it.
Writing to this register causes all the collision registers (MnPF, PnPF, MnPL, PnPL) to be cleared. Otherwise, the collision registers will accumulate all collisions.
0 | PF 3 | PF 2 | PF 1 | PF 0 |
Missile to playfield collisions. When a missile overlaps with any of COLPF0-COLPF3, the corresponding bit is set in that missile's collision register.
0 | PF 3 | PF 2 | PF 1 | PF 0 |
Player to playfield collisions. When a player overlaps with any of COLPF0-COLPF3, the corresponding bit is set in that player's collision register.
0 | P 3 | P 2 | P 1 | P 0 |
Missile to player collisions. When a missile overlaps with any of COLPM0-COLPM3 (either as a player or a GTIA mode 2 color), the corresponding bit is set in that missile's collision register. Note that collisions with other missiles are not detected, whether they are using COLPMn or COLPF3; each register acts as if the other missiles don't exist.
0 | P 3 | P 2 | P 1 | P 0 |
Player to player collisions. When a player overlaps with any of COLPM0-COLPM3 (either as a player or a GTIA mode 2 color), the corresponding bit is set in that player's collision register. Note that collisions with missiles are not detected, whether they are using COLPMn or COLPF3; they act as if the missiles don't exist.
0 | Trigger |
Joystick trigger status. Reads 1 if the trigger switch is open, and 0 if either the trigger switch is currently closed or if the Latch Triggers bit of GRACTL is set and the trigger has been closed since the bit was set. This register will only reset to 1 when the Latch Triggers bit is clear.
0 | NTSC | 1 |
If this computer is designed for the NTSC television standard (used in North America), the NTSC bits will all be set. If this computer is designed for the PAL standard (used in Europe), the NTSC bits will be clear.
On NTSC systems, vertical blank occurs at 60Hz. Since the computer's clock speed is tied to the television color frequency, and the chrominance signal is defined as 3.579545MHz, the CPU speed is 1.7897725MHz. There are 262.5 scan lines vertically and approximately 210 color clocks horizontally (taking out the delays for horizontal blanking and color burst. I forgot to write down the exact timing values before returning the book.)
On PAL systems, vertical blank occurs at 50Hz. The CPU speed is approximately 2.217MHz. (I don't have more detailed timing values for the PAL television standard. The number of scan lines is somewhere around 312, which may affect the vertical display ranges.)
(W) unused; (R) 0 | (R/W) Internal Speaker | (R) Option | (R) Select | (R) Start |
Internal Speaker: Switches the voltage to the internal speaker; in other words, changing this bit from 0 to 1 or from 1 to 0 will cause a click from inside the computer. The OS sets this bit during every vertical blank, so just clearing this bit is enough to make a click, and constantly writing 0 will result in a continuous buzz. Toggling this bit back and forth in a tighter loop will result in a higher pitched buzz, such as the OS does when making the beep sound for CHR(125).
Option: This bit is clear if the Option button is pressed; clear otherwise.
Select: This bit is clear if the Select button is pressed; clear otherwise.
Start: This bit is clear if the Start button is pressed; clear otherwise.