mirror of
https://github.com/pret/pmd-sky.git
synced 2026-10-01 14:48:14 -05:00
967fe53b74a9b7b851d008df07dd778f4611c0e0
Two .s files cleared entirely, so main.lsf loses both objects:
asm/overlay_29_022FB678.s AreEntitiesAdjacent, IsHero, ov29_022FB718,
ov29_022FB83C, ov29_022FB920, ov29_022FB984,
ov29_022FB98C, ov29_022FB9BC
asm/main_02003328.s TaskProcBoot, EnableAllInterrupts, sub_02003620,
sub_02003704, sub_02003754, sub_02003780,
sub_020037A4, GetTime, DisableAllInterrupts
main_02003328 lands as TWO objects, not one. GetTime calls EnableAllInterrupts,
which precedes it in address order, and at -O4,s MWCC folds a callee whose body
it has already seen: in one translation unit GetTime's two bl EnableAllInterrupts
become the inlined body. So GetTime and DisableAllInterrupts go to a new
src/main_020037B4.c; the other seven merge into src/main_0200330C.c.
DisableAllInterrupts is not inlined in the same run because it is defined after
GetTime, which is the same rule seen from the other side.
enum item_id gains ITEM_INVALID = -1, placed as MONSTER_INVALID is in
enum monster_id. Under -enum min an enum with no negative enumerator is
unsigned, so a field of that type compiles to ldrh where AuraBowIsActive's
target has ldrsh; a cast at the call site cannot fix it, which was measured.
Range becomes -1..1399, still two bytes. VERIFIED IN ISOLATION -- added alone,
nothing else changed, all three ROMs still matching -- so it is byte-neutral for
existing code, the same standard ENTITY_NONE and MONSTER_INVALID were held to.
Five call-site declarations are replaced by an include of the owning header.
Two were wrong, not merely redundant: ov29_022FB984 was declared void where it
returns bool8, and ov29_022FB98C was an unprototyped extern int for a function
that returns nothing and takes two struct entity *.
Authored by Claude (Opus 5) under human direction. Each function was measured at
decomp.me score 0 in every region it exists in and re-measured by an independent
verifier. Confirmed by matching builds of 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>
…
…
…
…
…
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%