SM64 Segment 02 1 2 »
Users browsing this thread: 1 Guest(s)

I spent a little time decoding the entire Segment 02 which contains the font textures (HUD, dialog, credits), transition textures, font tables, dialog text, level names, and act names.  I added my documentation to the wiki 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 bass 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 Things
There are a few interesting things I found in segment 02.

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"
db " \", 0xF0, "\", 0x48, 0x68, "?\n"
db " 1 ", 0x8E, 0x72, 0x9D, 0x82, 0x9D, "\n"
db " 2 ", 0x8B, 0xD5, 0x71, 0x70, "-", 0xF0, 0x89, 0xF0, 0x8B, 0x98, "\n"
db " 3 ", 0x7C, 0x88, "-", 0x7C, 0x96, 0x71, 0xF0, 0x7F, "-\n"
db " 4 ", 0x72, 0xD8, "-", 0x7F, "-", 0x96, 0x9D, 0xF0, 0x83, "\n"
db "   ", 0x77, "_", 0xF1, 0x89, "1", 0xF0, 0x49, 0x42, "\n"
db " ", 0x62, 0xF0, ">", 0x68, 0xFF
db "PAUSE    \n"
db " \", 0xF0, "\", 0x48, 0x68, "?\n"
db " ", 0x63, 0x61, 0x68, " ?", 0xFF


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]
(This post was last modified: 23-06-2017, 07:10 PM by queueRAM. Edit Reason: wiki links )


Attached Files
Size: 118.37 KB / Downloads: 136 .txt   segment02.txt


You can see the old "STAGE SELECT" menu briefly in this old video of the SM64 beta: https://www.youtube.com/watch?v=ys723F9wiwU&feature=youtu.be&t=378
My threads are now being maintained here

(24-10-2016, 11:25 PM)shygoo Wrote: You can see the old "STAGE SELECT" menu briefly in this old video of the SM64 beta: https://www.youtube.com/watch?v=ys723F9wiwU&feature=youtu.be&t=378

Thanks shygoo, that is exactly the text I'm seeing here! Strange that it was kept in the (U) ROM where none of the Japanese dialog characters are. I dug into the (J) ROM and found the same messages at offset 0x87E4 and 0x883C.
Edit: coerced SM64 (J) to render these better
[Image: GhNIOG5.png]

STAGE SELECT
つづける?
1 マウンテン
2 ファイアーバブル
3 スノースライダー
4 ウォーターランド
クッパ1ごう
もどる

PAUSE
つづける?
やめる?

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

PAUSE
Continue?
Quit?
(This post was last modified: 25-10-2016, 01:39 PM by queueRAM. Edit Reason: screenshots )

I think that a better translation of「クッパ1ごう」could be "Bowser number 1".
1ごう (1 gou) means "number 1"

(25-10-2016, 10:30 AM)supermariosan100 Wrote: This isnt really related, however, there is left over background data from the secret slide of the Big boo's Haunt background. Maybe the slide was going to be differently themed. The bowser door also had a different fanfare, i believe it was somewhere in the game, I heard it years ago, but, it may just be bad memories.


I'm not exactly sure what you're trying to say, but it doesn't seem to be related to segment 02.


(25-10-2016, 10:58 AM)Fendoroid Wrote:
I think that a better translation of「クッパ1ごう」could be "Bowser number 1".
1ごう (1 gou) means "number 1"


Thanks Fendoroid! This makes sense to me. I update the translation above.

Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?

(25-10-2016, 06:38 PM)MrPr1993 Wrote: Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?


It's certainly possible, but I haven't done any testing. The function PutMiniString/802D82D4(A0=X?, A1=Y?, A2=pointer to string) uses this lookup table and the strings are stored as ASCII in ROM around 0xF0BA0.

The other thing is that the credits font have a black instead of transparent background, so depending what you're going for, it may not look good in a cutscene without changing it.

(26-10-2016, 10:29 PM)queueRAM Wrote:
(25-10-2016, 06:38 PM)MrPr1993 Wrote:
Hm... is it possible to use the credits fonts for, I dunno, cutscenes or somethin'?


It's certainly possible, but I haven't done any testing. The function PutMiniString/802D82D4(A0=X?, A1=Y?, A2=pointer to string) uses this lookup table and the strings are stored as ASCII in ROM around 0xF0BA0.

The other thing is that the credits font have a black instead of transparent background, so depending what you're going for, it may not look good in a cutscene without changing it.


Fascinating... someone should test it with this type of font anyways before changing it! Could be useful for cutscenes and new intros/endings.
(This post was last modified: 26-10-2016, 10:37 PM by MrPr1993.)

(25-10-2016, 05:45 AM)queueRAM Wrote:
(24-10-2016, 11:25 PM)shygoo Wrote:
You can see the old "STAGE SELECT" menu briefly in this old video of the SM64 beta: https://www.youtube.com/watch?v=ys723F9wiwU&feature=youtu.be&t=378

Thanks shygoo, that is exactly the text I'm seeing here! Strange that it was kept in the (U) ROM where none of the Japanese dialog characters are. I dug into the (J) ROM and found the same messages at offset 0x87E4 and 0x883C.
Edit: coerced SM64 (J) to render these better
[Image: GhNIOG5.png]

STAGE SELECT
つづける?
1 マウンテン
2 ファイアーバブル
3 スノースライダー
4 ウォーターランド
クッパ1ごう
もどる

PAUSE
つづける?
やめる?

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

PAUSE
Continue?
Quit?


Perhaps we could use this for a cool thing to get to levels easier when play testing rom hacks Chirpy
A SM64 Hacking Weeb

We already have the level select debug code and just because the text is still in the ROM, doesn't mean the coding for it is. It would have to be remade.
(This post was last modified: 28-11-2016, 08:37 AM by supermariosan100.)

SM64 Segment 02 1 2 »
Users browsing this thread: 1 Guest(s)