Subj : xtrn/zmachine/test/zsound.js xtrn/zmachine/zsound.jsxtrn/zmachine/SYSO To : Git commit to main/sbbs/master From : Rob Swindell (on Debian Linux) Date : Wed Jul 08 2026 01:33:29 https://gitlab.synchro.net/main/sbbs/-/commit/55220bced90a648962a3d9cd Added Files: xtrn/zmachine/test/zsound.js xtrn/zmachine/zsound.js Modified Files: xtrn/zmachine/SYSOP.md games.ini getgames.js jszm.js zmachine.js Log Message: zmachine: play Z-machine sound effects (@sound_effect) The sound_effect opcode (a no-op until now) is decoded and forwarded to a new engine hook, sound(number, effect, volume, repeats), and the door wires that hook to a new tiered player (zsound.js): - digital (SyncTERM w/ audio APCs + libsndfile): the sampled sounds of The Lurking Horror and Sherlock play from the game's Blorb -- each Snd resource is a complete AIFF file, uploaded once per session to the client's persistent cache ("zmachine//s") and re-decoded client-side per play. Samples own one channel, flushed before each queue (the Z-machine plays one sound at a time) and on the stop/finish effects; volume 1..8 maps linearly; repeats 255 loops, finite repeats queue consecutively. The "prepare" effect prefetches the upload. - tone (audio APCs, no libsndfile): the standard high/low bleeps (all the Infocom v6 games, Beyond Zork) play as Synth tones. - BEL (every other terminal): bleeps map to ASCII BEL. The capability probe only ever queries cterm/SyncTERM clients, so other terminals see no APC traffic and no startup stall. Flags2 bit 7 (sound available, v5+) now reflects hook presence. The zero-operand form of sound_effect bleeps, per the Z-Machine Standard's remarks (Beyond Zork issues it). The completion-routine operand is not forwarded -- the door can't know when the terminal finishes playback -- so Sherlock's chained follow-on sounds don't auto-fire (documented in SYSOP.md; SyncTERM's A;Update idle notification is a future path to supporting it). games.ini names the IF Archive sound Blorbs for lurkinghorror/sherlock and getgames.js now fetches a game's Blorb even without a bake step (sounds are read from .blb at play time; no pre-bake needed). test/zsound.js covers the wire protocol per tier via a console stub (including replay, prepare, loop, stop and volume mapping against the real cterm_lib.js) plus the opcode decode itself, driving hand-assembled v3/v5 micro-stories through run(). SYSOP.md documents the tiers and retires the stale "No sound" / "No v6 graphics" limitations. Co-Authored-By: Claude Fable 5 --- þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net .