GTIA Documentation

by Fox/Taquart


Registers

 Address  Read register  Write register   Address  Read register  Write register 
^00KOLM0PFHPOSP0 ^10TRIG0GRAFP3
^01KOLM1PFHPOSP1 ^11TRIG1GRAFPM
^02KOLM2PFHPOSP2 ^12unusedCOLPM0
^03KOLM3PFHPOSP3 ^13TRIG3COLPM1
^04KOLP0PFHPOSM0 ^14PALCOLPM2
^05KOLP1PFHPOSM1 ^15unusedCOLPM3
^06KOLP2PFHPOSM2 ^16unusedCOLPF0
^07KOLP3PFHPOSM3 ^17unusedCOLPF1
^08KOLM0PSIZEP0 ^18unusedCOLPF2
^09KOLM1PSIZEP1 ^19unusedCOLPF3
^0AKOLM2PSIZEP2 ^1AunusedCOLBAK
^0BKOLM3PSIZEP3 ^1BunusedGTIACTL
^0CKOLP0PSIZEM ^1CunusedVDELAY
^0DKOLP1PGRAFP0 ^1DunusedPMCNTL
^0EKOLP2PGRAFP1 ^1EunusedHITCLR
^0FKOLP3PGRAFP2 ^1FCONSOLCONSOL


Description

COLBAK - Color of background
bit 0 - unused
bits 3-1 - luminace
bits 7-4 - hue

COLPF0 COLPF1 COLPF2 COLPF3 - Colors of player field
bit 0 - unused
bits 3-1 - luminace
bits 7-4 - hue

COLPM0 COLPM1 COLPM2 COLPM3 - Colors of players and missiles
bit 0 - unused
bits 3-1 - luminace
bits 7-4 - hue

CONSOL - Consol keys
This is the only read/write register in GTIA. Value written is negated on read. Bits 0-2 are ANDed with keys status. Reset bit means key pressed.
bit 0 - START key
bit 1 - SELECT key
bit 2 - OPTION key
bit 3 - click sound
bits 4-7 - unused (=0)

GRAFM - Graphics of missiles
bits 1,0 - graphics of missile 0
bits 3,2 - graphics of missile 1
bits 5,4 - graphics of missile 2
bits 7,6 - graphics of missile 3

GRAFP0 GRAFP1 GRAFP2 GRAFP3 - Graphics of players

GTIACTL - GTIA control
bits 3-0 - priorities of players and missiles
0001 - P0, P1, P2, P3, PF0, PF1, PF2, PF3, BAK
0010 - P0, P1, PF0, PF1, PF2, PF3, P2, P3, BAK
0100 - PF0, PF1, PF2, PF3, P0, P1, P2, P3, BAK
1000 - PF0, PF1, P0, P1, P2, P3, PF2, PF3, BAK
Players/missiles and playfields are mentioned from highest to lowest priority.
Other combinations of bits 3-0 cause strange side effects.
bit 4 - set all missiles color to COLPF3
bit 5 - enable ORing colors P0 with P1 and P2 with P3 on common areas
bits 7,6 - GTIA extra graphics mode
00 - off
01 - 16 luminaces
10 - 9 colors
11 - 16 hues

HITCLR - Clear collision registers
Any value written to this register causes collision registers to be reset.

HPOSM0 HPOSM1 HPOSM2 HPOSM3 - Horizontal positions of missiles

HPOSP0 HPOSP1 HPOSP2 HPOSP3 - Horizontal positions of players

KOLM0P KOLM1P KOLM2P KOLM3P - Collisions of missiles with players
bit 0 - collision with player 0
bit 1 - collision with player 1
bit 2 - collision with player 2
bit 3 - collision with player 3
bits 4-7 - unused (=0)

KOLM0PF KOLM1PF KOLM2PF KOLM3PF - Collisions of missiles with playfield
bit 0 - collision with playfield 0
bit 1 - collision with playfield 1
bit 2 - collision with playfield 2
bit 3 - collision with playfield 3
bits 4-7 - unused (=0)

KOLP0P KOLP1P KOLP2P KOLP3P - Collisions of players with players
bit 0 - collision with player 0
bit 1 - collision with player 1
bit 2 - collision with player 2
bit 3 - collision with player 3
bits 4-7 - unused (=0)

KOLP0PF KOLP1PF KOLP2PF KOLP3PF - Collisions of players with playfield
bit 0 - collision with playfield 0
bit 1 - collision with playfield 1
bit 2 - collision with playfield 2
bit 3 - collision with playfield 3
bits 4-7 - unused (=0)

PAL - PAL system flag
bit 0 - unused
bits 1-3 - 000 if TV system is PAL. Else it is NTSC
bits 4-7 - unused (=0)

PMCTL - Player/Missile Control
bit 0 - get missiles data from ANTIC
bit 1 - get players data from ANTIC
bit 2 - lock triggers when pressed
bits 3-7 - unused

SIZEM - Sizes of missiles
Two bits set size of each missile:
00 - single size
01 - double size
10 - single size
11 - quad size
bits 1,0 - size of missile 0
bits 3,2 - size of missile 1
bits 5,4 - size of missile 2
bits 7,6 - size of missile 3

SIZEP0 SIZEP1 SIZEP2 SIZEP3 - Sizes of players
bits 1,0 - size of player (see
SIZEM)
bits 2-7 - unused

TRIG0 TRIG1 TRIG3 - Triggers
TRIG0 and TRIG1 contain trigger status of two joysticks. TRIG3 contains presence of cartridge.
bit 0 - reset if trigger pressed
bits 1-7 - unused (=0)

VDELAY - Vertical delay of players and missiles
Causes players and missiles to be displayed one scanline lower. Works only in two-line resolution.
bit 0 - delay missile 0
bit 1 - delay missile 1
bit 2 - delay missile 2
bit 3 - delay missile 3
bit 4 - delay player 0
bit 5 - delay player 1
bit 6 - delay player 2
bit 7 - delay player 3