cecilarmitais 3fd44e5988 Decompile 16 callees of the combat and dungeon-generation functions
Every function was verified at score 0 against its NORTH_AMERICA, EUROPE and
JAPAN targets before landing, with the target's address walk closing exactly in
each region, and by a matching US build after landing.

  overlay_29_0233E43C.c   GenerateRoomImperfections, CreateHallway
  overlay_29_022E3F20.c   UpdateStatusIconFlags, PlayQuestionMarkEffect,
                          PlayExclamationPointEffect__022E47D4,
                          PlayExclamationPointEffect__022E4880, ov29_022E3E74
  dungeon_util_2.c        PopulateActiveMonsterPtrs, GetTeamMemberIndex,
                          GetMonsterOrTrapName, SubstitutePlaceholderStringTags
  overlay_29_022EC7E8.c   IsFloorOver                      (new file)
  overlay_29_02345A3C.c   SpawnDroppedItemWrapper          (new file)
  overlay_29_023061A8.c   EndBurnClassStatus               (new file)
  overlay_29_02306728.c   EndCurseClassStatus              (new file)
  overlay_29_02336F4C.c   UpdateTrapsVisibility            (new file)

Eleven were landed at a file boundary by first decompiling the functions between
them and the nearest end of their .s, so they merge into the adjacent source file
instead of splitting it. The other five sit too far from either end to make that
worthwhile and split their .s as usual.

CreateHallway closes a provisional declaration: CreateGridCellConnections had
declared it from the call site as (s32 arg1 .. s32 arg7), and that guessed
prototype is now replaced by the real one in the same header.

Eighteen pre-existing declarations of these functions, written from call sites in
other translation units, are replaced by an include of the owning header. Three
of them disagreed with the real signature, and no build could have caught any of
them because two declarations of one function never meet in a single translation
unit:

  IsFloorOver            declared `extern s32` in two files; it returns bool8.
  SpawnDroppedItem       declared `void`; SpawnDroppedItemWrapper returns its
                         value. Corrected in src/dungeon_projectile_throw.c.
  SetPreprocessorArgsStringToName
                         declared with `u8 pos` / `u8 param_4`. Every existing
                         call site passes literal constants, where the narrowing
                         is invisible; SubstitutePlaceholderStringTags passes
                         variables, and the narrow form emits two `and rX,#0xff`
                         rows the target does not have. Widened to s32/u32.

GetMonsterOrTrapName is landed with three parameters rather than two. Both score
0 -- an ignored third argument costs the callee nothing, so the callee's bytes
cannot distinguish them -- but src/overlay_31_02382820.c has always called it
with three, which is evidence about the caller that the callee cannot supply.

pret/pmd-red was used as a structural reference where it has an equivalent
function. It supplied the shape and never the spelling: it is a different game
built by a different compiler. IsFloorOver is the clearest case -- translating
its nested form literally scored 1525, and flattening to four independent early
returns scored 0.

Authored by Claude (Opus 5) under human direction. Confirmed by a matching
build: build/pmdsky.us/pmdsky.us.nds: OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:12:42 -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
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%