From 8f3d5a4870541acdbd7e15e8e592cf43fe9450d3 Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Tue, 29 Sep 2026 15:34:52 +0200 Subject: [PATCH] vscode: remove .z extension, tweaks --- extension/CHANGELOG.md | 8 ++++++-- extension/notes/PLAN.md | 10 ++++++++-- extension/package.json | 1 - extension/scripts/assetpack.ts | 9 ++++----- extension/scripts/presetindex.ts | 5 ++++- extension/src/syntaxgen.ts | 2 +- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/extension/CHANGELOG.md b/extension/CHANGELOG.md index b18f83c9..b4a5918b 100644 --- a/extension/CHANGELOG.md +++ b/extension/CHANGELOG.md @@ -13,8 +13,12 @@ First preview. - Toolchains download on first use, checked against built-in hashes. - Compiler and emulator crashes send an error report to 8bitworkshop.com, following VS Code's `telemetry.telemetryLevel` setting. See the README. -- The Atari 2600 now stops at breakpoints and steps by instruction, not by - frame, and can step back. +- Debugging with F5: breakpoints on lines, functions and + conditions; step, step over, step out, step back and reverse continue; + a timeline to scrub through the recording while paused. +- Debug views: registers, the machine's internal state (the IDE's Debug + Tree), symbols, a call stack walked from return addresses, and + disassembly. Memory opens in VS Code's Hex Editor. - `.s`, `.asm`, `.inc` and `.a` files in a project get the highlighting for the platform's CPU. `.acme` files get 6502 highlighting. - An `8bws` command in the integrated terminal builds and runs programs diff --git a/extension/notes/PLAN.md b/extension/notes/PLAN.md index a53e5622..303051b1 100644 --- a/extension/notes/PLAN.md +++ b/extension/notes/PLAN.md @@ -258,7 +258,7 @@ is; a `.c` file anywhere else sees nothing from us. **Rule 2: claim a language ID only where nobody else does.** - *Extensions only 8bitworkshop uses* (`.dasm`, `.ca65`, `.acme`, `.xa`, - `.nesasm`, `.z`, `.xasm`, `.lwasm`, `.vasm`, `.wiz`, `.ecs`, `.bb`, + `.nesasm`, `.zmac`, `.xasm`, `.lwasm`, `.vasm`, `.wiz`, `.ecs`, `.bb`, `.cc2600`, `.cc7800`, ...): list them in `contributes.languages[].extensions`, generated from `toolmeta.ts`. Before each release, check the Marketplace for collisions. @@ -1453,6 +1453,12 @@ vicdual, williams, zx. Since then (2026-09-26), vcs and arm32 work too. These do | `vector-*` | no frames | Vector video isn't forwarded; the webview needs line drawing (`VectorVideo.drawLine` ops). | | `kim1` | no frames | LED display, no raster video; needs its own view. | +**TODO: hidden until they run** (2026-09-29). `vector-z80color`, +`vector-ataricolor` (no frames) and `williams-z80` (`Worker is not +defined`) are in `SKIP_PLATFORMS` in `scripts/presetindex.ts`, so New +Project and Open Example don't offer them. Take each out of that list once +the survey shows it producing frames. + Also: - **Start timeout.** A platform whose `start()` never settles leaves the panel blank with no error (the CLI already reports "never finished @@ -2379,7 +2385,7 @@ do them when a platform is the priority (VCS needs 3–4). share; `scripts/syntaxes.ts` writes `out/syntaxes/`. `test/syntaxes.test.ts` tokenizes with `vscode-textmate` and checks `package.json` against `makeContributions()`. Only extensions no one else uses are claimed - (`.dasm .ca65 .xa .nesasm .z .zmac .sgb .xasm .lwasm`); `.s .asm .inc .a` + (`.dasm .ca65 .xa .nesasm .zmac .sgb .xasm .lwasm`); `.s .asm .inc .a` wait for per-project language assignment (Rule 2). - Decided: no C grammar of our own. C goes to clangd/cpptools with our headers, defines and shims (`cheaders.ts`, §4 "C: feed clangd and diff --git a/extension/package.json b/extension/package.json index e4b4054b..28a974b5 100644 --- a/extension/package.json +++ b/extension/package.json @@ -386,7 +386,6 @@ "Z80" ], "extensions": [ - ".z", ".zmac", ".sgb" ], diff --git a/extension/scripts/assetpack.ts b/extension/scripts/assetpack.ts index c4b6bf22..7c303c68 100644 --- a/extension/scripts/assetpack.ts +++ b/extension/scripts/assetpack.ts @@ -6,12 +6,11 @@ // // writes /8bitworkshop---.tar.br and // out/assets.json. Upload the packs to the asset server (ASSET_URLS in -// extension.ts). --quality trades size for speed: 11 (the default, for -// releases) takes minutes; 5 takes seconds. +// extension.ts). --quality trades size for speed: 11 (the default) +// takes minutes; 8 is nearly as small and much faster. // -// `npm run package` packs a quick (quality 5) bundle so dev installs work; -// the release scripts (`npm run package:release`, `npm run vsce-publish`, -// `npm run ovsx-publish`) pack at full quality first. `vscode:prepublish` +// `npm run package` packs at quality 8, which we ship; `npm run +// package:release`, `vsce-publish` and `ovsx-publish` pack at 11. `vscode:prepublish` // only builds, so vsce never repacks the assets on its own. import * as fs from 'fs'; diff --git a/extension/scripts/presetindex.ts b/extension/scripts/presetindex.ts index d74e68c1..8ed947a3 100644 --- a/extension/scripts/presetindex.ts +++ b/extension/scripts/presetindex.ts @@ -21,7 +21,10 @@ import type { PresetIndex, TemplateInfo } from '../src/presettypes'; // families from the IDE's platform menu that the extension can't run const SKIP_FAMILIES = ['MAME/Other', 'Interpreters']; // platforms we never offer in the extension, even if the menu lists them -const SKIP_PLATFORMS = ['x86', 'vectrex', 'exidy', 'arm32']; +// TODO: vector-* need vector video in the webview, williams-z80 a headless +// sound Worker (notes/PLAN.md, "platforms that don't run in the extension") +const SKIP_PLATFORMS = ['x86', 'vectrex', 'exidy', 'arm32', + 'vector-z80color', 'vector-ataricolor', 'williams-z80']; const rootDir = path.resolve(process.argv[2] || path.join(__dirname, '../..')); const outFile = path.resolve(process.argv[3] || path.join(__dirname, 'presets.json')); diff --git a/extension/src/syntaxgen.ts b/extension/src/syntaxgen.ts index baf02c80..9a21a272 100644 --- a/extension/src/syntaxgen.ts +++ b/extension/src/syntaxgen.ts @@ -49,7 +49,7 @@ export const ASM_LANGUAGES: AsmLanguage[] = [ { id: '8bws-z80', cpu: 'z80', aliases: ['Z80 Assembly', 'Z80'], - extensions: ['.z', '.zmac', '.sgb'], + extensions: ['.zmac', '.sgb'], opcodes: uniq([...K.opcodesZ80, ...K.opcodesGBZ80]), registers: K.registersZ80, conditions: K.conditionsZ80,