User Tools

Site Tools


super_mario_64:special_macro_objects

Special Macro 3D Objects

Special Macro objects are objects that are loaded into the level from the level script command 0x2E. Their main purpose is to save space in the ROM, since they only take up 8, 10, or 12 bytes each whereas regular objects take up 24 bytes. However, they are more limited than the regular objects loaded from the level script command 0x24.

ROM Hacks of SM64 usually won't use special macro objects, since ROM space is not an issue.


Limitations

  • You can only directly modify the position, Y rotation, and the first two behavior parameters of the object.
  • They will always appear in every act in the level, as they don't have an act mask.
  • Each special macro object contains a preset ID, that references a list that tells the object what model ID and behavior are.

List Format

The level script command 0x2E loads a list of special macro objects during it's collision loading routine. The length of the object is determined by the Preset ID (see preset table entries below).

8 byte object

[ID ID] [XX XX] [YY YY] [ZZ ZZ]

IDID Preset ID
XXXX X position of object (signed 16 bits)
YYYY Y position of object (signed 16 bits)
ZZZZ Z position of object (signed 16 bits)

10 byte object

[ID ID] [XX XX] [YY YY] [ZZ ZZ] [RY RY]

IDID Preset ID
XXXX X position of object (signed 16 bits)
YYYY Y position of object (signed 16 bits)
ZZZZ Z position of object (signed 16 bits)
RYRY Y Rotation

12 byte object

[ID ID] [XX XX] [YY YY] [ZZ ZZ] [RY RY] [B1] [B2]

IDID Preset ID
XXXX X position of object (signed 16 bits)
YYYY Y position of object (signed 16 bits)
ZZZZ Z position of object (signed 16 bits)
RYRY Y Rotation
B1 Replaces B.Param 1 value if not zero
B2 Replaces B.Param 2 value if not zero

Special Macro Preset Table

The Preset ID is used to get the Model ID, Behavior address, and the default Behavior parameters for the object. The location of this table differs based on the version of the game you are using.

VersionROM Address
North America (US) 0xED350
Europe 0xBE100
Japanese 0xEC240
Japanese (Shindou Edition) 0xC98D0
Chinese IQue 0xCBD90

Entry Format

Each entry in the table takes up 8 bytes. The list ends when a preset ID of 255 (0xFF) is found.

[ID] [B1] [B2] [MM] [BS BS BS BS]

ID Preset ID
B1 Default B.Param 1 value
B2 Default B.Param 2 value
MM Model ID
BSBSBSBS Segment address of behavior

Entries

Anything with a question mark (?) means that it is a guess, and needs to be verified.

