Sprite port-mirror Index Register
From SpecNext Wiki
| Next Register 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 NextPort:$303B (sprite index for port NextPort:$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 NextPort:$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 NextPort:$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.