Yamaha V9938 Programmer's Manual page 106

Msx-video
Table of Contents

Advertisement

5.2.6. Sprite collision
If CC bit is set to 0 and two sprites overlap with their color code 1 (the dots of two
sprites defined by "1" in their bitmap), a sprite collision event occur, and bit 5 ("C") of
status register S#0 will be set to "1". This bit will be reset when S#0 is read.
When collision occurs and neither mouse flag (MO) nor the light pen flag (LP) of the
register R#8 are set, status registers S#3 to S#6 will contain coordinates of the collision.
When status register S#5 is read, all the contents of registers S#3 to S#6 are reset.
This means that program should read status registers S#3, S#4 and S#6 before reading
status register S#5. Collision coordinates can be calculated using the following formulas:
X (S#4, S#3),
XC=X-12
© 1985 ASCII CORP. / NIPPON GAKKI CO.
Y (S#6, S#5)
YC=Y-8
Page 106 of 108
© 2010-2015 Eugeny Brychkov

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents