Map the French, German, Italian and Spanish releases' addresses (#84)
Checks / web (push) Failing after 18s
Private ROM checks / private-rom (push) Failing after 25m51s

PRET builds none of these releases, so scripts/map-revision.mjs derives
where each keeps the profile's labels from the 1.1 build: a bank-by-bank
alignment, then the exact references RGBDS recorded while linking 1.1,
read at the matching place in the release, each result checked against
its bytes. All but 1-3 labels per release are found; the rest, in code the
release changed, are -1 so reading them refuses. check:reference verifies
the generated file when the ROMs are present.

CrystalAssets now points the profile at the cartridge's addresses, and
the releases' characters (from their own fonts) and two European text
codes decode. The introduction and Mom's scene play in each language and
every map sweeps as in English, but the releases stay refused until the
logic they localize (units, word order, layouts) is ported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kawaandClaude Opus 5.5 committed 2026-10-17 17:45:34 +02:00
1 parent 3c480a28f0
commit 627f87d8b5
17 files changed
+1202 -190

No files matched your search

+2 -1
View File
@@ -16,7 +16,7 @@ make -C .reference/pokecrystal crystal crystal_au -j4
npm run check:reference
```
Install RGBDS 1.0.3 separately for local checks. `CRYSTAL_ROM_PATH` optionally selects another local location; checks otherwise use `Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc` at the root. The private CI workflow downloads the user's ROM from the `CRYSTAL_ROM_URL` repository secret, verifies its size and SHA-1, and builds this reference with the pinned RGBDS 1.0.3 source. It runs only for `main`, never pull requests.
Install RGBDS 1.0.3 separately for local checks. With the French, German, Italian and Spanish ROMs at the root (`Pokemon - Version Cristal (France).gbc`, `Pokemon - Kristall-Edition (Germany).gbc`, `Pokemon - Versione Cristallo (Italy).gbc`, `Pokemon - Edicion Cristal (Spain).gbc`), `node scripts/map-revision.mjs` regenerates `src/game/rom/revision-addresses.ts` from the 1.1 build (its objects and map file) and `check:reference` verifies it. `CRYSTAL_ROM_PATH` optionally selects another local location; checks otherwise use `Pokemon - Crystal Version (UE) (V1.1) [C][!].gbc` at the root. The private CI workflow downloads the user's ROM from the `CRYSTAL_ROM_URL` repository secret, verifies its size and SHA-1, and builds this reference with the pinned RGBDS 1.0.3 source. It runs only for `main`, never pull requests.
The reference checkout, rebuilt ROM, extracted graphics, saves and gameplay screenshots must stay in local or private CI workspaces and remain ignored. Private CI deletes them and does not upload artifacts or cache game data. The shipping profile contains addresses and format constants, not game content.
@@ -66,6 +66,7 @@ These paths refer to the pinned [PRET source](https://github.com/pret/pokecrysta
| `game/party/hall-of-fame.ts`, `game/scripts/hall-of-fame.ts`, `game/scripts/pc.ts` | `engine/events/halloffame.asm` (`GetHallOfFameParty`, `_HallOfFamePC`, `LoadHOFTeam`, `DisplayHOFMon`), `engine/menus/save.asm` (`AddHallOfFameEntry`), `engine/events/pokecenter_pc.asm` (`.ChooseWhichPCListToUse`, `HallOfFamePC`) | Up to 30 recorded teams, newest first, with the capped win count; saved and migrated by absence, separate from the League flag. Nothing records a team until the League is ported. The PC lists HALL OF FAME from the count; pages browse with A, Start and B as the original does, and keep its unreachable "HOF Master!" title. A cartridge comparison of 255 teams checks the tilemap, attributes, graphics and palette; the frontpic animation (`HOF_AnimateFrontpic`) is not presented. |
| `game/scripts/league.ts`, the League, the Hall of Fame and the credits | `engine/events/halloffame.asm` (`HallOfFame`, `RedCredits`, `AnimateHallOfFame`, `AnimateHOFMonEntrance`, `HOF_SlideBackpic`, `HOF_SlideFrontpic`, `HOF_AnimatePlayerPic`), `engine/movie/credits.asm` (`Credits`, `ParseCredits`, `Credits_LoadBorderGFX`, `Credits_LYOverride`, `ConstructCreditsTilemap`, `GetCreditsPalette`), `engine/movie/init_hof_credits.asm`, `engine/events/prof_oaks_pc.asm` (`ProfOaksPCBoot`, `ProfOaksPCRating`, `Rate`, `FindOakRating`), `engine/gfx/player_gfx.asm` (`GetPlayerBackpic`, `HOF_LoadTrainerFrontpic`), `home/vblank.asm` (`VBlank_Credits`), `engine/overworld/scripting.asm` (`Script_halloffame`, `Script_credits`, `Script_wait`), `home/text.asm` (`PlaceEnemysName`) | The ceremony records the team and win, pauses the play time and shows each Pokémon's slides and page, the player's card and Oak's rating; the credits run frame by frame (text by thirds, banner tiles by halves, palette VBlanks, border scroll), with each command group's measured spill frames; after the Hall of Fame the world continues at New Bark as Continue would, after Red at Mt. Silver. Checked against the cartridge by `tests/reference-credits.spec.ts` and `tests/reference-hall-of-fame-ceremony.spec.ts`. |
| `rom/validate.ts`, `game/rom/revision.ts` | `Makefile` (`crystal`, `crystal11`, `crystal_au`: rgbfix's game code and version), `engine/events/battle_tower/load_trainer.asm` and `trainer_text.asm` (their `_CRYSTAL11` conditionals) | The three English cartridges by SHA-1, and their revision from the header. Revision 1.0 draws Battle Tower trainers from the first 21 and picks their texts' gender from the name's sixth character; the profile's addresses hold for all three (`check:reference`). |
| `game/rom/revision-addresses.ts` (generated by `scripts/map-revision.mjs`), `game/rom/charset.ts` | `pokecrystal11.o` patches and `.map` (RGBDS object format, rgbds(5)), `home/text.asm` (`PlaceNextChar`'s European $1d and $1e), `gfx/font/font.1bpp` in each release | The French, German, Italian and Spanish releases' addresses for every profile label, derived from 1.1 and checked against each release's bytes; their characters and text codes. `useRevision` switches the profile and characters for the cartridge `CrystalAssets` reads. The releases are recognized but not yet accepted (board #84). |
| `game/scripts/kanto.ts` | `engine/events/specials.asm` (`SnorlaxAwake`, `TrainerHouse`), `engine/events/haircut.asm` (`BillsGrandfather`), `engine/events/diploma.asm` (`PlaceDiplomaOnScreen`, `Diploma`, `PrintDiploma`), `engine/gfx/cgb_layouts.asm` (`_CGB_Diploma`) | Snorlax wakes to the Poké Flute channel (wMapMusic) from `.ProximityCoords`; the Trainer House always fights CAL, as without a Mystery Gift partner; Bill's grandpa reads the party Pokémon shown. The Diploma is drawn from DiplomaGFX and its tilemap with the player's name in `PalPacket_Diploma`'s palette; printing it finds no printer. Checked by `tests/reference-kanto.spec.ts`. |
| `game/scripts/magnet-train.ts` | `engine/events/magnet_train.asm` (`MagnetTrain`, `MagnetTrain_Jumptable`, `MagnetTrain_UpdateLYOverrides`, `MagnetTrain_LoadGFX_PlayMusic`, `DrawMagnetTrain`, `MagnetTrainBGTiles`, `MagnetTrainTilemap`), `engine/overworld/scripting.asm` (`Script_newloadmap`'s `MAPSETUP_TRAIN`) | The ride frame by frame both ways: the player's sprite (Chris or Kris) running its animation with the last frame flipped, the bushes' and train's row scrolls, the station's palettes with an extra palette frame and eight frames of teardown. Checked against the cartridge by `tests/reference-magnet-train.spec.ts`. |
| `game/scripts/tin-tower.ts`, Tin Tower and Whirl Islands | `engine/pokemon/search_owned.asm` (`BeastsCheck`, `MonCheck`, `CheckOwnMonAnywhere`, `CheckOwnMon`) | `CheckOwnMonAnywhere` returns nothing with an empty party, then reads the party structs' species (an Egg counts as its species), `sBox` and the thirteen other `sBoxN` copies, matching the player's ID and the OT's first five letters (`NAME_LENGTH_JAPANESE - 2` compares, stopping early at a shared terminator); the Day-Care is not searched, preserving the original's explicitly documented bug even now that deposits run. The original searches the current `sBox` and skips its numbered `sBoxN` copy; the port searches each logical box once. The sages, Suicune, Ho-Oh and Lugia run on ported primitives (`BATTLETYPE_SUICUNE`, `BATTLETYPE_FORCEITEM`). `tests/tin-tower.test.ts` and two playthrough stages cover them. |