b22934fe0d
Browser SD files are persisted in OPFS (web/sdstore.js) and edited in the Files tab. At boot the browser builds a deterministic 64 MiB FAT32 image (web/fat32.js) with nested directories and VFAT long names, then mounts it as a raw block device, bypassing QEMU's broken populated-vvfat WASM coroutine path. Guest writes mutate only the ephemeral image. Exposes a hidden #frame-generation indicator that increments on every e-ink flush, so automation can wait on real display updates instead of fixed sleeps. Adds tests/ with a Makefile runner: 'make test' for JS + FAT32/mtools checks, 'make browser-test' for a headless-Firefox boot of the official CrossPoint 1.4.1 firmware that navigates to Test/example.txt. Bumps third_party/qemu to the SPI-SD/CMD13 fixes and updates README/ROADMAP/ISSUES for the new architecture.
11 lines
470 B
JavaScript
11 lines
470 B
JavaScript
import { mkdir, writeFile } from 'node:fs/promises';
|
|
import { buildFat32Image } from '../web/fat32.js';
|
|
|
|
const encoder = new TextEncoder();
|
|
await mkdir('../_scratch', { recursive: true });
|
|
await writeFile('../_scratch/test-fat32.img', buildFat32Image([
|
|
{ path: 'Test/example.txt', bytes: encoder.encode('hello from OPFS\n') },
|
|
{ path: 'Books/A long book filename.txt', bytes: encoder.encode('chapter one\n') },
|
|
{ path: 'empty.bin', bytes: new Uint8Array() },
|
|
]));
|