ov087 magic_ui
containers: 2d/inputmagic/bg_m%d.lzs, 2d/inputmagic/bg_s0.lzs, 2d/inputmagic/input.lzs (+11 more)
Header
Numeric metadata for this overlay as read from the overlay table at ROM
offset 0x8DE00 (per-entry stride 32 bytes). Function
counts, data-item counts, and the call-graph fan-out are from a Ghidra
11.3.1 headless auto-analysis pass.
Reading the binary
The overlay ships on the cart at file ID 87 under the BLZ code-LZ compression wrapper (the same backward-LZ scheme Nintendo uses for executable ARM9 code).
At load time the engine reads the overlay table entry at ROM offset
0x8DE00 + 87 * 0x20, allocates the destination
RAM region at 0x021597a0, decompresses
the body in-place (if compressed), and resolves any external
relocations.
To inspect this overlay outside the running game, decompress
overlay/overlay_087.bin with
ndspy.codeCompression.decompress() (Python ndspy library)
and load the resulting plaintext into Ghidra or
IDA at base address 0x021597a0. The
raw Ghidra auto-analysis dump used to populate this page lives at
notes/overlay_knowledgebase/raw/ov087.json;
the per-overlay descriptive markdown is at
notes/overlay_knowledgebase/ov087.md.
Embedded strings
7 UTF-16 LE strings live inside this overlay's compiled binary. These addresses are absolute (inside the overlay's RAM image after load). The text is stored as little-endian UTF-16 code units, NUL-terminated.
Container references
Distinct container basenames referenced by this overlay. Each is loaded via the content cache by passing the basename string to a lookup that resolves it to a file ID in the ROM's FAT. The path column shows the file's location in the clean extract, where resolved.
-
bg_s0→data/2d/inputmagic/bg_s0.lzs -
input→data/2d/inputmagic/input.lzs -
input2→data/2d/inputmagic/input2.lzs -
mgc09b→data/2d/inputmagic/mgc09b.lzs -
mgc09c→data/2d/inputmagic/mgc09c.lzs
Unresolved
These container basenames appeared in the overlay's string table but no file of that name was found in the clean extract. Most are false-positive ASCII matches (function names, register maps, fragments of other strings); a few may be containers that the overlay names but never actually opens. Listed for completeness.
-
2d/inputmagic/bg_m%d.lzs— no matching container found in clean extract -
2d/inputmagic/bg_s0.lzs— no matching container found in clean extract -
2d/inputmagic/input.lzs— no matching container found in clean extract -
2d/inputmagic/input2.lzs— no matching container found in clean extract -
2d/inputmagic/mgc%02d.lzs— no matching container found in clean extract -
2d/inputmagic/mgc09b.lzs— no matching container found in clean extract -
2d/inputmagic/mgc09c.lzs— no matching container found in clean extract -
2d/inputmagic/msg.ofs— no matching container found in clean extract -
msg
Function list
Functions Ghidra auto-identified inside this overlay's RAM range.
Names prefixed FUN_ are auto-generated from the function's
entry address; size is in bytes; the "calls" column counts both
intra-overlay branches and external ARM9 call targets. The "strings"
column counts how many UTF-16 LE strings each function references.
Show all 38 functions
| # | Address | Size | Calls | Strings | Role hint |
|---|---|---|---|---|---|
| 1 | 0x02159e04 | 16 | 0 | 0 | trampoline / small helper |
| 2 | 0x02159e14 | 648 | 38 | 0 | high-fan-out (likely dispatcher / setup) |
| 3 | 0x0215a0c4 | 170 | 6 | 1 | refs: bg_m%d.lzs |
| 4 | 0x0215a17c | 30 | 1 | 0 | trampoline / small helper |
| 5 | 0x0215a19c | 508 | 18 | 8 | refs: bg_s0.lzs \| bg_s0.lzs \| input.lzs \| input.lzs \| input2.lzs \| input2.lzs |
| 6 | 0x0215a3c8 | 66 | 5 | 0 | code |
| 7 | 0x0215a40c | 258 | 11 | 1 | refs: msg.ofs |
| 8 | 0x0215a524 | 70 | 3 | 0 | code |
| 9 | 0x0215a56c | 78 | 2 | 0 | code |
| 10 | 0x0215a5c0 | 2,084 | 58 | 0 | high-fan-out (likely dispatcher / setup) |
| 11 | 0x0215ae12 | 2 | 0 | 0 | trampoline / small helper |
| 12 | 0x0215ae28 | 16 | 0 | 0 | trampoline / small helper |
| 13 | 0x0215ae3c | 12 | 1 | 0 | trampoline / small helper |
| 14 | 0x0215ae4c | 12 | 0 | 0 | trampoline / small helper |
| 15 | 0x0215ae5c | 12 | 1 | 0 | trampoline / small helper |
| 16 | 0x0215ae6c | 6 | 0 | 0 | trampoline / small helper |
| 17 | 0x0215ae78 | 854 | 37 | 0 | high-fan-out (likely dispatcher / setup) |
| 18 | 0x0215b1f4 | 640 | 20 | 1 | refs: 2d/inputmagic/msg.ofs |
| 19 | 0x0215b490 | 24 | 1 | 0 | trampoline / small helper |
| 20 | 0x0215b4a8 | 270 | 5 | 0 | code |
| 21 | 0x0215b5bc | 308 | 5 | 0 | code |
| 22 | 0x0215b6f4 | 528 | 5 | 9 | refs: mgc%02d.lzs \| mgc09c.lzs \| input.lzs \| input.lzs \| mgc09b.lzs \| input.lzs |
| 23 | 0x0215b930 | 246 | 5 | 1 | refs: 2d/inputmagic/mgc%02d.lzs |
| 24 | 0x0215ba38 | 220 | 4 | 0 | code |
| 25 | 0x0215bb1c | 274 | 8 | 1 | refs: 2d/inputmagic/mgc%02d.lzs |
| 26 | 0x0215bc44 | 304 | 7 | 0 | code |
| 27 | 0x0215bd7c | 160 | 7 | 0 | code |
| 28 | 0x0215be28 | 6 | 0 | 0 | trampoline / small helper |
| 29 | 0x0215be34 | 138 | 7 | 0 | code |
| 30 | 0x0215bec0 | 58 | 0 | 0 | code |
| 31 | 0x0215befc | 30 | 1 | 0 | trampoline / small helper |
| 32 | 0x0215bf1c | 126 | 1 | 0 | code |
| 33 | 0x0215bfa0 | 66 | 3 | 0 | code |
| 34 | 0x0215bfe4 | 52 | 2 | 0 | code |
| 35 | 0x0215c01c | 66 | 4 | 0 | code |
| 36 | 0x0215c074 | 50 | 3 | 0 | code |
| 37 | 0x0215c0a8 | 52 | 0 | 0 | code |
| 38 | 0x0215c0f0 | 12 | 1 | 0 | trampoline / small helper |
Open questions & conflicts
Open questions / unknowns
- Auto-analysis identified 38 functions covering 8472 of 11680 overlay bytes.
- Function names are auto-generated `FUN_<addr>`. Manual renaming based on call-graph + string-ref analysis is a follow-up.
- BSS size is 0 bytes; Ghidra-imported overlay does not include BSS so any references into the BSS range appear as unresolved.
Conflicts with the prior shallow pass
- **Mismatch:** prior-pass `controls_containers` = `['inputmagic']`; Ghidra-extracted containers = `['2d/inputmagic/bg_m%d.lzs', '2d/inputmagic/bg_s0.lzs', '2d/inputmagic/input.lzs', '2d/inputmagic/input2.lzs', '2d/inputmagic/mgc%02d.lzs', '2d/inputmagic/mgc09b.lzs', '2d/inputmagic/mgc09c.lzs', '2d/inputmagic/msg.ofs', 'bg_s0', 'input', 'input2', 'mgc09b', 'mgc09c', 'msg']`. Ghidra wins.
Source
- Per-overlay markdown:
notes/overlay_knowledgebase/ov087.md - Raw Ghidra dump:
notes/overlay_knowledgebase/raw/ov087.json - Overlay-system explainer: overlays system
- Plain-English overlay primer: overlay knowledgebase