cecilarmitais c482e2dfdb Decompile 59 more callees; clear five asm files entirely
asm/main_020504BC.s          28 functions  cleared
  asm/main_0200D1F0.s          11 functions  cleared
  asm/main_02052060.s          10 functions  cleared
  asm/overlay_29_02320788.s     8 functions  cleared
  asm/main_020559D8.s           1 function   cleared
  asm/overlay_29_022E34A8.s     1 of 9       remainder -> overlay_29_022E2B68.s

sub_02050CF8 and sub_02050D84 are in translation units of their own,
src/main_02050CF8.c and src/main_02050D84.c, and that is load-bearing rather
than tidiness. Both call BitstreamDebug, which is four bytes -- an empty body --
and is one of the other 26 functions of the same asm file. Compiled beside it at
-O4,s, mwcc inlines the call away and each function comes out two instructions
short; the ROM then shifts and 33 of 37 sbins stop matching. Retail emits a real
bl there, so retail compiled these two apart from BitstreamDebug. Separate
objects reproduce that, and the pool -- five words and the predicated
ldrne/ldreq pair -- was never the problem.

asm/main_bss_022AB0AC.s declares a second global at 0x022AB918. Two objects of
different size share that address: the record TEAM_NAME (0x14 bytes, 0x10 under
JAPAN) and _022AB918, its leading name buffer (0xC, 8 under JAPAN). Four
functions load both, which needs two distinct (symbol, addend) pool keys; one
symbol gives one word and leaves them four bytes short. No .space is added and
no later symbol moves, so the bss layout and the ROM are untouched -- confirmed
by building that one-line change alone against the previous commit.

ov29_022E34A8_EU exists only in the EUROPE build, so its definition and its
prototype both carry #ifdef EUROPE; its single call site was already inside one.
Note that extracting it left an orphan #endif in the remainder file, because it
was the first function in its .s and sat inside a region conditional -- the tool
takes the opening directive with the function and leaves the closing one behind.

struct bag_items loses fill2/fill3/fill4 for the members behind them, so struct
bulk_item moves above it and two accessors return struct bulk_item *.
struct unk_020517F4 splits u8[8] into u8[4] + s32, forced by a 32-bit load at
offset 4. struct bitstream::ptr becomes u8 * -- CopyBitsTo and CopyBitsFrom read
it with ldrb, and char * under -char signed emits ldrsb. sub_02051FF0 and
LoadFileFromRom take a const char * path, not a u32 id; src/ground_bg.c already
declared the latter correctly.

Seventeen call-site-derived declarations are removed in favour of an include of
the owning header.

Authored by Claude (Opus 5) under human direction. Confirmed by matching builds
in all three regions: build/pmdsky.us/pmdsky.us.nds: OK,
build/pmdsky.eu/pmdsky.eu.nds: OK, build/pmdsky.jp/pmdsky.jp.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:14:41 -07:00
2026-08-22 20:45:50 -04:00
…
2026-08-01 12:46:55 -04:00
2026-09-04 13:13:23 -07:00
…
…
…
…
…
…

Pokémon Mystery Dungeon: Explorers of Sky

This is a WIP disassembly of Pokémon Mystery Dungeon: Explorers of Sky. For instructions on how to set up the repository, please read INSTALL.md. For information on how to contribute changes, see CONTRIBUTING.md.

This repository builds the following ROMs:

For contacts and other pret projects, see pret.github.io.

Description
Decompilation of Pokémon Mystery Dungeon: Explorers of Sky
Readme 333 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%