Sprite Pattern Upload: Difference between revisions
core 2.00.23 changes |
mNo edit summary |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
{{Port | {{Port | ||
|Number=$xx5B | |Number=$xx5B | ||
|NumberDec=91 | |||
|PortMask=%---- ---- 0101 1011 ?? | |||
|ShortDesc=Used to upload the pattern of the selected sprite. | |ShortDesc=Used to upload the pattern of the selected sprite. | ||
|Readable=No | |Readable=No | ||
|Writable=Yes | |Writable=Yes | ||
| Line 9: | Line 10: | ||
Used to upload sprite patterns. Sprite patterns are 16x16 (256 bytes for 8 bit colour and 128 bytes for 4 bit colour sprites) and are sent in English reading order. Each byte is the offset, 0-255 (or two 0-15 for 4-bit graphics), within the active sprite palette. After sending 256 bytes, the target pattern slot is auto-incremented. This auto-increment is independent of other sprite registers. | Used to upload sprite patterns. Sprite patterns are 16x16 (256 bytes for 8 bit colour and 128 bytes for 4 bit colour sprites) and are sent in English reading order. Each byte is the offset, 0-255 (or two 0-15 for 4-bit graphics), within the active sprite palette. After sending 256 bytes, the target pattern slot is auto-incremented. This auto-increment is independent of other sprite registers. | ||
Auto-increment from pattern slot 63 | Auto-increment from pattern slot 63 will wrap to slot 0 (only 64 pattern slots will be available in foreseeable future, and if ever extended, there will be separate configuration bit to enable more than 64 pattern slots). | ||
With 4 bit sprites each pattern slot contains effectively two patterns, each 128 bytes long, the sub-pattern displayed is selected by "N6" bit in 5th sprite-attribute byte. | |||
With 4 | With 4 bit graphics the top bits (of each pattern byte) 7-4 are "left" pixel on display and bits 3-0 are "right next to it" pixel on display (in default mode, no mirror, no rotate). | ||
Latest revision as of 11:49, 4 May 2020
| Number | PortNumber::$xx5B |
|---|---|
| Decimal | NumberDec::91 |
| Short desc. | ShortDesc::Used to upload the pattern of the selected sprite. |
| Bit Mask | PortMask::%---- ---- 0101 1011 ?? |
| Readable | Readable::No |
| Writable | Writable::Yes |
| Subsystem | Subsystem::Sprites |
Used to upload sprite patterns. Sprite patterns are 16x16 (256 bytes for 8 bit colour and 128 bytes for 4 bit colour sprites) and are sent in English reading order. Each byte is the offset, 0-255 (or two 0-15 for 4-bit graphics), within the active sprite palette. After sending 256 bytes, the target pattern slot is auto-incremented. This auto-increment is independent of other sprite registers.
Auto-increment from pattern slot 63 will wrap to slot 0 (only 64 pattern slots will be available in foreseeable future, and if ever extended, there will be separate configuration bit to enable more than 64 pattern slots).
With 4 bit sprites each pattern slot contains effectively two patterns, each 128 bytes long, the sub-pattern displayed is selected by "N6" bit in 5th sprite-attribute byte.
With 4 bit graphics the top bits (of each pattern byte) 7-4 are "left" pixel on display and bits 3-0 are "right next to it" pixel on display (in default mode, no mirror, no rotate).