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

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.)

I converted the SM64 segment 02 assembly to armips. There are several advantages to armips over bass, but one notable feature this uses is the string mapping to match words like "the" and "you" during the dialog encoding. This makes the strings easier to read and manipulate. For example, bass:

db "Hey! Knock it off! That's\n"
db "_ second time `'ve\n"
db "nailed me. Now `'re\n"
db "asking for it, linguine\n"
db "breath!", 0xFF

and armips:
.stringn "Hey! Knock it off! That's\n"
.stringn "the second time you've\n"
.stringn "nailed me. Now you're\n"
.stringn "asking for it, linguine\n"
.stringn "breath!", 0xFF

Attached to this post are an archive of the armips assembly, an updated bass assembly, and the texture files they reference. You can build them with:
$ armips segment02.armips.asm
$ bass -o segment02.bass.bin segment02.bass.asm

Attached Files
Size: 188.01 KB / Downloads: 26 .zip

I've been looking at segment 02 in (J) and Shindou ROMs. Of course the major difference is the dialog font and text. The font itself is encoded as 1bpp instead of IA4. It includes numbers 0-9, uppercase Latin characters, hiragana, and katakana, as well as some punctuation. To add ten-ten or maru diacritics, 0xF0 or 0xF1 is prepended to the character byte. For example, the encoding of "ワープどかんを" is 9B 9F F1 8B F0 53 45 6D 6C. Newline is 0xFE, space is 0x9E, end of string is 0xFF, while full stop "。" is 0x6E (uses same 0xF1 texture as maru diacritic). Below is the full encoding table. Since not too much else is different, I will try to convert the segment 02 to assembly as well.
[Image: sm64:dialog_table_j.png]

I've deconstructed the (J) and Shindou segment 02 and dropped support of the bass version of (U). You can build with armips. File are UTF8 encoded. The string mapping in armips made this process relatively easy (see included sm64.j.dialog.tbl). This allows for human-readable strings to be used in the assembly file, such as:
.stringn "ろうかは しずかに\n"
.stringn "あるきましょう。", 0xFF

Build with armips:
$ armips sm64.j.segment02.asm
$ armips sm64.shindou.segment02.asm
$ armips sm64.u.segment02.asm
$ md5sum *.bin
59ab5326e2dfd5dff784fea6a342e623 *sm64.j.segment02.bin
ce8006d43a3d518c4430d8e229d7b59c *sm64.shindou.segment02.bin
b78d4f69ee2b872c2fa013d3f58344b7 *sm64.u.segment02.bin
(This post was last modified: 20-03-2017, 04:50 AM by queueRAM.)

Attached Files
Size: 212.41 KB / Downloads: 2 .zip

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