Read the English 1.0 and Australian cartridges besides 1.1 (#84)
PRET's crystal and crystal_au builds reproduce both retail cartridges, and every label the profile pins keeps its address in all three; check:reference now verifies that when the rebuilds are present. The revision comes from the header. Revision 1.0's Battle Tower draws only the first 21 trainers and picks its texts' gender from the name's sixth character, checked against each cartridge. A native backup imports across the three, which share every map, event and object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
acdaf62eaa
commit
3c480a28f0
17 files changed
+317
-26
No files matched your search
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
|
||||
import "fake-indexeddb/auto";
|
||||
import { SlotSession, type SlotRuntime } from "../src/app/slot-session";
|
||||
import { encodeSave, type SaveRecord } from "../src/storage/saves";
|
||||
import { CRYSTAL_ROMS } from "../src/rom/validate";
|
||||
import {
|
||||
SlotRepository,
|
||||
recordChecksum,
|
||||
@@ -411,6 +412,22 @@ describe("save slot import", () => {
|
||||
expect(runtime.game.steps).toBe(2);
|
||||
});
|
||||
|
||||
it("carries a backup over from another supported English cartridge", async () => {
|
||||
const [us11, us10] = CRYSTAL_ROMS;
|
||||
const context = setup();
|
||||
await context.session.load({ ...ROM, sha1: us11.sha1, name: us11.name }, canvas);
|
||||
const backup = record({ player: "KRIS", id: 5, steps: 3 });
|
||||
const preview = await context.session.previewImport(encodeSave({ ...backup, romHash: us10.sha1 }));
|
||||
if (!preview.ok) throw new Error(preview.reason);
|
||||
expect(preview.madeWith).toBe(us10.name);
|
||||
expect(preview.record.romHash).toBe(us11.sha1);
|
||||
const added = await context.session.importBackup(preview, "new");
|
||||
expect(added.romHash).toBe(us11.sha1);
|
||||
// The same file under its own cartridge has nothing to carry over.
|
||||
const own = await context.session.previewImport(encodeSave({ ...backup, romHash: us11.sha1 }));
|
||||
expect(own.ok && own.madeWith).toBeUndefined();
|
||||
});
|
||||
|
||||
it("previews conflicts and imports as a new slot or over one", async () => {
|
||||
const { store, runtime, session } = await loaded();
|
||||
const first = session.active!;
|
||||
|
||||
Reference in new issue
Block a user