Sticky bit: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
 
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
The "sticky bit" is bit 6 of the words stored in the [[Sprites|Sprite Control Bank 3]].
The "sticky bit" (or "chain bit") is one of the per-sprite attributes stored in the [[Sprites|Sprite Control Bank 3]] (bit 6).
Setting it to 1 makes the corresponding sprite "stick" to the precedent one.


The video hardware will automatically add 16 to its current X position, and use the same Y position, size and vertical shrink coefficient.
{{16BitRegister|Y position|9|'''[[Sticky bit]]'''|1|Sprite size|6}}
Only the horizontal shrink coefficient is left independant.


Sticky sprites can also be called "driven sprites".
Setting it to 1 makes the corresponding sprite "stick" to the right of the precedent one. This allows moving groups of sprites easily, by just updating one coordinate pair.
 
The [[LSPC]] will automatically place a chained sprite to the right of the previous one. It will inherit the same Y position, the same height and the same vertical shrinking coefficient. All attributes are ignored except the horizontal shrinking coefficient.
 
Changing the driving sprite's attributes will change all those of the consecutively chained sprites, but the values will remain unchanged in [[VRAM]].
 
Changing driven sprites attributes won't affect it until its sticky bit is reset.


[[Category:Video system]]
[[Category:Video system]]

Latest revision as of 22:45, 23 June 2018

The "sticky bit" (or "chain bit") is one of the per-sprite attributes stored in the Sprite Control Bank 3 (bit 6).

Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Def Y position Sticky bitSprite size

Setting it to 1 makes the corresponding sprite "stick" to the right of the precedent one. This allows moving groups of sprites easily, by just updating one coordinate pair.

The LSPC will automatically place a chained sprite to the right of the previous one. It will inherit the same Y position, the same height and the same vertical shrinking coefficient. All attributes are ignored except the horizontal shrinking coefficient.

Changing the driving sprite's attributes will change all those of the consecutively chained sprites, but the values will remain unchanged in VRAM.

Changing driven sprites attributes won't affect it until its sticky bit is reset.