SM64 Segment 02
Segment 02 in SM64 contains the font textures (HUD, dialog, credits), transition textures, font tables, dialog text, level names, and act names.  Documentation is also on the SM64 Segment 2 wiki page and am included the notes here. I am also attaching my assembly file which is a complete deconstruction of this segment and can be used to regenerate the exact segment 2 binary using the armips assembler.

Start    End    Description
0x00000    0x049FF    Large font and HUD textures
0x04A00    0x058FF    Credits font textures
0x05900    0x06FFF    Small dialog font textures
0x07000    0x076FF    HUD camera textures
0x07700    0x077E7    HUD lookup table
0x077E8    0x07BE7    Small dialog font lookup table
0x07BE8    0x07C7B    Credits font lookup table
0x07C7C    0x07C93    HUD camera lookup table
0x07C94    0x07D07    Some unused dialog-encoded text
0x07D08    0x07D33    Unused text lookup table
0x07D34    0x0FFC7    Dialog text
0x0FFC8    0x10D13    Dialog lookup table
0x10D14    0x10F67    Level names text
0x10F68    0x10FD3    Level names lookup table
0x10FD4    0x1192B    Act names text
0x1192C    0x11ABF    Act names lookup table
0x11AC0    0x120B7    F3D display lists and vertices
0x120B8    0x172B7    Shadow, transition, other textures
0x172B8    0x172CF    Unused. Looks like lighting parameters
0x172D0    0x178BF    Matrices, F3D display lists, vertices
0x178C0    0x18A0D    Paintings mesh vertices, triangles

Interesting Finds
In addition to the dialog, level names, and act names, there is an unused section encoded in a similar manner starting at offset 0x7C94. Decoding it reveals something like the listing below. The hex values don't line up to any characters in the (U) ROM dialog lookup table, but they may be remnants from the (J) ROM. I may try to decode these later to see if it reveals anything interesting about the stages available in the stage select.
db "STAGE SELECT\n"...
I dug into the (J) ROM and found the same messages at offset 0x87E4 and 0x883C.
[Image: GhNIOG5.png]

1 マウンテン
2 ファイアーバブル
3 スノースライダー
4 ウォーターランド


Translations (thanks to Rena, jrra, and Fendoroid):
1 Mountain
2 Fire bubble
3 Snow slide
4 Water land
Bowser number 1


Japanese dialog font table:
[Image: EvquL3M.png]

There is a peculiar up arrow texture stored at offset 0x17698, right in the middle of some F3D display lists. I don't recall seeing it in the game. It is the first arrow listed in the picture below. The other font textures that look like arrows are listed for reference as well.
[Image: HaPGZ0M.png]

The ambient and diffuse lighting parameters for the paintings are stored at offsets 0x177B8 and 0x177C0 respectively. You can use this to change how the paintings are rendered while animating. Here, I made the diffuse color red instead of white.
[Image: bSPmWLT.png]

The vertex and triangle data used to construct the animated painting triangle mesh is stored at offset 0x178C0 (0x81AA16 extended ROM) and takes the following format. The Z values of the vertices don't matter as they are controlled by code, but the X and Y can be adjusted for some interesting results. I tried changing the order of the last triangle table, but it just locked up the game when I touched a painting, so it means something.
178C0-178C1: u16 vertex count (0x009D=157)
178C2-17C6F: i16 x, y, z vertices (157*6 bytes)
17C70-17C71: u16 triangle count (0x0108=264)
17C72-182A1: u16 3x triangle indexes (264*6 bytes)
182A2-18A0D: triangle indexes
[Image: E06Ma4k.png]

As a test, I compressed the top and bottom triangles and expanded the middle ones as shown. Looks pretty bad in game:
[Image: hdOUVlQ.png][Image: pPCBWHD.gif]

Attached Files
.zip (Size: 212.41 KB / Downloads: 984)
David, simer, and Trenavix liked this post
Did you also investigate the "0x11AC0 0x120B7 F3D display lists and vertices" area? if not, here are just 2 more random things i found in segment 2 to add to the list:
02011c48 - text box background DL, also seems to be used in the pause menu
02011cc8 - text letters pre display list, sets color and some other settings

Users browsing this thread: 1 Guest(s)