Difference between revisions of "Clip Window Layer 2 Register"

From SpecNext official Wiki
Jump to: navigation, search
(added info + Core 2.00.22 changes (readable now))
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|Readable=Yes
 
|Readable=Yes
 
|Writable=Yes
 
|Writable=Yes
|ShortDesc=Sets and reads clip-window for Layer 2
+
|ShortDesc=Sets and reads clip-window for Layer 2.
 
}}
 
}}
# 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.
 +
 
 +
For Layer 2 modes ({{NextRegNo|$70}}) with higher X resolution than 256 the X clip coordinates are doubled (320x256) or quadrupled (640x256) in same way how Sprites and Tilemap clip window works.

Latest revision as of 18:43, 14 August 2024

Number $18
Readable Yes
Writable Yes
Short Description Sets and reads clip-window for Layer 2.

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.

For Layer 2 modes (Layer 2 Control Register ($70)) with higher X resolution than 256 the X clip coordinates are doubled (320x256) or quadrupled (640x256) in same way how Sprites and Tilemap clip window works.