Sprite Attribute Upload
From SpecNext official Wiki
Revision as of 15:09, 18 August 2017 by wiki>Hyphz
Number | $xx57 |
---|---|
Decimal | |
Short desc. | Uploads sprite positions, visibility and effect flags. |
Bit Mask | |
Readable | No |
Writable | Yes |
Subsystem | Sprites |
Uploads attributes of the sprite slot selected by Sprite Status/Slot Select ($303B / 12347). Attributes are in 4 byte blocks sent in the following order; after sending 4 bytes the address auto-increments to the next sprite. This auto-increment is independent of other sprite ports. The 4 bytes are as follows:
Byte 1 is the low bits of the X position. Legal X positions are 0-319 if sprites are allowed over the border or 32-287 if not. The MSB is in byte 3.
Byte 2 is the Y position. Legal Y positions are 0-255 if sprites are allowed over the border or 32-223 if not.
Byte 3 is bitmapped:
Bit | Description |
---|---|
4-7 | Palette offset, added to each palette index from pattern before drawing |
3 | Enable X mirror |
2 | Enable Y mirror |
1 | Enable rotation |
0 | MSB of X coordinate |
Byte 4 is also bitmapped:
Bit | Description |
---|---|
7 | Enable visibility |
6 | Reserved |
5-0 | Pattern index ("Name") |