Complete the overworld foundation
Checks / web (push) Canceled after 0s

Port forced movement (turn delays, bumps, ice, currents, pits), dynamic
return warps, elevators, Surf, Cut, Strength and cycling rules, working
map blocks with changeblock/changemapblocks, and the remaining NPC
movement types and movement commands.

Add tileset animation from the ROM's command tables, grass sprite
priority and special map palettes; room decorations with ownership, the
bedroom PC and save migration; and Key Items access to the Bicycle.

Fourteen original-engine traces compare positions, facing, actors, event
flags and scripted poses. Tile animation matches original VRAM for four
tilesets, and LoadMapPals matches 192 palette cases. skyfall_top now
keeps the $60 sprite offset its step function leaves behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sébastien QUEROLandClaude Opus 5.5 committed 2026-09-25 16:47:29 +02:00
1 parent 9ac111f262
commit 451464f7c6
38 files changed
+5600 -490

No files matched your search

+18
View File
@@ -262,6 +262,24 @@ export class BinjgbEmulator implements Emulator {
this.canvas!.putImageData(this.frame!, 0, 0);
}
/** Development-only: run a bounded number of CPU cycles, to align frame
* sampling with a scanline when comparing against native routines. */
advanceCycles(cycles: number) {
if (
!this.handle ||
this.raf ||
!Number.isInteger(cycles) ||
cycles < 1 ||
cycles > 70224
)
throw new Error("Pause the reference before bounded cycle stepping.");
const module = this.module!;
const target = module._emulator_get_ticks_f64(this.handle) + cycles;
for (let events = 0; events < 100; events++)
if (module._emulator_run_until_f64(this.handle, target) & 4) return;
throw new Error("Reference cycle budget exceeded.");
}
private fileData(
kind: "state" | "ext_ram",
action: (pointer: number, bytes: Uint8Array) => void,