Sprite Attribute 2 (with INC) Register: Difference between revisions

From SpecNext Wiki
Jump to: navigation, search
core 2.00.23 changes
 
 
(3 intermediate revisions by 2 users not shown)
Line 17: Line 17:
| 1 || Enable rotation
| 1 || Enable rotation
|-
|-
| 0 || MSB of X coordinate
| 0 || '''anchor''' sprite: MSB of X coordinate<br />
'''relative''' sprite: enable relative Palette offset (1 = the anchor Palette offset is added, 0 = independent Palette offset)
|}
|}


After write into sprite-attribute "byte 3" ({{PortNo|$xx57}}), the {{NextRegNo|$34}} is incremented (with all consequences stemming from such action). If the sprite 63 was modified, the result of the increment is officially "undefined behaviour", and code should explicitly set valid 0..63 sprite index before next sprite-attribute manipulation.
After write into sprite-attribute "byte 3" ({{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.

Latest revision as of 12:18, 14 October 2025

Number TBRegisterNumber::$77
Readable TBRegisterReadable::No
Writable TBRegisterWritable::Yes
Short Description [[ShortDesc::Same as {{#ask:

TBRegisterNumber::$37 }} ($37) (write third byte of sprite-attributes), plus increments {{#ask: TBRegisterNumber::$34 }} ($34)]]

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 anchor sprite: MSB of X coordinate

relative sprite: enable relative Palette offset (1 = the anchor Palette offset is added, 0 = independent Palette offset)

After write into sprite-attribute "byte 3" ({{#ask: PortNumber::$xx57 }} ($xx57{{#ask: PortNumber::$xx57 |mainlabel=- |headers=hide |intro= /  |?NumberDec#- }})), the {{#ask: TBRegisterNumber::$34 }} ($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.