Falsebound Archive
6 Formats 6.7

The text bank and font

4,791 messages of 16-bit glyph codes inside main.dol, and the font behind them.

Where
main.dol: start table 0x800ECAA0, codes 0x800F157C (0x57940 bytes), font 0x80148EBC
Messages
4,791
Codes in the retail bank
179,360, filling the block exactly
Font
TPL, two 256 × 256 I4 pages, 200 cells of 24 × 24

Messages

0x800ECAA0 is a table of 4,791 u32 start indices (counted in 16-bit units) into the block of codes at 0x800F157C. A message is a run of 16-bit nodes:

Node Meaning
bit 15 set last node of the message
bit 14 set a reference, two nodes long: N (6 bits) and O (7 bits) in this node, a message id in the next; copy N nodes from offset O of that message (recursively)
otherwise a glyph code

A glyph code’s low 13 bits pick a 24 × 24 cell of the font (100 cells per page, page = code ÷ 100), and bit 0x2000 marks a half-width glyph (12 pixels). Cell 100 is the newline.

Messages 0-3 are special: the newline, the space, the 95 half-width ASCII characters and the 95 full-width ones. The text routine takes its character tables from messages 2 and 3 when it converts formatted text (ASCII or Shift-JIS) to glyphs.

The retail bank

  • It uses no references, although the decoder supports them.
  • The messages lie back to back in id order and fill the block exactly: 179,360 codes, no gap, nothing spare at the end. 21,666 codes belong to messages identical to an earlier one.
  • Only half-width ASCII, the newline and full-width ASCII occur. 39 messages besides the full-width character table are entirely full-width (headings, PUSH START), and none mixes the two.
  • The longest message has 193 codes. Callers cut a message at their own limit (usually 256 codes, as little as 20 in some panels) instead of overrunning it.

Because the game reaches messages only through the start table, a rewritten bank may store identical messages once or point one message into the end of another. That frees about 44,900 bytes.

Where the messages are used

Messages are picked by formula in blocks: monster names id + 0xB7, marshal names 0x172 + marshal, skill card names 0x552 + id and descriptions 0x819 + id, mission titles from 0x658 (Yugi), 0x66F (Seto) and 0x685 (Joey), town names 0x856 + stage × 8 + node and descriptions 0x90E + stage × 8 + node. There is no per-monster flavour text.

The font

A TPL inside main.dol at 0x80148EBC, directly after the codes: two 256 × 256 pages in I4 format, 0x10084 bytes. Window text is drawn glyph by glyph as textured squares, with a dark shadow first.

Evidence

The text routine is part of the decompiled code. The statements about the retail bank come from walking all 4,791 messages through the start table.