Anyway to find where compressed data is being extracted from as the game runs? I need to be able to somewhat accurately locate where text, graphics, and fonts are being stored in order to get this translation off the ground.
I
replied over on smwc, but in case you don't take a look over there, I'll quickly copy some of my respond here.
All SM64 ROMs are setup in a similar manner, so some of the SM64 hacking notes will be applicable for Shindou. There are some good notes on SM64 (U) text editing on the
"SM64 Text Editing" wiki page. As you may know, the MIO0 blocks are compressed and will need to be decompressed before editing them.
All the font textures and strings are stored in the first MIO0 block (U:0x108A40, J:0x1076D0, E:0x0DE190, Shindou:0xE42F0). Each ROM has a different set, but generally follow the same order: large colorful HUD font (RGBA16), HUD icons (RGBA16), green credits font (RGBA16), dialog font (varies), dialog text (custom encoding), some other HUD graphics. See the first block on the
SM64 Textures wiki page for the (U) textures.
For the (U) ROM, the dialog font starts at offset 0x5900 in this segment and is encoded as 16x8 IA4 (rotated 90 degrees). For the (J) and Shindou ROM, the dialog font starts at offset 0x7100 and is encoded as 8x16 1bpp. These two ROMs contain Japanese and uppercase Latin characters.
As far as the actual dialog text encoding, there are three different tables in the MIO0 block: dialog text (U:0xFFC8, Shindou:0xD550?), level names (U:0x10F68, Shindou:0xE45C?), act names (U:0x1192C). Let me know if you need help tracking down the offsets in the Shindou ROM. The entries of dialog table are stored as 16 bytes where the first 12 bytes are parameters, last 4 bytes are the dialog offset. The other two tables are just 4 byte entries pointing to the dialog. The actual dialog text is then encoded using the custom encoding documented on the wiki page. e.g. first level name entry at
0x10F68: 02 01 0D 14dialog text is at offset
0x10D14: 9E 01 9E 0B 18 0B 9F 18 16 0B 9E 0B 0A 1D 1D 15 0E 0F 12 0E 15 0D FFTranslated: " 1 BOB-OMB BATTLEFIELD"
Note, the main menu also has its own textures. See MIO0 block from (U) 2A65B0 on the textures list for example.
Anybody know how many revisions of Mario 64 USA there are? IIRC Someone in an old thread I was reading implied that the final version of Mario 64 USA was very similar to the Shindou version, I was hoping to compare the two and maybe v1.0 to see if I could pick up any leads.
EDIT:
found a rom map for E or USA(not sure maybe both?) http://www.smwcentral.net/?p=nmap&m=sm64rom
I guess this is incomplete? but it looks like there is no dedicated block for text so I guess it's being stored with level layout data maybe, perhaps the font is stored in the common textures block, I'll look at this tomorrow morning.
As far as I've seen, there is only one version of (U) ROM. Looking at the Shindou Edition, its code segments look most closely like the (E) version as compiler optimizations were enabled, but its data segments (such as the MIO0 block containing font textures) most closely resemble the (J) version. I have some config files which give a more complete memory map of (J), (U), and (E) ROMs:
SM64 (J) MapSM64 (U) MapSM64 (E) Map (not as complete as others)