Loading...
 

Collision Registers

Collision Registers

The TIA detects collisions between any of the 6 objects it generates (the playfield and 5 moveable objects). There are 15 possible two-object collisions which are stored in 15 one-bit latches. Each collision register contains two of these latches which are read by the microprocessor on D6 and D7 of the data bus for easy access. A 1 on the data line indicates the collision it records has occurred. The collision registers could be read at any time but is usually done during vertical blank after all possible collisions have occurred. They may be cleared by writing to CXCLR.
These are read-only registers!

READName
D7
D6
D5
D4
D3
D2
D1
D0
Collisions
$00CXM0P
M0P1
M0P0
X
X
X
X
X
X
M0 ↔ P1, M0 ↔ P0
$01CXM1P
M1P0
M1P0
X
X
X
X
X
X
M1 ↔ P0, M1 ↔ P1
$02CXP0FB
P0PF
P0BL
X
X
X
X
X
X
P0 ↔ PF, P0 ↔ BL
$03CXP1FB
P1PF
P1BL
X
X
X
X
X
X
P1 ↔ PF, P1 ↔ BL
$04CXM0FB
M0PF
M0BL
X
X
X
X
X
X
M0 ↔ PF, M0 ↔ BL
$05CXM1FB
M1PF
M1BL
X
X
X
X
X
X
M1 ↔ PF, M1 ↔ BL
$06CXBLPF
BLPF
0
X
X
X
X
X
X
BL ↔ PF
$07CXPPMM
P0P1
M0M1
X
X
X
X
X
X
P0 ↔ P1, M0 ↔ M1

Bits D5 - D0 (marked X ) are indeterminate (not driven by hardware) and should not be used.
M0 = Missile 0, M1 = Missile 1, P0 = Player 0, P1 = Player 1, PF = Playfield, BL = Ball

Collision Matrix

Locate the two colliding objects (one in a row, the other in a column), and the intersecting cell in the table will give you the collision register, and which bit to check. The colours are also a quick-reference to the register.

Player 0
Player 1
Missile 0
Missile 1
Playfield
Ball
Player 0
CXPPMM
D7
CXM0P
D6
CXM1P
D6
CXP0FB
D7
CXP0FB
D6
Player 1
CXPPMM
D7
CXM0P
D7
CXM1P
D7
CXP1FB
D7
CXP1FB
D6
Missile 0
CXM0P
D6
CXM0P
D7
CXPPMM
D6
CXM0FB
D7
CXM0FB
D6
Missile 1
CXM1P
D6
CXM1P
D7
CXPPMM
D6
CXM1FB
D7
CXM1FB
D6
Playfield
CXP0FB
D7
CXP1FB
D7
CXM0FB
D7
CXM1FB
D7
CXBLPF
D7
Ball
CXP0FB
D6
CXP1FB
D6
CXM0FB
D6
CXM1FB
D6
CXBLPF
D7

see CXCLR Collision Reset Register
see TIA