Cutscenes

From z64 wiki
Jump to: navigation, search

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?
0003 Shocked
0006 Turn around and look up in shock
0007 Look at hands, as if an item was in them
0008 Raise hands as if lifting an item
0009 Put down hands
000A Get off ground and brush off
000E Look at self
000F Get wrecked
0010 pick self up
0011 pull ocarina (puts ocarina model in hand)
0012 hold item at side?
0013 turn and lift item (chests)
0015 different blinking pattern?
0016 squint? (possibly Zora Sapphire cutscene)
0017 fall off the log (Zora Sapphire cutscene)
0018 Surface water, idle swimming
0019 Receive Zora Sapphire in water
001A Draw sword defensively (Ganondorf encounter, kokiri sword model in hand)
001B Knocked to the ground?
001C Sleeping on bed
001D Sleeping Roll over
001E Wake up
001F Nod, get off the bed
0020 Struck by Ganondorf's attack (Zelda Escape)
0021 Get up, look to left
0027 Look up to the sky
0028 Slowly back up a few steps
0029 Put hands on surface (Zelda's Crystal?)
002A Pull out sword/shield 002B Run up to Zelda's Crystal and put hands on
002C Pound on Zelda's Crystal
002D Look up, watching Zelda's Crystal rise
002E Turn around
002F Lower hand (after 0030)
0030 Shield Eyes (Zelda->Shiek)
0031 Look around
0032 Stepping onto Rainbow Bridge
0034 Get down on one knee, Bongo Shadow Cutscene? (sword/shield need to be put into hands)
0035 Lying flat on the ground
0036 Pick self up after 0035, shake head
0037 Shield out, sword drawn back in spin attack stance (stiff knees), (sword/shield need to be put into hands)
0038 Idle standing, precedes 0039
0039 Give up Ocarina of Time (need ocarina in hand)
003A Take hand away from Ocarina of Time
003C Lifted up by blue warp
003D Look around at surroundings
003E Learn Ocarina Song
003F Return to neutral stance after 003E
0044 Look right, happy (Look to Zelda after Tower Collapse
0045 Look up, happy (look to Navi after Tower Collapse
0046 Stand alert, not happy (loud noise after Tower Collapse
0047 Spin attack stance, animated rocking (need Sword/Shield in hand)
0048 Play with sword (reverts to animation 0047 after for some reason)
004A Flashing red, launched forward to the ground, get up
004B Look to the sky, surprised look
004C Notice tremor, ground shaking
004D Pull Master Sword, Ganon Fight?

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