From a483318f94cf418fbde66ded141e7eb4275bb6d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Pasternak?=
Date: Sun, 26 Jul 2026 19:12:16 +0200
Subject: [PATCH] Make the Timex build playable in the browser
The page said the hi-colour Timex build was not playable here because
JSSpeccy has no Timex video modes. It does now: our fork adds the TC2048
and TC2068, so the dedicated build can run on the page it was written for
instead of only being a download.
Adds a machine switch - Spectrum 128K, Timex TC2048, Timex TC2068 - with
the 128K build as the default, and builds both TAPs in the deploy.
Stops vendoring the emulator. The committed copy under site/jsspeccy was
a stock JSSpeccy build with no Timex support, so it had to be replaced
either way; rather than commit another 440K of build output, the deploy
now downloads a tagged release of dtz-labs/jsspeccy3 and unpacks it. Bump
JSSPECCY_RELEASE in the workflow to move to a newer emulator. The deploy
asserts the Timex ROMs, tape loaders and both TAPs are present before
publishing, so an incomplete site fails the build rather than shipping.
---
.github/workflows/pages.yml | 38 +++++++++-
site/index.html | 67 ++++++++++++++----
site/jsspeccy/jsspeccy-core.wasm | Bin 139142 -> 0 bytes
site/jsspeccy/jsspeccy-worker.js | 1 -
site/jsspeccy/jsspeccy.js | 2 -
site/jsspeccy/jsspeccy.js.LICENSE.txt | 11 ---
site/jsspeccy/roms/128-0.rom | Bin 16384 -> 0 bytes
site/jsspeccy/roms/128-1.rom | Bin 16384 -> 0 bytes
site/jsspeccy/roms/48.rom | Bin 16384 -> 0 bytes
site/jsspeccy/roms/pentagon-0.rom | Bin 16384 -> 0 bytes
site/jsspeccy/roms/trdos.rom | Bin 16384 -> 0 bytes
site/jsspeccy/tapeloaders/tape_128.szx | Bin 1452 -> 0 bytes
site/jsspeccy/tapeloaders/tape_128_usr0.szx | Bin 1309 -> 0 bytes
site/jsspeccy/tapeloaders/tape_48.szx | Bin 696 -> 0 bytes
site/jsspeccy/tapeloaders/tape_pentagon.szx | Bin 1467 -> 0 bytes
.../tapeloaders/tape_pentagon_usr0.szx | Bin 1317 -> 0 bytes
16 files changed, 90 insertions(+), 29 deletions(-)
delete mode 100644 site/jsspeccy/jsspeccy-core.wasm
delete mode 100644 site/jsspeccy/jsspeccy-worker.js
delete mode 100644 site/jsspeccy/jsspeccy.js
delete mode 100644 site/jsspeccy/jsspeccy.js.LICENSE.txt
delete mode 100755 site/jsspeccy/roms/128-0.rom
delete mode 100755 site/jsspeccy/roms/128-1.rom
delete mode 100755 site/jsspeccy/roms/48.rom
delete mode 100755 site/jsspeccy/roms/pentagon-0.rom
delete mode 100755 site/jsspeccy/roms/trdos.rom
delete mode 100755 site/jsspeccy/tapeloaders/tape_128.szx
delete mode 100755 site/jsspeccy/tapeloaders/tape_128_usr0.szx
delete mode 100755 site/jsspeccy/tapeloaders/tape_48.szx
delete mode 100755 site/jsspeccy/tapeloaders/tape_pentagon.szx
delete mode 100755 site/jsspeccy/tapeloaders/tape_pentagon_usr0.szx
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index 7efad8f..015ebff 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -15,6 +15,10 @@ concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
+env:
+ # bump to move to a newer emulator build
+ JSSPECCY_RELEASE: v3.2.0-timex.1
+
jobs:
deploy:
name: deploy browser player
@@ -25,15 +29,45 @@ jobs:
steps:
- uses: actions/checkout@v5
- - name: Build the standard TAP
- run: make standard
+ - name: Build both TAPs
+ run: make standard timex
+
+ # The emulator is no longer vendored in this repository. JSSpeccy 3 has
+ # no Timex machines, so the hi-colour build had nowhere to run in a
+ # browser; this pulls a tagged build of the fork that adds them.
+ - name: Fetch the emulator build
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ set -eu
+ mkdir -p _emulator
+ gh release download "$JSSPECCY_RELEASE" \
+ --repo dtz-labs/jsspeccy3 \
+ --pattern jsspeccy-dist.zip \
+ --output _emulator/jsspeccy-dist.zip
+ unzip -q _emulator/jsspeccy-dist.zip -d _emulator/dist
- name: Assemble the site
run: |
set -eu
mkdir -p _site
cp -R site/. _site/
+ cp -R _emulator/dist/jsspeccy _site/jsspeccy
cp build/attribute-raid.tap _site/attribute-raid.tap
+ cp build/attribute-raid-timex.tap _site/attribute-raid-timex.tap
+
+ - name: Check the pieces the page needs are all there
+ run: |
+ set -eu
+ test -f _site/index.html
+ test -f _site/attribute-raid.tap
+ test -f _site/attribute-raid-timex.tap
+ test -f _site/jsspeccy/jsspeccy.js
+ test -f _site/jsspeccy/jsspeccy-core.wasm
+ test -f _site/jsspeccy/roms/tc2048.rom
+ test -f _site/jsspeccy/roms/2068-home.rom
+ test -f _site/jsspeccy/tapeloaders/tape_2048.szx
+ test -f _site/jsspeccy/tapeloaders/tape_2068.szx
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v4
diff --git a/site/index.html b/site/index.html
index 1cd2202..ad31b1e 100644
--- a/site/index.html
+++ b/site/index.html
@@ -22,6 +22,27 @@
justify-content: center;
}
.keys { color: #55ff55; }
+ .switch {
+ display: flex;
+ gap: 0.6rem;
+ justify-content: center;
+ flex-wrap: wrap;
+ margin: 1.1rem auto 0;
+ }
+ .switch a {
+ display: inline-block;
+ padding: 0.45rem 1rem;
+ border: 2px solid #55ffff;
+ color: #55ffff;
+ text-decoration: none;
+ letter-spacing: 0.05em;
+ }
+ .switch a[aria-current="true"] {
+ background: #55ffff;
+ color: #101010;
+ font-weight: bold;
+ }
+ .switch a:hover { background: #55ffff; color: #101010; }
.sound-hint { color: #ffff55; }
.sponsor {
display: inline-block;
@@ -43,7 +64,7 @@
ATTRIBUTE RAID
A River Raid-style game for the ZX Spectrum. This page always runs the
latest TAP built from main
-on an emulated Spectrum 128K, so the AY sound effects ported from the
+on an emulated Spectrum 128K or Timex, so the AY sound effects ported from the
Atari 2600 original are audible.
Press the ▶ button on the display to start — the
game boots with AY sound (browsers only allow audio after that click).
@@ -51,23 +72,43 @@ ATTRIBUTE RAID
SPACE — fire R — new game
+
-The dedicated Timex TC2048/TC2068/TS2068 hi-colour build is not playable
-here (JSSpeccy has no Timex video modes) — grab it from the
+
The Timex builds are the dedicated hi-colour version, playable here now —
+the emulator below is our fork of
+JSSpeccy 3, which adds the TC2048 and TC2068. Both TAPs are also in the
releases.
+JSSpeccy 3 (GPL-3), in the
+dtz-labs fork with Timex support.