Preset IDLengthObject NameBehavior AddressModel IDB.Param 1B.Param 2
010 Unused? 0x000000000x000x010x00
18? Yellow Coin (for triggers?) 0x1300091C0x740x000x00
28? Yellow Coin (for triggers?) 0x1300091C0x740x000x00
310? Unused Level Geometry? 0x13002A480xB80x000x00
48? Boo Buddy group (x3) 0x130027D00x540x000x00
58? Castle Floor Trap 0x13002A5C0xAC0x000x00
68? Moving Hexagonal Mesh (LLL) 0x13001D780x360x000x00
78? Unused? 0x13001DA40x370x000x00
88? Bascule Bridge (LLL) 0x130038D00x380x010x00
910? Unused? 0x13002A480x000x000x00
108? Rotating Hexa-Block with Fire Bars (LLL) 0x13001DA80x3A0x000x00
118? Floating Wood Bridge (LLL) 0x13001E300x000x000x00
128? Alternate Tumbling Bridge? 0x13000C640x000x000x00
138? Rotating Hexagonal Ring Platform (LLL) 0x13001E6C0x3E0x000x00
148? Sinking Lava Platform (LLL) 0x13001E940x3F0x010x00
158? Tilting Square Platform (LLL) 0x13001EC40x400x000x00
168? Small Tilting Platform (LLL) 0x13001EF80x410x000x00
178? Bowser Puzzle (LLL) 0x130020680x000x000x00
188? Mr. I 0x130000540x000x000x00
198? Bully 0x1300362C0x560x000x00
208? Big Bully Boss (LLL) 0x130036600x570x000x00
2110? Unused Level Geometry? 0x13002A480x000x000x00
2210? Unused Level Geometry? 0x13002A480x000x000x00
2310? Unused Level Geometry? 0x13002A480x000x000x00
2410? Unused Level Geometry? 0x13002A480x000x000x00
2510? Unused Level Geometry? 0x13002A480x000x000x00
268? Moving Blue Coin 0x130030A40x740x000x00
278? Beta Chest? 0x130002780x650x000x00
288? Manta Rings (Water Levels Only) 0x130037380x680x000x00
298 Bomb 0x130037EC0xB30x000x00
308? Unused Level Geometry? 0x13002A480x000x030x00
318? Unused Level Geometry? 0x13002A480x000x000x00
328? Butterfly 0x130033BC0xBB0x000x00
338 Bowser 0x130018500x640x000x00
348? Rotating Wooden Bridge (WF) 0x130006E00xAF0x000x00
358? Pushy Rock with eyes (WF) 0x130039100xAE0x010x00
368? Sliding Brick Platform (WF) 0x130039700xAD0x010x00
378? Under Tower (WF) 0x130012F40x000x000x00
388? Unused? 0x130006D80x000x000x00
398? Tumbling Bridge (WF) 0x13000C280xB20x000x00
408? Big Pushy Rock with eyes (WF) 0x130039400xB10x000x00
10110 Level Geometry* 0x13002A480x030x010x00
10210 Level Geometry* 0x13002A480x040x010x00
10310 Level Geometry* 0x13002A480x050x010x00
10410 Level Geometry* 0x13002A480x060x010x00
10510 Level Geometry* 0x13002A480x070x010x00
10610 Level Geometry* 0x13002A480x080x010x00
10710 Level Geometry* 0x13002A480x090x010x00
10810 Level Geometry* 0x13002A480x0A0x010x00
10910 Level Geometry* 0x13002A480x0B0x010x00
11010 Level Geometry* 0x13002A480x0C0x010x00
11110 Level Geometry* 0x13002A480x0D0x010x00
11210 Level Geometry* 0x13002A480x0E0x010x00
11310 Level Geometry* 0x13002A480x0F0x010x00
11410 Level Geometry* 0x13002A480x100x010x00
11510 Level Geometry* 0x13002A480x110x010x00
11610 Level Geometry* 0x13002A480x120x010x00
11710 Level Geometry* 0x13002A480x130x010x00
11810 Level Geometry* 0x13002A480x140x010x00
11910 Level Geometry* 0x13002A480x150x010x00
12010 Level Geometry* 0x13002A480x160x010x00
1218 Bubbly Tree 0x13002AA40x170x000x00
1228 Spikey Tree 0x13002AA40x180x000x00
1238 Snow Tree 0x13002AA40x190x000x00
1248? Unused Tree? 0x13002AA40x1A0x000x00
1258 Palm Tree 0x13002AA40x1B0x000x00
13710? Unused Door? 0x13000B0C0x1C0x010x00
12610 Door 0x13000B0C0x1D0x010x00
12710? Unused Door? 0x13000B0C0x1E0x010x00
12810 Metal Door (HMC) 0x13000B0C0x1F0x010x00
12910 Hazy Maze Door 0x13000B0C0x200x010x00
13010? Unused Door? 0x13000B0C0x210x010x00
13810 Castle Door (0 Stars) 0x13000B0C0x220x040x00
13910 Castle Door (1 Stars) 0x13000B0C0x230x040x01
14010 Castle Door (3 Stars) 0x13000B0C0x240x040x03
14110? Unused Door? 0x13000B0C0x250x040x00
13612 Castle Warp Door 0x13000AFC0x260x020x00
13112 Warp Door 0x13000AFC0x270x020x00
13212? Unused Warp Door? 0x13000AFC0x280x020x00
13312 Metal Warp Door 0x13000AFC0x290x020x00
13412? Unused Warp Door? 0x13000AFC0x2A0x020x00
13512? Unused Warp Door? 0x13000AFC0x2B0x020x00

* Level Geometry has different names based on the level you are in.

super_mario_64/special_macro_objects.txt · Last modified: 2018/10/11 11:10 by David