From CloudModding OoT Wiki

Object Files or Objects are files which primarily contain the graphical assets (display lists, textures) for actors, as well as animation data and collision surfaces for some actors.

Object Table

code (File)
Object Table
VersionOffsetVRomVRam
Debug10A6C000B9E6C000B9F35880127520801281B8
NTSC 1.00E7F5000B6EF5000B6FBE8800F8FF0800F9C88
PAL MQ0E4F5000B6CF5000B6DBE8800F5E50800F6AE8

The Object Table assigns an identifier to object files.

Format

The table appears to start with the following variables:

/*0x00*/ short AdultLinkObjectNumber; //Object number for Adult Link's model
/*0x02*/ short ChildLinkObjectNumber; //Object number for Child Link's model
/*0x04*/ int NumberOfObjects = 0x192; //402 records in the table

Following that is the table itself:

FileAddress ObjectAddresses[NumberOfObjects];

struct FileAddress
{
    /*0x00*/ uint ObjectStart; //VRom Address
    /*0x04*/ uint ObjectEnd;   //VRom Address
}

Anatomy of an Object File

Object files have no "format" per se, but contain different types of "static" data:

  • Display Lists, in the form of F3DZEX2 GBI (graphical binary interface).
  • Textures and palette data, typically referenced by said display lists
  • Animation Data
  • Collision Surfaces for actors with complex collision (eg. odd shaped platforms, destructible walls)

Loading/Managing Object Files

"Object Space"

The vast majority of object files are allocated to a space referred to as "Object Space", located immediately before the start address of the current scene file. The following table lists the size given to "Object Space":

Size Condition
0xFA000 Scene Index = 0x51 (Hyrule Field)
0x11F800 Scene Index = 0x4F (Ganon Boss Fight), and Scene Setup is *not* 4 (Tower Collapsing Cutscene)
0x106800 Scene Index = 0x17 (Spirit Temple Boss Room)
Scene Index = 0x44 (Chamber of Sages)
Scene Index = 0x18 (Ganondorf Boss)
0xFA000 Default


The process for filling this space is as follows. Note that all object files are inserted into the lowest start address available, with no "gaps" between each object file:

After that, object files are allocated based on the order they appear in the 0x0B room header command of the room Link initially spawns in. Whenever Link travels between two rooms, the game will compare the objects that were loaded by the first room to the objects requested by the second, starting with the first object number in each list. When the game encounters a number that does not match, all object files after the last match will be de-allocated, and any missing object file requests pending for the second room will be allocated.

An important thing to note about "Object Space" is that whenever the game is paused, this space is re-purposed in order to store the pause screen's graphical files and object dependencies.

GI Objects

Whenever Link holds an item over his head, or pulls out an item to show it to an NPC, a GI_Object file (an object file containing a "high res" 3D model of an item) will be loaded into a much smaller space allocated after Link's instance before the item is shown.