Skip to content

Emulator JSSpeccy

Retro Jack edited this page Jun 15, 2026 · 3 revisions

JSSpeccy — ZX Spectrum

JSSpeccy 3.2 (Matt Westcott / gasman) is the ZX Spectrum bundle. The integration was small — JSSpeccy ships a clean JS API with a documented options object, so the wrapper is mostly just calling it correctly.

Where we started

JSSpeccy 3.2 is GPL-3.0. The version 3 series is a from-scratch WebAssembly rewrite of an earlier pure-JS emulator. The runtime takes a config object ({zoom, sandbox, uiEnabled, machine}) and a JSSpeccy() constructor that wires up to a target div.

The launch flow

play.html reads ?game=<key> from the URL, looks it up in games.json, and constructs JSSpeccy with:

const opts = { zoom: 2, sandbox: false, uiEnabled: false, machine: 48 };
const speccy = JSSpeccy(document.getElementById('jsspeccy'), opts);
speccy.openTAPFile(game.rom);

Three of the four options matter:

  • uiEnabled: false — hides JSSpeccy's own toolbar (file picker, machine picker, joystick selector). We're a launcher, not a sandbox.
  • sandbox: false — allows the emulator to make real network requests (loading the tape file from the server). With sandbox: true it would only accept tapes uploaded via the file picker.
  • machine: 48 — boots the Spectrum 48K by default. JSSpeccy supports 48 / 128 / +2 / +2A / +3; if a future entry needs a specific model, the games.json record can carry the field and play.html reads it.

Layout

JSSpeccy renders to its own canvas inside the #jsspeccy div. CSS pins the canvas with a shadow and pixelated rendering:

#jsspeccy { box-shadow: 2px 2px 10px rgba(0, 0, 0, .7); }
#jsspeccy canvas { image-rendering: pixelated; display: block; }

File formats

JSSpeccy handles .tap, .tzx, .sna, .z80. Most of our entries are .tap (raw tape image) since that's what the contemporary preservation archives serve. .tzx is preferred where copy protection is involved — the format preserves loader timing — but JSSpeccy abstracts the difference, so the wrapper code doesn't care.

Bundle layout

systems/jsspeccy/
├── play.html
├── jsspeccy/            ← upstream JS + WASM
├── controls.html
├── games.json
└── games/
    └── *.tap / *.tzx

Related

Clone this wiki locally