Map the French, German, Italian and Spanish releases' addresses (#84)
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:
1 parent
3c480a28f0
commit
627f87d8b5
17 files changed
+1202
-190
No files matched your search
@@ -21,6 +21,16 @@ export const CRYSTAL_ROM = {
|
||||
size: 2 * 1024 * 1024,
|
||||
} as const;
|
||||
|
||||
/** The French, German, Italian and Spanish releases: their addresses and
|
||||
* characters are known (game/rom/revision.ts), but parts of their own
|
||||
* logic (units, word order, layouts) are not ported yet (board #84). */
|
||||
export const RELEASES_IN_PROGRESS = [
|
||||
{ name: "Pokémon Crystal · French", sha1: "c055992b16b7399c687647725cdd1f4f13a2f75c" },
|
||||
{ name: "Pokémon Crystal · German", sha1: "accb584293ba056152f1fd908439b019017ff2fe" },
|
||||
{ name: "Pokémon Crystal · Italian", sha1: "6cee05e5b95beeae74b8365ad18ec4a07a8c4af8" },
|
||||
{ name: "Pokémon Crystal · Spanish", sha1: "889a06fc0bb863666865aa69def0adf97945ac2a" },
|
||||
] as const;
|
||||
|
||||
/** The supported cartridge with this SHA-1, if any. */
|
||||
export const supportedRom = (sha1: unknown) =>
|
||||
CRYSTAL_ROMS.find((rom) => rom.sha1 === sha1);
|
||||
@@ -48,6 +58,11 @@ export async function validateRom(file: File): Promise<ValidatedRom> {
|
||||
byte.toString(16).padStart(2, "0"),
|
||||
).join("");
|
||||
const rom = supportedRom(sha1);
|
||||
const later = RELEASES_IN_PROGRESS.find((release) => release.sha1 === sha1);
|
||||
if (later)
|
||||
throw new Error(
|
||||
`This is the ${later.name.replace("Pokémon Crystal · ", "")} release of Pokémon Crystal. It is recognized, but parts of its own logic are not ported yet; for now, use an English cartridge.`,
|
||||
);
|
||||
if (!rom) {
|
||||
throw new Error(
|
||||
"This ROM is not a supported English Pokémon Crystal: US/Europe revision 1.0 or 1.1, or the Australian release. Other languages and modified ROMs are not supported yet.",
|
||||
|
||||
Reference in new issue
Block a user