Sprite port-mirror Index Register

From SpecNext official Wiki
Revision as of 17:20, 28 December 2018 by wiki>Ped7g (Core 2.00.23 changes (sprite-index link with port $303B))
Jump to: navigation, search
Number $34
Readable Yes
Writable Yes
Short Description Selects sprite index 0..63 to be affected by writes to other Sprite ports (and mirrors).
Bit Description
7 Enable "link" with I/O port Sprite Status/Slot Select ($303B / 12347) (sprite index for port Sprite Attribute Upload ($xx57 / 87)) (1 = interlinked, 0 = decoupled)
6 reserved, write 0
5-0 Sprite index (0..63), which sprite-attributes will be modified.

When the index is "linked" (bit 7 is set), it ties the nextreg sprite-index and the I/O sprite-index together.

  • any change to the nextreg sprite number via write to nextreg $34 or auto-inc on nextreg $75-$79 will set the sprite index for I/O to the same and also reset the I/O attribute port Sprite Attribute Upload ($xx57 / 87) (next write to sprite-attribute port will modify first byte of attributes of particular sprite)
  • any change to sprite number via I/O port Sprite Status/Slot Select ($303B / 12347) or auto-inc via I/O port $xx57 will also be reflected in nextreg $34.

This link is broken by writing to nextreg $34 with bit 7 reset.