Asset kinds
Every EMI entry on the disc belongs to one kind, a name for a class of disc content chosen from the entry type, load address and contents (glossary). This page maps each kind to its page and describes the message-table and game-string kinds, which have no page of their own. Per-kind sizes are in coverage.
Where each kind is described
Section titled “Where each kind is described”| Kind | Entry type, load address | Described in |
|---|---|---|
| EMI container | .EMI file |
EMI |
code |
types 0, 1, 2, program windows | EMI, area |
texture |
type 3 | graphics |
palette |
type 0, palette arena | graphics |
character-sprites |
type 0, 0x8003B800 and siblings |
character |
audio-bank, audio-sequence, audio-cues |
types 6 and 7, 10, 8 | audio |
| XA and STR streams | .STR files |
STR and XA |
area-map |
type 0, 0x80104000 |
area |
area-cells |
type 0, 0x80032000 |
area |
area-script |
type 0, 0x800D3800 |
area |
area-actor-defs |
type 0, 0x800E3800 |
area |
area-encounters |
type 0, 0x800E4000 |
area |
battle-script, bmagic-script |
type 0, 0x800F0800, 0x800C3800 |
EMI |
area-module |
type 0, 0x80117000 |
area |
area-message |
type 0, 0x80010000 |
Message tables |
resource-table |
type 0, 0x8001A000 |
game text |
| item, weapon, armor, shop and ability tables | ETC/GAME.EMI entry 0 |
game records |
| base stats of the eight characters | ETC/START.EMI entry 8 |
game records |
| memory card save | ETC/START.EMI entry 9 |
save |
| executables | SLUS_004.22, LOGO.EXE |
executable |
| conversion to PNG, glTF, SoundFont, MIDI | conversion |
The reserve kind is zero fill with no consumer: 44 character-sprites fillers of 16,384 zero bytes and 9 all-zero cell slots (coverage).
Message tables
Section titled “Message tables”Dialogue is in message tables, the 0x80010000 payloads of the area archives. A table decodes to text and encodes back to its own bytes. Game text owns the table layout, the table tests and the counts on the disc.
- Slots. A slot is its message’s index, or none for the end of the table. A message runs to the next distinct offset; slots past the last message point at the end of the table. The table is the slot table, then the messages in offset order.
- Text. Control codes are
{TAG}; a code with one operand byte is{TAG:hh}; a byte with no established meaning is{RAW:hh}. Letters and digits are ASCII. The fullwidth,and:are the high slots0x8Dand0x8F. Codes and evidence are in text control codes. - Name fields. They use the same codes, with
{END}as the only single-byte code. The C strings of an executable use plain ASCII with{TAB},{NEWLINE}and{CR}. - Not text. A payload that is not a table has no message form. An unknown tag, an operand that is not one byte, a character the encoding lacks and an empty message have no encoding.
Every text table and every message of one encodes back to its own bytes, and every archive rebuilt from its tables reads back unchanged.
Game strings
Section titled “Game strings”Strings outside text tables sit in the other payloads. Names in the game tables and enemy records are fixed-width fields; every other string is a record that ends at its terminator or where the pointer table that reaches it begins. A pointer table is two consecutive words that point inside the payload, and only a payload with a load address (types 0 to 2 in the RAM window) has one.
On the retail disc 831 payloads hold 43,593 strings: 165 text tables with 10,510 messages, and 666 other payloads with 33,083 strings. A string is located by offset and length, a name also by stride. The bytes between strings are not text.
- A name must fit its field. A shorter name is zero-padded, so later records keep their offsets.
- A record may change length, but a payload that points to it does not follow.
- A record that overlaps a name or another record is left out, and the name wins. 19 of the 33,102 strings outside message tables overlap (1 name and 18 records, in 14 payloads), leaving the 33,083.
- All 2,523 payloads that are not message tables decode and encode back to their own bytes, 666 of them with strings.
The executables hold 167 C string literals, which need the ASCII encoding. They are not in the 33,083.
Sources and confidence
Section titled “Sources and confidence”- Confidence: high. Each kind comes from the entry type, load address and contents of every entry on the retail disc, and the text kinds decode and encode back to their own bytes for all payloads.
- Evidence: the type and load argument of every EMI entry, a table test over all 200 entries that load at
0x80010000, string location in 831 payloads, and round-trip encoding of every payload and of every archive rebuilt from its tables.
Related
Section titled “Related”- EMI container: entry types and load arguments that select a kind.
- Game text: message-table layout, control codes and the counts on the disc.
- Disc and files: the files and archives that hold the kinds.
- Converting game data: how each kind converts to and from open formats.
- Documentation coverage: bytes understood per kind.