cecilarmitais 7658e4f92e Decomp 50 functions in five themed groups
Located as five groups of ten before any matching was attempted, then all fifty
matched, then one build, then one commit.

  overlay_04/06 global accessors           10   ov04_0233CA80 .. ov06_0233CAA8
  hardware register bit-fields             10   sub_02009BE8 .. sub_02009D20
  save reset / play timer                  10   sub_020483B8 .. sub_0204F9E0
  sound veneers + window accessors         10   sub_02017C90 .. sub_02030A74
  dungeon fixed-room / item                10   CloseFixedBin .. GenerateStandardItem

Every group is a contiguous run at a file head or tail, so extract_function
merges each function into an adjacent source instead of splitting a .s. None of
the fifty carries a region conditional -- checked per function, not per file --
so US alone verifies this commit.

Twelve of the fifty are interworking tail-call veneers (ldr ip, =f; bx ip). That
falls straight out of an ordinary forwarding call, and survives both argument
reordering (GenerateStandardItem) and a computed argument (sub_020483B8).
Nothing in the tree had a veneer decompiled, so the shape was proven on one
before the other forty-nine were written. Their parameter lists are guesses: a
veneer forwards registers untouched, so the emitted code is identical for any
arity and the match constrains nothing.

sub_020483D8 returns its callee's result. It sat at 40 through five spellings
with the pointer one register low; the target never reuses r0 after the call
because that value is the return value. Adding `return ok;` gives 0, and the
return is invisible in the asm because the value is already in place.

Two type corrections found by probing: the Are*Allowed family compares the
dungeon id unsigned (bcc, not blt -- 200 signed), and the register setters need a
u32 intermediate, since a u16 local forces a lsl/lsr truncation the target lacks
(615).

New placeholder structs: unk_0233F660, unk_0233EEE0, unk_020AFEF4, unk_02030A50.
src/main_02017C80.c's existing PlaySeByIdVolume(s32, s32) declaration is kept in
preference to this commit's; both affected functions were re-scored against it
and still match.

Authored by Claude (Opus 5) under human direction. All fifty verified at score 0.
Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 23:18:03 -07:00
…
2026-08-01 12:46:55 -04:00
2026-07-16 07:36:58 -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%