Sprite Status/Slot Select: Difference between revisions
No edit summary |
Core 2.00.22 changes. |
||
| Line 10: | Line 10: | ||
Also "initializes the address of the palette". | Also "initializes the address of the palette". | ||
Write to this port with bit 7 set adds an offset of 128 to the pattern upload index (aiming at the second half of 256 byte pattern slot 0..63). | |||
When read, returns sprite status information as follows: | When read, returns sprite status information as follows: | ||
Revision as of 02:00, 20 December 2018
| Number | PortNumber::$303B |
|---|---|
| Decimal | NumberDec:: |
| Short desc. | ShortDesc::Selects active sprite slot and palette address, and returns sprite status. |
| Bit Mask | [[PortMask::%0011 0000 0011 1011 ??]] |
| Readable | Readable::Yes |
| Writable | Writable::Yes |
| Subsystem | Subsystem::Sprites |
Used to select the sprite slot configured by {{#ask: PortNumber::$xx57 }} ($xx57{{#ask: PortNumber::$xx57 |mainlabel=- |headers=hide |intro= / |?NumberDec#- }}) and {{#ask: PortNumber::$xx5B }} ($xx5B{{#ask: PortNumber::$xx5B |mainlabel=- |headers=hide |intro= / |?NumberDec#- }}). 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".
Write to this port with bit 7 set adds an offset of 128 to the pattern upload index (aiming at the second half of 256 byte pattern slot 0..63).
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.