Clip Window Sprites Register

From SpecNext official Wiki
Revision as of 12:44, 29 December 2018 by wiki>Ped7g (added example of maximum clip window in the over-border case.)
Jump to: navigation, search
Number $19
Readable Yes
Writable Yes
Short Description Sets and reads clip-window for Sprites
  1. read/write: X1 position
  2. read/write: X2 position
  3. read/write: Y1 position
  4. read/write: Y2 position

The values are 0,255,0,191 after a Reset.

Clip window on Sprites works by default only when the "draw over border" is disabled. With "over border" enabled, the clip window must be enabled extra by bit 5 in Sprite and Layers System Register ($15), and X-axis coordinates of clip-window are then doubled, see the Sprite and Layers System Register ($15) for details and example. Set it to {0,159,0,255} to cover whole pixel+border sprite area (320x256 pixels area of display) in the x-axis doubled mode.

The current read/write index (which coordinate is next) can be read or reset by Clip Window Control Register ($1C).