Sprite Attribute 2 (with INC) Register

From SpecNext Wiki
Revision as of 12:18, 14 October 2025 by Xalior (talk | contribs) (Xalior moved page Sprite port-mirror Attribute 2 (with INC) Register to Sprite Attribute 2 (with INC) Register: match formal nextreg.txt name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Next Register Number $77
Readable No
Writable Yes
Short Description Same as NextReg:$37 (write third byte of sprite-attributes), plus increments NextReg:$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" ( IO:$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.