Skip to content

PPSSPW · Windowed Reader, OPFS Resume, COOP/COEP & Relay Reference

6 components documented

Verified runtime contracts for BrowserFileLoader (8 MiB LRU), HTTP 206 + SHA-256 game manifests, COOP/COEP preview servers, performance budgets, and the optional PRO/PU1/PT1 Ad Hoc relay.

FILEDedicated Emscripten pthread only (main thread returns 0)Core Runtime Contract

8 MiB Windowed ISO Proxy (BrowserFileLoader)

BrowserFileLoader::ReadAt <-> wasm-page/public/browser-files.js

Mounts zero-byte read-only MEMFS stubs at /browser-games/<name> (POSIX read() throws EIO 29) and proxies native ReadAt calls into 256 KiB slices capped by an 8 MiB LRU cache.

See 8 MiB Window Contract ↗

✅ Supported Capabilities

  • Streams 1.5 GB+ local .iso/.cso/.chd images lazily with MAX_READ_BYTES=1 MiB and READ_CONCURRENCY=4
  • Fails loudly with ErrnoError(29) if legacy MEMFS read() paths execute instead of BrowserFileLoader::ReadAt

⛔ Explicit Limits / Non-Goals

  • ReadAt returns 0 on emscripten_is_main_runtime_thread() to prevent deadlocking async Blob.slice calls
  • Repository ships ZERO PSP ROMs, BIOS images, or manifest URLs; users must load their own legal images

Constants, CLI Flags & Header Gates

BLOCK_BYTES / MAX_READ_BYTESconfig256 KiB / 1 MiBRequired

Slice fetch granularity and single native read upper bound.

CACHE_BYTES / READ_CONCURRENCYconfig8 MiB / 4Required

In-browser hot-block LRU budget and max concurrent Blob slice reads.

Outcomes & Enforcement Rules

pthread ReadAt -> 256 KiB SliceServes requested offset ranges without exhausting 32-bit WASM linear RAM.