Status conditions (Sleep / Poison / Burn / Freeze / Paralysis / Toxic)
are NOT defined yet. The patterns that initially looked like status
storage turned out to be:
- unk_D_800FCB18.unk_15 & 7 → audio struct flags
- temp_s6->unk_15 switch on 0x8/0x10/0x40 → critical-hit modifiers
The actual status encoding is buried in unrenamed fields on
unk_D_843C5568 (the battle struct) in src/fragments/62/. Deeper
archaeology on fragment62_361050.c needed before STATUS_* can be
defined safely.
Still matching: md5 ed1378bc… (docs-only change)
The table of item-name string pointers, indexed by item ID 1..83.
Renamed in src/22630.c, include/pokemon.h (comment only),
linker_scripts/us/symbol_addrs.txt. The asm/us/data/rom_data_703E0.data.s
dlabel change is gitignored (asm is regenerated by splat from
symbol_addrs.txt — the regenerated .s will use the new name on
the next 'make extract').
Still matching: md5 ed1378bc… (verified by `make`)
Defines three ranges matching Stadium's item encoding
(deciphered from func_80021CE0 in src/22630.c):
ITEM_REGULAR_FIRST/LAST/COUNT = 1..83 (regular items)
ITEM_HM_FIRST/LAST/COUNT = 196..200 (HM01..HM05)
ITEM_TM_FIRST/LAST/COUNT = 201..254 (TM01..TM54)
Plus ITEM_NONE = 0.
KNOWN_UNKNOWNS:
- Stadium has TM01..TM54 (54 TMs); Gen 1 canonical only has 50.
IDs 251..254 (TM51..TM54) may be Stadium-specific or unused.
- IDs 0, 84..195, 255+ fall through to a placeholder name
(gItemNames[6] = '?????') in func_80021CE0.
Still matching: md5 ed1378bc… (verified by `make`)
The 165-entry moves table. Renamed in:
- src/*.c (8 files: 2E460.c, 232C0.c, fragments/41, 62, 66)
- include/variables.h (the extern decl)
- linker_scripts/us/symbol_addrs.txt (declaration)
- asm/us/data/rom_data_703E0.data.s (dlabel — the data source)
- asm/us/nonmatchings/fragments/62/fragment62_361050/func_8437B0CC.s
(lui/addiu %hi/%lo references in the assembly)
Note: only symbol_addrs.txt had D_80072B00 declared (unlike
D_80070F84 which was in both symbol_addrs.txt AND undefined_syms.ld);
the asm .data.s provides the actual symbol via dlabel. Both have
been updated to keep the build resolving correctly.
Still matching: md5 ed1378bc… (verified by `make`)
The moves table struct (6 bytes per move). Field layout verified
by reading D_80072B00 directly from the baserom and matching
against known Gen-1 moves:
id (1..165, redundant with array index)
effect (move effect ID, 0 = no extra effect)
basePower (0 = status move)
type (0..14 = Gen-1 type)
accuracy (0..255, where 255 = 100%)
pp (max PP)
Touches include/variables.h, src/2E460.{c,h}, src/232C0.c,
src/fragments/{27,41,62,66,24}/* — 11 files. Field accesses
renamed on D_80072B00[...] literals AND on Move* variables
(temp_v0, sp130, ptr, sp9C, sp18, sp1C, temp_v1_13, temp_v0_2).
Note: in src/fragments/41/fragment41_28D1A0.c the name `ptr`
is reused in two different functions with different types
(unk_D_82F20A10* vs Move*); only the Move*-scoped ptr was
renamed (lines 286, 291), the unk_D_82F20A10*-scoped ptr was
left untouched. This was done with manual edits, not the bulk
script.
Still matching: md5 ed1378bc… (verified by `make`)
Adds:
- MOVE_NONE = 0
- MOVE_COUNT = 165
- MOVE_MAX_ID = 165
- MOVE_BOUNDARY = 0xA6 (canonical 'max + 1' for range checks)
Plus a PokemonType enum with the 15 Gen-1 types (TYPE_NORMAL=0
through TYPE_DRAGON=14), verified against D_80072B00 moves data
(Dig = 4 Ground, Submission = 1 Fighting, etc.).
KNOWN_UNKNOWNS note: Stadium's move 2 (Karate Chop) is typed 0
(Normal) and move 84 (Mega Drain) is typed 0x17 (out of 0..14
range, PP=30) — canonical Gen-1 says Fighting / Grass (10) / PP=15.
Either Stadium retypes these or its move list is reordered.
Still matching: md5 ed1378bc… (verified by `make`)