Difference between revisions of "Sprite port-mirror Index Register"

From SpecNext official Wiki
Jump to: navigation, search
(Core 2.00.22 changes, and forum knowledge from Jim Bagley distilled.)
 
(Core 2.00.23 changes (sprite-index link with port $303B))
Line 3: Line 3:
 
|Readable=Yes
 
|Readable=Yes
 
|Writable=Yes
 
|Writable=Yes
|ShortDesc=Selects sprite index 0..63 to be affected by writes to other Sprite port-mirrors.
+
|ShortDesc=Selects sprite index 0..63 to be affected by writes to other Sprite ports (and mirrors).
 
}}
 
}}
Bits 7-6 are reserved (write 0), bits 5-0 are sprite index (0..63).
+
{|class="wikitable"
 +
! Bit !! Description
 +
|-
 +
| 7 || Enable "link" with I/O port {{PortNo|$303B}} (sprite index for port {{PortNo|$xx57}}) (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 {{PortNo|$xx57}} (next write to sprite-attribute port will modify first byte of attributes of particular sprite)
 +
* any change to sprite number via I/O port {{PortNo|$303B}} 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.

Revision as of 18:20, 28 December 2018

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.