Sprite Attribute 1 (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 1 (with INC) Register to Sprite Attribute 1 (with INC) Register: match formal nextreg.txt name)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Number TBRegisterNumber::$76
Readable TBRegisterReadable::No
Writable TBRegisterWritable::Yes
Short Description [[ShortDesc::Same as {{#ask:

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

Eight low bits of Y position. MSB of Y-pos is in "byte 5".

After write into sprite-attribute "byte 2" ({{#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.