mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-29 05:41:47 -05:00
b6faa49387077c3c67ddfb55105b43a10d7b548c
Decompile from asm: NewWindowScreenCheck 0x02027648 GetPaletteBaseAddress__020278A8 0x020278A8 SetScreenWindowsColor 0x02027A80 NewWindowScreenCheck counts the active windows on each background before delegating to NewWindow, and sets a flag when either screen has none. It reads is_active as a signed byte at 0xB6 and bg_id at 0x8, both named by the Window layout added in the previous commit, so the loop reads as what it does. It walks with a cursor rather than indexing. Indexing WINDOW_LIST[i] emits an mla per iteration; the target advances a pointer by 0xE0 at the bottom of the loop. Its two counters also have to be assigned in the order sub then main -- declaration order alone was not enough, and every permutation of the four locals left between 20 and 95. SetScreenWindowsColor's colour parameter is s32, not u8, and that distinction is not visible in its own bytes: both score 0 against it, because the store is a strb either way. It is visible one level up. SetBothScreensWindowsColor, landed matching in the previous commit, passes its argument straight through; a u8 parameter makes the compiler truncate at that call site, which changes an object that already matched, changes the size of main.sbin, and shifts every overlay after it. The first build of this batch failed 33 checksums for that reason, with no compile error and nothing wrong in the function being added. GetPaletteBaseAddress__020278A8 reads through _020AFC70, which include/ main_02064FFC.h already declares as u8 *. It is declared the same way here rather than being given a second, differently typed declaration. No comments are added to any pmd-sky file. 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>
…
…
…
…
…
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%