Difference between revisions of "Clip Window Sprites Register"

From SpecNext official Wiki
Jump to: navigation, search
m (extra bit of info from forums)
m (6 revisions imported)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
 
|ShortDesc=Sets and reads clip-window for Sprites
 
|ShortDesc=Sets and reads clip-window for Sprites
 
}}
 
}}
# read/write: X1 position
+
The coordinates are stored under index:
# read/write: X2 position
+
{| class="wikitable"
# read/write: Y1 position
+
|-
# read/write: Y2 position
+
! Index !! Coordinate
 +
|-
 +
| 0 || X1 position
 +
|-
 +
| 1 || X2 position
 +
|-
 +
| 2 || Y1 position
 +
|-
 +
| 3 || Y2 position
 +
|}
  
The values are 0,255,0,191 after a Reset.
+
The current read/write index (which coordinate is selected) can be read or reset by {{NextRegNo|$1C}}.
 +
 
 +
Write to register will modify currently selected coordinate, and auto-increment index (wrapping from 3 to 0).
 +
 
 +
Read from register will only read currently selected coordinate, index is not modified (to read next coordinate, write the current coordinate value back, to increment index).
 +
 
 +
The coordinate values are 0,255,0,191 after a Reset.
 +
 
 +
The displayed area is "inclusive", i.e. for default values full 256x192 pixel area is displayed.
  
 
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 {{NextRegNo|$15}}, and X-axis coordinates of clip-window are then doubled, see the {{NextRegNo|$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. Although setting it larger (like {0,255,0,255}) should be safe operation and still the full 320x256 area for sprite pixels will be visible.
 
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 {{NextRegNo|$15}}, and X-axis coordinates of clip-window are then doubled, see the {{NextRegNo|$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. Although setting it larger (like {0,255,0,255}) should be safe operation and still the full 320x256 area for sprite pixels will be visible.
 
The current read/write index (which coordinate is next) can be read or reset by {{NextRegNo|$1C}}.
 

Latest revision as of 09:59, 14 April 2019

Number $19
Readable Yes
Writable Yes
Short Description Sets and reads clip-window for Sprites

The coordinates are stored under index:

Index Coordinate
0 X1 position
1 X2 position
2 Y1 position
3 Y2 position

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

Write to register will modify currently selected coordinate, and auto-increment index (wrapping from 3 to 0).

Read from register will only read currently selected coordinate, index is not modified (to read next coordinate, write the current coordinate value back, to increment index).

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

The displayed area is "inclusive", i.e. for default values full 256x192 pixel area is displayed.

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. Although setting it larger (like {0,255,0,255}) should be safe operation and still the full 320x256 area for sprite pixels will be visible.