Generic
Explains generic variables that are not dependent on specific sprites.

Note: Some sprites may override some of these generic variables and use them in different ways. For details, see individual pages.

Sprite memory
  00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00
Control code
Depth
Wait time
X location
Y location
10
OAM state
Image address
Image address
Image address
Visible state
20
Current X speed
Current Y speed
Target X speed
Target Y speed
Mode
30
Attribute
Animation
Display period
Animation control
Animation address
Animation additinal control
40
Animation type
Horizontal movement range
Vertical movement range
50
Movement setting
Hit event
Parameter

Description
$00 Control code
Type: short
Relative address for array pointer of sprite assembly. This value must be multiples of 4.
When writing zero to this variable, the sprite occupies this slot will be disposed. Slots whose variable $00 is zero is considered empty from the game.

$02 Depth
Type: byte
Sets the Z order (depth) when multiple sprites overlap. If the same depth is assigned, it is undefined which one comes front.
This does not have any relations to OAM sprite priority.

$04 Wait time
Type: ushort
Set the wait time in frames for sprites that start activities after waiting for a while.

$06 X location
Type: ushort
Current X location of this sprite. You should not assign to this variable in sprite definition.

$0A X location
Type: ushort
Current Y location of this sprite. You should not assign to this variable in sprite definition.

$12 OAM state
Type: [flags] ushort
Basic rendering setting for this sprite and this will be assigned to OAM lower table.
Do not access this directly. If you change this value, use command $8500 instead.

$16 Image address
Type: short
Address of current rendered image. This value must not be changed from outside of animation data.

$18 Image address
Type: short
Address of current rendered image. This value must not be changed from outside of animation data.

$1A Image address
Type: short
Address of next animation frame image. Usually, this variable is automatically assigned by animation.
In some sprites that do not use animation, images may be displayed by substituting into this variables.

$1C Visible state
Type: [flags] ushort
Set whether sprite will be shown or not.

$20 Current X speed
Type: short
Current X speed of this sprite.
When this variable is explicitly set at the time of sprite initialization, its value is reflected and acceleration or deceleration is performed until the speed specified by variable $26 is reached.
Otherwise, this will be zero at initializing.

$24 Current Y speed
Type: short
Current Y speed of this sprite.
When this variable is explicitly set at the time of sprite initialization, its value is reflected and acceleration or deceleration is performed until the speed specified by variable $2A is reached.
Otherwise, this will be zero at initializing.

$26 Target X speed
Type: short
The target value of the X speed of this sprite.
The value of variable $20 is calculated with the value of this variable as the target. Therefore, it is this variable that dominates X speed.
Usually, the horizontal cruising speed matches this value.

$2A Target Y speed
Type: short
The target value of the Y speed of this sprite.
The value of variable $24 is calculated with the value of this variable as the target. Therefore, it is this variable that dominates Y speed.
Usually, the vertical cruising speed matches this value.

$2E Mode
Type: ushort
Specify the current mode of this sprite.

$30 Attribute
Type: [flags] ushort
Applying some special functions. For details, see Table 4.

$36 Animation
Type: ushort
Specify animation ID.
Do not access this variable directry. Use command $8100 instead.
For the animation ID list, see Table 1.

$38 Display period
Type: ushort
The remaining display period of the current animation frame.
Do not access this variable.

$3A Animation control
Type: ushort
Animation control data for current animation.
Do not access this variable directly from except animation data.

$3C Animation address
Type: absolute
Current animation read address. This variable will be updated automatically by animation processing codes.
To change this variable, use jump command in animation data. Do not access this variable diretly.

$3E Animation additional control
Type: absolute
Absolute address for additional controlling assembly of current animation.
Do not access this variable directly from except animation data.

$40 Animation type
Type: ushort
Specify animation type for current animation.
This value is specified in animation pointer. Do not access this variable.

$46 Horizontal movement range
Type: (byte, byte)
Specify horizontal movement range centering on the location this instance placed.
Upper byte is for left, and lower byte is for right.

$4A Vertical movement range
Type: (byte, byte)
Specify vertical movement range centering on the location this instance placed.
Upper byte is for upwards, and lower byte is for downwards.

$52 Movement setting
Type: [flags] ushort
Specify the behavior of this instance. For details, see Table 4.

$54 Hit event
Type: absolute
Absolute address for hit events (Bank $FF). Hit events define the behavior when the Kong hit this instance.

$58 Parameter
Type: ushort
Sprite parameter for this instance. Do not access this variable from except level sprite.
Parameter 0xF will be assigned the sprites generated by sprite generators.
When you write zero to this variable, the game will execute respawn suppression to this instance.
Sprites written zero to this variable will not be loaded unless reload the level.