Sprite Attribute 3 (with INC) Register: Difference between revisions
From SpecNext Wiki
m 2 revisions imported |
refresh sprite info |
||
| Line 11: | Line 11: | ||
| 7 || Enable visibility | | 7 || Enable visibility | ||
|- | |- | ||
| 6 || | | 6 || Enable fifth sprite attribute byte | ||
|- | |- | ||
| 5-0 || Pattern index ("Name") | | 5-0 || Pattern index ("Name") | ||
|} | |} | ||
When the bit 6 is "0", the sprite renderer will ignore value written in fifth attribute byte, for example by {{NextRegNo|$39}}, and it will use zero for all the features of fifth attribute byte (it is safe to initialize only four bytes if you are planning to use 4-byte type of sprites). | |||
If you want the value in fifth attribute byte to apply during rendering, bit 6 here must be set to "1". | |||
After write into sprite-attribute "byte 4" ({{PortNo|$xx57}}), the {{NextRegNo|$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. | After write into sprite-attribute "byte 4" ({{PortNo|$xx57}}), the {{NextRegNo|$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. | ||
Revision as of 23:19, 9 December 2019
| Next Register Number | $78 |
|---|---|
| Readable | No |
| Writable | Yes |
| Short Description | Same as NextReg:$38 (write fourth byte of sprite-attributes), plus increments NextReg:$34 |
Byte 4 is bitmapped:
| Bit | Description |
|---|---|
| 7 | Enable visibility |
| 6 | Enable fifth sprite attribute byte |
| 5-0 | Pattern index ("Name") |
When the bit 6 is "0", the sprite renderer will ignore value written in fifth attribute byte, for example by NextReg:$39, and it will use zero for all the features of fifth attribute byte (it is safe to initialize only four bytes if you are planning to use 4-byte type of sprites).
If you want the value in fifth attribute byte to apply during rendering, bit 6 here must be set to "1".
After write into sprite-attribute "byte 4" (NextPort:$xx57), the NextReg:$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.