Cutscenes
Finding Cutscenes
There are a few ways that you can locate a cutscene.
You can always find a cutscene by watching the cutscene pointer with a memory viewer. It's located at 80213D88 in the Debug Rom, and 801CA208 in v1.0. Be aware that the cutscene pointer does not null itself once the cutscene has finished playing, but as long as you don't leave the area this won't be an issue.
Many (but not all) cutscenes are stored within scene files. Several alternate scene headers (referenced by the 0x18 command) exist with the purpose of playing a single cutscene. This is done by defining the 0x17 command, which in turn points to the start of the cutscene header.
The first three alternate headers (if they exist) will never define the 0x17 command, as they are typically reserved for different combinations of day/night child/adult variations of an area (the root header + 3 alternate headers = 4).
See Scenes and Rooms for more information on the header commands.
In order to reference the cutscene data, the 0x17 command uses a bank offset, which is of the following form:
bboooooo
b = Bank Number
o = Offset from the address stored in bank number BB to the Cutscene Header.
Since the cutscene is stored within the scene or actor file, the offset will really be relative to the start of the scene or actor file.
^^ Data given by Flotonic.
Cutscene Commands
Cutscenes begin with an 8 byte header of the following form:
xxxxxxxx ffffffff
x = number of commands (signed)
f = end frame (signed). Other commands can terminate the cutscene before this frame is reached.
Following that are the cutscene commands. Every command is at least 8 bytes long.
Marker | Description | Variables | Usage | Notes |
---|---|---|---|---|
00000001 | Camera Positions | wwwwxxxx yyyyzzzz | w = ? x = start frame y = end frame z = ? |
Combine with 0002 command |
Position List | wwrr0000 aaaaaaaa
xxxxyyyy zzzz0000 |
w = FF on last entry, 00 for more entries r = camera roll (signed byte, unused) a = angle of view in degrees (float, unused) x y z = x,y,z position |
Combine with 0002 command entry | |
00000002 | Camera Focus Points | wwwwxxxx yyyyzzzz | w = ? x = start frame y = end frame z = ? |
Combine with 0001 command |
Focus Point List | wwrrffff aaaaaaaa
xxxxyyyy zzzz0000 |
w = 00 for more entries, FF for last entry r = Camera Roll (signed byte). Positive rotates image clockwise. f = frames to reach the next point a = angle of view in degrees (float) x y z = x,y,z position |
Combine with 0001 command entry | |
00000005 | Unknown camera? command | wwwwxxxx yyyyzzzz | w = ? x = start frame y = end frame z = ? |
Combine with 0006? command |
0005 Entry List Documentation incomplete, seems to follow 0001 or 0002 command pattern |
wwrrffff aaaaaaaa
xxxxyyyy zzzz0000 |
w = 00 for more entries, FF for last entry r = Camera Roll (signed byte). Positive rotates image clockwise. f = frames to reach the next point a = angle of view in degrees (float) x y z = x,y,z position |
Combine with 0006? command entry | |
00000006 | Unknown camera? command | wwwwxxxx yyyyzzzz | w = ? x = start frame y = end frame z = ? |
Combine with 0005? command |
0006 Entry List Documentation incomplete, seems to follow 0001 or 0002 command pattern |
wwrrffff aaaaaaaa
xxxxyyyy zzzz0000 |
w = 00 for more entries, FF for last entry r = Camera Roll (signed byte). Positive rotates image clockwise. f = frames to reach the next point a = angle of view in degrees (float) x y z = x,y,z position |
Combine with 0005? command entry | |
00000009 | Unknown | 0000xxxx | x = Entries | |
Unknown 0009 Entry | aaaabbbb ccccdddd eeeeffff |
a = ? b = Frame Start? c = Frame End? d = ? e = ? f = ?, possibly padding |
||
00000013 | Textbox | 0000xxxx | x = Entries | |
No Text | FFFFxxxx yyyyFFFF
FFFFFFFF |
x = start frame y = end frame |
||
Display Text | zzzzxxxx yyyy0000
00000000 |
z = message number x = start frame y = end frame |
End Frame waits for text to finish before continuing cutscene | |
0000002D | Scene Transition Effects | 00000001 xxxxyyyy
zzzz[zzzz] |
00000001 = constant? x = transition (probably the same as entrance/exit transitions) y = start frame z = end frame (seems to be repeated) |
|
000003E8 | Exits/Asm execution | 00000001 xxxxyyyy
zzzz[zzzz] |
00000001 = constant? x = jump table index for asm execution y = start frame z = end frame (seems to be repeated) |
The jump table is located at 8013AF78 in the Debug Rom. The addresses in the jump table point to the machine code that executes after the cutscene. Used for setting the next entrance/cutscene, giving items, toggling Link's age. |
FFFFFFFF | Cutscene Terminator | 00000000 | ||
0000aaaa | Actor Command | 0000yyyy | a = Marker, where a relates to a specific actor. y = Number of entries. |
Marker values are NOT the same numbers used to load an actor in a room. |
Actor Path | aaaabbbb ccccdddd ???????? eeeeeeee ffffffff gggggggg hhhhhhhh iiiiiiii jjjjjjjj kkkkkkkk llllllll mmmmmmmm |
a = Actor Action/Animation b = Start frame for path. c = End frame for path. d = ? e f g = Path start vertex coordinate (x,y,z) h i j = Path end vertex coordinate (x,y,z) k l m = Vertex normal for the path, single precision floats. |
Actor Entities
Marker | Actor | Action Param (v) |
---|---|---|
0000 | ? | |
0003 | Title Logo (0171) | 001E fades in logo 001F fades out logo |
0004 | ? | 0004 ? |
000A | Link (0000) |
0001 Walk cycle? |
003E | Navi (0018) | |
003D | Path/animation for something | |
0056 | Music Changer | Song to play = (v - 1) |
^^ Merged some information from a few posts by Twili and xdaniel on the GCN