mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 14:18:10 -05:00
e0f7191722d61e83678c82009d6d53830b4b299d
Follow-up to ff65ac0e, which decompiled the US branch only. One source now
matches all three regions:
build/pmdsky.us/pmdsky.us.nds: OK
build/pmdsky.eu/pmdsky.eu.nds: OK
build/pmdsky.jp/pmdsky.jp.nds: OK
JAPAN, five source differences:
- DefenderAbilityIsActive__0230A940 takes three arguments, not four, at six
call sites. include/overlay_29_0230A994.h already declares this, so the JP
build failed to compile rather than to match.
- every message id is US - 0x2C1. Kept as region-conditional #defines at file
scope, following src/dungeon_ai.c.
- no UpdateStatusIconFlags call before the HP check.
- no end_floor_no_death_check_flag guard on the revival-item path.
- in the reviver-seed block, no ov29_022FBD24; instead ov29_02307DC0 after the
curse handling.
EUROPE, one behavioural difference: the last arm of the defeat-message ladder
records a flag instead of logging, and the message is emitted later at three
points - the reviver-seed path, the revival-item path, and their else. The two
revival paths log from a different table.
That table is four bytes that exist only in the EUROPE branch of
asm/overlay_29_rodata_02352A6C.s, immediately after ov29_02353218 and carrying
no symbol; the extractor could only render both as raw addresses (0x02353E44 and
0x02353E40). This commit labels it. The label and .global add no bytes, and the
EU checksum is what confirms both references resolve where intended - had either
been wrong, pmdsky.eu.nds would not match.
The name ov29_02353E44 is keyed to the symbol's EUROPE address, which breaks the
file's convention of naming by US address. There is no US address to use: the
data does not exist in that build.
One change was needed for the EU register allocation and is byte-neutral for the
other two builds: `dmon` is now assigned after the wild-enemy test rather than
before it, with that test reading through defender->info. Introducing the
variable later flips which web the allocator colours first and unwinds a
whole-function rotation of three callee-saved registers.
Authored by Claude (Opus 5) under human direction. Confirmed by matching builds
of all three regions.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…
…
…
…
…
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:
- pmdsky.us.nds
sha1: 5fa96ca8d8dd6405d6cd2bad73ed68bc73a9d152 - pmdsky.eu.nds
sha1: c838a5adf1ed32d2da8454976e5b1a1aa189c139 - pmdsky.jp.nds
sha1: 7785138dd343b6f2d0f2c9cadc26b4aa927161d7
For contacts and other pret projects, see pret.github.io.
Description
Languages
Assembly
66.3%
C
18%
C++
7.1%
Boogie
4.3%
sed
1.5%
Other
2.8%