Difference between revisions of "Sprite and Layers System Register"

From SpecNext official Wiki
Jump to: navigation, search
m
m
Line 27: Line 27:
  
 
When both "over border" (bit 1) and "clipping over border" (bit 5) is enabled, the Sprite clipping window {{NextRegNo|$19}} '''X-axis''' coordinates are "doubled", and coordinates origin is moved from pixel [0,0] position to sprite [0,0] position ([-32,-32] pixel position). For example: setting clip coordinates as {x1:5, x2:155, y1:7, y2:248} will make sprites visible in area [10,7]..[309,248] (inclusively) in sprite coordinates.
 
When both "over border" (bit 1) and "clipping over border" (bit 5) is enabled, the Sprite clipping window {{NextRegNo|$19}} '''X-axis''' coordinates are "doubled", and coordinates origin is moved from pixel [0,0] position to sprite [0,0] position ([-32,-32] pixel position). For example: setting clip coordinates as {x1:5, x2:155, y1:7, y2:248} will make sprites visible in area [10,7]..[309,248] (inclusively) in sprite coordinates.
 +
 +
[[User:Ped7g|Ped7g]] ([[User talk:Ped7g|talk]]) 07:41, December 24, 2018 (UTC) note the doubled coordinates behave (core version 2.00.22 is described above) differently to normal coordinates, for example in X1=X2 case: normal clip window will display one pixel, but doubled coordinates will test X2*2-1 < X1*2, so no pixel should be displayed. This inconsistency has been raised in forum, and may change eventually (I would personally expect X2*2+1 boundary applied, so X1=X2 would produce 2-pixel-wide visible area, or even X2*2 producing odd-sized areas (up till full 320 sprite coordinate range) sounds reasonable), as new core was not yet released. So the details are "to be confirmed" by final version in published 2.00.22+ core.

Revision as of 07:41, 24 December 2018

Number $15
Readable Yes
Writable Yes
Short Description Enables/disables Sprites and Lores Layer, and chooses priority of sprites and Layer 2.


Bitmapped as follows:

Bit Function
7 Enable Lores Layer
6 If 1, the sprite rendering order is reversed, i.e. sprite 0 is on top (0 after reset)
5 If 1, the clipping works even in "over border" mode (doubling X-axis coordinates of clip window) (0 after reset)
3-4 If %00, ULA is drawn under Layer 2 and Sprites; if %01, it is drawn between them, if %10 it is drawn over both
2 If 1, Layer 2 is drawn over Sprites, else sprites drawn over layer 2
1 Enable sprites over border (0 after reset)
0 Enable sprite visibility (0 after reset)

When both "over border" (bit 1) and "clipping over border" (bit 5) is enabled, the Sprite clipping window Clip Window Sprites Register ($19) X-axis coordinates are "doubled", and coordinates origin is moved from pixel [0,0] position to sprite [0,0] position ([-32,-32] pixel position). For example: setting clip coordinates as {x1:5, x2:155, y1:7, y2:248} will make sprites visible in area [10,7]..[309,248] (inclusively) in sprite coordinates.

Ped7g (talk) 07:41, December 24, 2018 (UTC) note the doubled coordinates behave (core version 2.00.22 is described above) differently to normal coordinates, for example in X1=X2 case: normal clip window will display one pixel, but doubled coordinates will test X2*2-1 < X1*2, so no pixel should be displayed. This inconsistency has been raised in forum, and may change eventually (I would personally expect X2*2+1 boundary applied, so X1=X2 would produce 2-pixel-wide visible area, or even X2*2 producing odd-sized areas (up till full 320 sprite coordinate range) sounds reasonable), as new core was not yet released. So the details are "to be confirmed" by final version in published 2.00.22+ core.