Difference between revisions of "Sprite Status/Slot Select"
From SpecNext official Wiki
Line 2: | Line 2: | ||
|Number=$303B | |Number=$303B | ||
|ShortDesc=Selects active sprite slot and palette address, and returns sprite status. | |ShortDesc=Selects active sprite slot and palette address, and returns sprite status. | ||
+ | |PortMask=%0011 0000 0011 1011 ?? | ||
|Readable=Yes | |Readable=Yes | ||
|Writable=Yes | |Writable=Yes |
Revision as of 16:55, 28 August 2017
Number | $303B |
---|---|
Decimal | |
Short desc. | Selects active sprite slot and palette address, and returns sprite status. |
Bit Mask | %0011 0000 0011 1011 ?? |
Readable | Yes |
Writable | Yes |
Subsystem | Sprites |
Used to select the sprite slot configured by Sprite Attribute Upload ($xx57 / 87) and Sprite Pattern Upload ($xx5B / 91). Once written, these ports may auto-increment the sprite number they are addressing. This auto-increment happens independently and so the two ports may end up addressing different sprites as a result. A write to this port will resynchronise them to the same sprite.
Also "initializes the address of the palette".
When read, returns sprite status information as follows:
Bit | Effect |
---|---|
2-7 | Reserved |
1 | Max sprites per line flag (set if more than 12 sprites share a line) |
0 | Collision flag (set if non transparent areas of any 2 sprites overlap) |
It is not possible to obtain from the sprite hardware the numbers or IDs of the sprites which overlapped. The collision flag should thus be seen as initial broad phase collision detection.