cecilarmitais 5f96316f71 Decomp ApplyDamageAndEffects; ApplyDamage's damage source is signed 16-bit
ApplyDamageAndEffects (617 instructions, overlay 29 at 0x0230863C) lands in
src/overlay_29_02308FBC.c beside ApplyDamage, with all three regions matching.

JAPAN differs in eleven places: ten DefenderAbilityIsActive__0230A940 calls
drop their fourth argument (the header already declares both forms), and the
counter-damage message id is US - 0x2C1, added as MESSAGE_C3F alongside the
existing per-region defines. EUROPE is byte-identical to US.

ApplyDamage's sixth parameter changes from enum damage_source_non_move to
s16. The caller loads it with ldrsh and passes it in a register; the enum is
all-positive so -enum min makes it unsigned 2-byte, which emits ldrh there.
s16 scores 0 on both functions and all three ROMs still match, so this is a
correction to the type rather than a change in behaviour.

New in this commit: struct unk_023535DC for the exclusive-item effect table at
ov29_023535DC (16-byte stride: effect id, argument, handler), and externs for
the ten ov10_022C* activation-chance globals and six overlay callees.

Three constructs are colouring devices rather than recovered source and should
be read as stand-ins: a (u32) cast on the final return, a (s16) cast on the
counter-attack loop's damage-source argument, and *(u8 *)effect as the effect
loop's condition. Each is plain C, and each is load-bearing for the match.

Authored by Claude (Opus 5 and Fable 5) under human direction. Confirmed by
matching builds of all three ROMs: build/pmdsky.us/pmdsky.us.nds: OK,
build/pmdsky.eu/pmdsky.eu.nds: OK, build/pmdsky.jp/pmdsky.jp.nds: OK -- each
also passing main.sha1, so the ARM9 binaries match and not only the packaged
ROMs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 23:12:40 -07:00
2026-04-08 09:53:43 +02:00
2026-08-22 20:45:50 -04:00
2024-06-23 16:59:48 -05:00
2024-12-28 02:25:07 -06: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
2025-06-10 23:35:01 -04: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%