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!
READ | Name | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | Collisions |
$00 | CXM0P | M0P1 | M0P0 | M0 ↔ P1, M0 ↔ P0 | ||||||
$01 | CXM1P | M1P0 | M1P0 | M1 ↔ P0, M1 ↔ P1 | ||||||
$02 | CXP0FB | P0PF | P0BL | P0 ↔ PF, P0 ↔ BL | ||||||
$03 | CXP1FB | P1PF | P1BL | P1 ↔ PF, P1 ↔ BL | ||||||
$04 | CXM0FB | M0PF | M0BL | M0 ↔ PF, M0 ↔ BL | ||||||
$05 | CXM1FB | M1PF | M1BL | M1 ↔ PF, M1 ↔ BL | ||||||
$06 | CXBLPF | BLPF | 0 | BL ↔ PF | ||||||
$07 | CXPPMM | P0P1 | M0M1 | P0 ↔ P1, M0 ↔ M1 |
Bits D5 - D0 (marked
) 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 |