Difference between revisions of "Sprite port-mirror Attribute 4 (with INC) Register"
(Core 2.00.27 (or 28) changes to relative sprite system.) |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
|Readable=No | |Readable=No | ||
|Writable=Yes | |Writable=Yes | ||
− | |ShortDesc= | + | |ShortDesc=The same as {{NextRegNo|$39}} (write fifth byte of sprite-attributes), plus increments {{NextRegNo|$34}} |
}} | }} | ||
Byte 5 is bitmapped: | Byte 5 is bitmapped: |
Latest revision as of 23:31, 19 April 2019
Number | $79 |
---|---|
Readable | No |
Writable | Yes |
Short Description | The same as Sprite port-mirror Attribute 4 Register ($39) (write fifth byte of sprite-attributes), plus increments Sprite port-mirror Index Register ($34) |
Byte 5 is bitmapped:
- For anchor sprites:
Bit | Description |
---|---|
7-6 | "H N6" - "H" is 4/8 bit graphics selector, "N6" is sub-pattern selector for 4 bit modes. %00 = 8-bit colour patterns (256 bytes), this sprite is "anchor" |
5 | Type for following relative sprites: 0 = "composite", 1 = "big sprite" |
4-3 | x-axis scale factor: %00 = 1x (16 pixels), %01 = 2x, %10 = 4x, %11 = 8x (128 pixels) |
2-1 | y-axis scale factor: %00 = 1x (16 pixels), %01 = 2x, %10 = 4x, %11 = 8x (128 pixels) |
0 | MSB of Y coordinate |
- For composite relative sprites:
Bit | Description |
---|---|
7-6 | %01 = relative sprite |
5 | "N6" bit, in 4-bit colour mode 0 = using bytes 0..127 of pattern slot, 1 = using bytes 128..255 of pattern slot. In 8-bit mode use 0. |
4-3 | x-axis scale factor: %00 = 1x (16 pixels), %01 = 2x, %10 = 4x, %11 = 8x (128 pixels) |
2-1 | y-axis scale factor: %00 = 1x (16 pixels), %01 = 2x, %10 = 4x, %11 = 8x (128 pixels) |
0 | Enable relative pattern offset (1 = Pattern index is added to anchor pattern index, 0 = independent pattern index) |
- For big-sprite relative sprites:
Bit | Description |
---|---|
7-6 | %01 = relative sprite |
5 | "N6" bit, in 4-bit colour mode 0 = using bytes 0..127 of pattern slot, 1 = using bytes 128..255 of pattern slot. In 8-bit mode use 0. |
4-1 | use 0 (scaling is defined by anchor sprite) |
0 | Enable relative pattern offset (1 = Pattern index is added to anchor pattern index, 0 = independent pattern index) |
See Sprite Attribute Upload ($xx57 / 87) for extra notes about anchor/relative sprites, coordinates and clipping.
After write into sprite-attribute "byte 5" (Sprite Attribute Upload ($xx57 / 87)), the Sprite port-mirror Index Register ($34) is incremented (with all consequences stemming from such action). If the sprite 127 was modified, the result of the increment is officially "undefined behaviour", and code should explicitly set valid 0..127 sprite index before next sprite-attribute manipulation.