Commit Graph

172 Commits

Author SHA1 Message Date
csaldiasdev
aae0a915c3 docs: pokemon.h — note status conditions are deferred
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)
2026-07-05 21:23:48 -04:00
csaldiasdev
23dcd25108 rename: D_80072EE0 → gItemNames[] (the item-name pointer table)
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`)
2026-07-05 21:19:22 -04:00
csaldiasdev
f76a8cac0a add: pokemon.h — item ID constants
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`)
2026-07-05 21:17:28 -04:00
csaldiasdev
06539f1843 rename: D_80072B00 → gMoves[] (the moves table)
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`)
2026-07-05 20:58:12 -04:00
csaldiasdev
303e746071 rename: unk_D_80072B00 → Move struct + all 6 fields
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`)
2026-07-05 20:54:17 -04:00
csaldiasdev
5b806f2999 add: pokemon.h — move constants + PokemonType enum
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`)
2026-07-05 20:44:07 -04:00
csaldiasdev
780c9949d3 add: include/pokemon.h with species ID constants
Defines:
- SPECIES_NONE         = 0
- NATIONAL_DEX_COUNT   = 151
- SPECIES_BLANK        = 152  (out-of-range sentinel)
- SPECIES_EXTENDED_MAX = 190  (Stadium-internal species ID range)

Still matching: md5 ed1378bc… (verified by `make`, header currently unused)
2026-07-05 20:17:53 -04:00
Diamond Lewis
256584a9ed Decomp 46680 2025-12-03 20:45:09 -06:00
Diamond Lewis
5e16573ea5 func_812008C8 2025-10-15 18:08:19 -05:00
Diamond Lewis
cbddd22a5f Fragment 1 various functions 2025-10-13 16:32:50 -05:00
Diamond Lewis
892894bc4a Fragment 1 various functions 2025-09-18 10:19:06 -05:00
Revo
c9006556e4
Merge pull request #211 from dplewis/1AB70
Some checks failed
C/C++ CI / build (push) Has been cancelled
1AB70
2025-09-15 18:22:30 -04:00
Diamond Lewis
b3eb5d24e8 Gameboy MBC 2025-09-15 15:18:23 -05:00
Diamond Lewis
6c865d2685 Move handwritten asm 2025-09-14 18:26:32 -05:00
Diamond Lewis
f4fbcfc4dd refactor unk_D_86002F58_004_000_010_02C 2025-09-14 07:56:46 -05:00
Diamond Lewis
4a8370037a Decomp 11B10 2025-09-11 06:14:17 -05:00
shy
546e4c45b0 renaming 2025-07-27 19:03:00 -04:00
shy
5839c32089 renaming 2025-07-26 19:49:01 -04:00
shy
267518581c warning fix 2025-07-23 00:35:25 -04:00
shy
59bbc7b295 renaming on fragments 3 18 19 20 and 21 2025-07-16 17:31:37 -04:00
Kelebek1
d56be72378 fragment62 2025-06-19 23:11:00 +01:00
Kelebek1
c5436d026c 359F90 2025-06-13 08:05:24 +01:00
Kelebek1
62ce4fdaab 343BA0, 347330, 34A420 2025-06-08 18:47:33 +01:00
Kelebek1
39bce5b30d 317E70 2025-05-28 06:21:13 +01:00
Kelebek1
1022633385 2FA4D0 and 3020D0 2025-05-24 01:13:10 +01:00
Kelebek1
34e6391eac 2F3CB0 2025-05-22 19:55:22 +01:00
Kelebek1
8bc0728693 2EC3C0 2025-05-20 05:39:18 +01:00
Kelebek1
6b0ffc9073 fragment66 2025-05-01 01:43:59 +01:00
Kelebek1
0ecece6410 fragment65 2025-04-30 22:02:07 +01:00
Kelebek1
032c1f468a fragment64 2025-04-30 08:35:45 +01:00
Kelebek1
62566ae68e fragment63 2025-04-30 01:35:27 +01:00
Kelebek1
f4a30b39d4 fragment61 2025-04-26 22:34:56 +01:00
Kelebek1
32188c1abd fragment60 2025-04-18 20:11:45 +01:00
Kelebek1
39e0fe622a fragment59 2025-04-18 17:01:20 +01:00
Kelebek1
7a45aca992 fragment58 2025-04-18 13:00:14 +01:00
Kelebek1
7bd3754f52 fragment57 2025-04-18 02:10:31 +01:00
Kelebek1
053ac548f7 fragment56 2025-04-17 19:29:51 +01:00
Kelebek1
afe691edc6 fragment55 2025-04-17 15:18:31 +01:00
Kelebek1
a7c1218d27 fragment53 2025-04-17 09:32:42 +01:00
Kelebek1
cde58d69df fragment50 2025-04-16 21:01:24 +01:00
Kelebek1
e00c1e1c7e fragment47 2025-04-16 10:15:33 +01:00
Kelebek1
efd70d4bc1 fragment41 2025-04-14 19:40:07 +01:00
Kelebek1
710962b429 fragment40 2025-04-07 22:59:53 +01:00
Kelebek1
e60879fa4d 2E460 2025-03-22 17:41:00 +00:00
Kelebek1
75914231a0 18140 2025-03-21 21:24:09 +00:00
Kelebek1
d700d3b0af E890 2025-03-21 21:03:41 +00:00
Kelebek1
eb21a9433c D470 2025-03-21 20:02:14 +00:00
Kelebek1
3ea8ab9a41 5580 2025-03-21 18:26:29 +00:00
Kelebek1
5d6c877b78 1AB70 2025-03-18 15:55:42 +00:00
Maide
11ccc80175
fragment39 (#174)
Some checks failed
C/C++ CI / build (push) Has been cancelled
2025-03-16 19:18:39 +00:00