Command 0x2D: Conditional jump

Moves to an address selected from an address table according to the conditional jump index.

Syntax

0x2D, ushort address0, ushort address1, ...

Parameters

ParameterTypeDescription
address0, address1, …ushortTable of destination APU RAM addresses

Description

With the conditional jump index ($ED) as n, moves to the nth address (counting from 0) in the table following the command.
The index is set with CPU command $FD or command 0x2E. This is used, for example, to change how a song develops according to the game situation.

The length of the table is not recorded in the data. You must list addresses up to the maximum value the index can take.
This command always jumps, so events written right after the table are never executed.

This command takes no time to process; the following event is read within the same tick.

Note

  • The index is shared by all channels.

See also

Sequence data structure
Command 0x2E
Command 0x03