c64-ready 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -25,6 +25,12 @@ export const FRAME_MS = 20; // one PAL frame
|
|
|
25
25
|
const BOOT_MAX_FRAMES = 300;
|
|
26
26
|
const DRIVE_BOOT_FRAMES = 100; // 2 s for the 1541 to boot after being enabled
|
|
27
27
|
const DEFAULT_TAP_FRAMES = 3;
|
|
28
|
+
// The core draws its `lvllvl` watermark into the frame for the first 40 calls to
|
|
29
|
+
// c64_getPixelBuffer(), then stops for good. The browser player reads the buffer every
|
|
30
|
+
// frame, so the watermark shows only for its first ~0.7 s. The agent reads it only for
|
|
31
|
+
// screenshots, so without this every screenshot would carry it. Reading past the
|
|
32
|
+
// threshold once at start-up makes agent frames match what the player shows.
|
|
33
|
+
export const WATERMARK_FRAME_READS = 40;
|
|
28
34
|
const KBD_BUF_LEN = 0x00c6;
|
|
29
35
|
const KBD_BUF = 0x0277;
|
|
30
36
|
const KBD_BUF_MAX = 10;
|
|
@@ -524,6 +530,7 @@ async function loadWasm(wasmPath) {
|
|
|
524
530
|
await w.instantiate(ab);
|
|
525
531
|
const x = w.exports;
|
|
526
532
|
x.c64_init();
|
|
533
|
+
for (let i = 0; i < WATERMARK_FRAME_READS; i++) x.c64_getPixelBuffer();
|
|
527
534
|
x.sid_setSampleRate(44100);
|
|
528
535
|
x.debugger_set_speed(100);
|
|
529
536
|
x.debugger_play();
|