Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
hardware:magic_system [2016/06/11 12:24] ex_writer [Intercept Register (Collision Detection)] |
hardware:magic_system [2016/06/11 12:35] (current) ex_writer [Example: Space Invaders] |
||
---|---|---|---|
Line 103: | Line 103: | ||
| 7 | Intercept in pixel 0 in last OR or XOR write | | | 7 | Intercept in pixel 0 in last OR or XOR write | | ||
+ | From [[http://www.ballyalley.com/faqs/BPA%20Video%20Hardware%20FAQ/Bally_Professional_Arcade_Video_Hardware%20(2001)(Tony%20Miller).pdf|A Description of the Bally Professional Arcade Video Hardware]], p. 24: | ||
+ | |||
+ | > "The Intercept register contains several flag bits which save the result of previous OR or XOR Magic Memory writes. If any of bits [3:0] are set, this indicates that the previous write to the corresponding pixel (bit[3] = pixel[3], etc.,) wrote a non-zero pixel with a non-zero value. Bits [3:0] track the last Magic memory write, while bits [7:4] track //any// write to the corresponding pixel (bit[7]=pixel[3],etc.,) since the last time the Intercept register was read. Thus, once any of bits [7:4] are set to logical 1, they will remain that way until the register is read, at which time these bits will be cleared to logical 0." | ||
=== Example: Space Invaders === | === Example: Space Invaders === | ||
Line 113: | Line 116: | ||
</code> | </code> | ||
- | Directly after the pattern write, intercept status is loaded in A, then A is ORed to see if any bits are set (indicating an intercept). If the OR result is 0, no collision occurs, and the collision check subroutine exits. | + | Directly after the pattern write, intercept status is loaded in A, then A is ORed to see if any bits are set (indicating an intercept). If the OR result is 0, no collision occurs, and the collision check subroutine exits. (//Football// uses an identical check.) |
---- | ---- |