Tongari Boushi's code is split into 180 ARM9 overlays β small chunks of compiled ARM code that the DS swaps into a shared RAM slot as the player moves between game modes. Each overlay handles one screen, one feature, or one engine subsystem. This catalog is the per-overlay field guide: one page per overlay, describing what it does at runtime, what container files it pulls from disk, which UTF-16 LE strings are baked into its own binary, and the function table Ghidra's auto-analysis pass found inside it.
The overlay system page covers the runtime mechanics (RAM slot map, the controller/body pattern, the persistent rendering engine in ov137). The overlay knowledgebase page is the plain-English "what's an overlay?" explainer. This page is the searchable per-overlay index.
How the catalog reads
- Overlay β the ROM ID (ov000 through ov179). Click through to the per-overlay page.
- Purpose β a one-line summary drawn from the container files the overlay references. The small pill is the prior-pass role guess (the rough "what is this for" tag we had before the deep Ghidra pass).
- Fns β function count Ghidra auto-identified. Many are small trampolines; the dispatcher and high-fan-out functions are the meaty ones.
- JP strings β UTF-16 LE strings baked into the overlay's own binary. These live inside the compiled code section itself, not in an external container file.
- Containers β distinct container basenames (looking
like
buyitem.lzs,chest.lzs) the overlay references by string. These are the disk-side data files the overlay loads at runtime.
What's an overlay made of
Each overlay is a self-contained ARM module with five rough contents:
- Code β ARM/THUMB functions. Most overlays are almost-entirely code; the actual translatable text lives in container files loaded at runtime.
- Data tables β fixed-stride sprite-placement tables, dispatch tables, type tables. Read-only at runtime.
- Container references β ASCII strings naming
.lzs,.ofs,.nftrfiles the overlay's loader calls into the content cache for. The string is passed to a lookup that resolves it to a file ID in the ROM's FAT. - Embedded UTF-16 LE strings β direct text, baked into the overlay binary itself rather than loaded from a container. These are typically short menu labels and confirm prompts.
- External call targets β addresses in the persistent ARM9 binary the overlay branches into for shared helpers (memory management, OAM transfer, content cache lookups).
RAM-slot map at a glance
Overlays sharing a RAM address are mutually exclusive β only one is resident at a time. The dispatcher in the persistent ARM9 binary chooses which overlay to load into each slot based on game-mode state.
| RAM address | # overlays | Overlay IDs | Role |
|---|---|---|---|
0x02155a00 | 66 | ov000βov065 | Game-mode controllers |
0x021597a0 | 25 | ov066βov090 | Renderer / body slot 1 |
0x0215c540 | 20 | ov091βov110 | Renderer / body slot 2 (incl. NPC chat menu) |
0x021fb3c0 | 18 | ov160βov177 | Renderer / body slot 3 (incl. late-game extras) |
0x021b1ba0 | 11 | ov145βov155 | UCC / dress-up renderers |
0x0215e4a0 | 10 | ov111βov120 | Renderer / body slot 5 |
0x021a5ee0 | 6 | ov139βov144 | Renderer / body slot 6 |
0x021601c0 | 5 | ov121βov125 | Renderer / body slot 7 |
0x0216d120 | 5 | ov132βov136 | Audio / system slot |
0x0216cba0 | 4 | ov128βov131 | System slot |
0x0216da40 | 2 | ov137, ov138 | Rendering engine (2D / 3D map) |
0x021b6080 | 2 | ov156, ov157 | Slot 4 bodies |
0x021c3420 | 2 | ov158, ov159 | Slot 5 bodies |
0x02161680 | 2 | ov126, ov127 | Map / world |
0x021fd2c0 | 2 | ov178, ov179 | Tail bodies |
Functional groupings
Inferred from substring-keyword matches on container filenames plus the deep Ghidra pass. Boundaries are approximate.
- 2D UI screens β ov000βov065 (game-mode controllers) and the slot-1/2/3 body renderers behind them. Shops, menus, chat panels.
- UCC / dress-up β ov108, ov141, ov148βov155. Outfit-composition surface.
- Map / world β ov080, ov115βov117, ov127, ov138, ov156. Field navigation, world map.
- Persistent engines β ov137 (2D rendering), ov138 (3D map engine). Co-located at
0x0216da40; one resident at a time. - Audio / system β ov132βov136.
- Pure code / dispatch β many of ov018βov024, ov094βov099, ov102βov107, ov128βov136, ov160βov179 have no embedded strings and no container references; they are pure logic.
Per-overlay catalog
Source
notes/_overlay_knowledgebase.mdβ high-level overlay survey.notes/_overlay_knowledgebase.csvβ flat CSV of the same.notes/overlay_knowledgebase/ov<NN>.mdβ one descriptive markdown per overlay.notes/overlay_knowledgebase/raw/ov<NN>.jsonβ raw Ghidra dump per overlay.notes/phaseA_ghidra/overlay_role_final.jsonβ per-overlay role classification.notes/phaseA_ghidra/container_to_overlay.jsonβ reverse map: container basename β overlays referencing it.notes/phaseA_ghidra/overlay_string_inventory.jsonβ every overlay-embedded string with offset and encoding.notes/phaseA_ghidra/DISCOVERIES.mdβ aggregated reverse-engineering log.