cecilarmitais 637d196646 Decompile 86 more callees; clear three asm files, split a fourth
asm/overlay_29_022E4BB4.s   26 functions  cleared
  asm/overlay_29_0230D088.s   25 functions  cleared
  asm/overlay_29_022EA008.s   13 functions  cleared
  asm/main_02055894.s         22 of 23      split

sub_020559D8 is at score 75 (0 structural rows, 11 register-colouring rows) and
is NOT landed, so main_02055894.s splits: asm/main_020559D8.o holds that one
function between src/main_02055770.o and src/main_02056294.o.

Five struct ground_monster members are retyped, on load-width evidence from
sub_02055E14: level, level_at_first_evo and level_at_second_evo are read ldrb
though declared s8, and iq and max_hp are read ldrsh though declared u16. The
reading validates itself -- id at 0x4 is read ldrsh and is already declared s16,
and every member whose declaration is already correct reads exactly as declared.
A cast at the read site cannot fix this: MWCC takes the load's width AND
signedness from the declared member type alone. This deviates from
pmdsky-debug's s8/u16, and it narrows ApplyGummiBoostsGroundMode's second
parameter from u16 * to s16 * -- that function is still asm, so its prototype is
now pinned by this reading rather than by its own body.

struct dungeon's `u8 field_0x1c; u8 field_0x1d;` become one s16, forced by
ldrsh/strlth at 0x1c. 0x1C is 4-aligned and 0x1E is already s16, so no padding
appears and no offset moves. No other translation unit names either field.

sub_0205B008's second parameter becomes struct ground_monster * instead of u32:
it forwards the argument straight to sub_02055894, and both asm call sites load
r1 with `ldr r1, [r0, #0x3c]`, a word out of a struct field.

src/overlay_29_022E9FC0.c declares DUNGEON_PTR with a COMPLETE type, [2] rather
than []. ov29_022EA008 scores 1025 under the incomplete form: it lets mwcc keep
DUNGEON_PTR[0] live across a store the target reloads after. [] and [2] are
compatible types, so no use site changes. struct unk_02353560 in that file grows
from 5 to 0x10 bytes and struct unk_0237C850 is new; neither is named outside it.

Twelve message ids in src/overlay_29_0230BBAC.c get an #ifdef JAPAN block. Every
other region delta across the four files is a header-driven field displacement
and needs nothing.

Thirty-five pre-existing declarations across nineteen files are removed in
favour of an include of the owning header, or corrected in place. Eleven of them
disagreed with the definition: UnkMapRelatedFunc declared with an unsigned first
parameter in four files where the switch dispatch is a signed range test, six
declared with no prototype at all and the wrong return type, and one
(sub_02055894) declared as taking a u32 where it takes a pointer.

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:07 -07: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 335 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%