snes9x singleton

snes9x · games · schema v1

A Super Nintendo emulator turned into a patchable video+audio module. It runs the snes9x2005 (CAT SFC) libretro core compiled to WASM, rendering the SNES screen (locked 256×224/239, 4:3) to the video out and 32 kHz stereo to audio_l/audio_r. The ROM is user-provided and gitignored: if /roms/snes9x/game.sfc isn't autoloaded the card shows a LOAD A ROM dropzone/file-picker (drop or click a .sfc/.smc — it stays local in your browser). Beyond the picture and sound, it reads the live SNES WRAM each frame to emit game-event CV/GATE: for Super Mario World it pulses on kills and deaths, holds a CV for the current world, and turns clock_in into a clock multiplied by (world+level). Drive it by wiring a GAMEPAD module's gate outputs straight into the 12 SNES button inputs (du→up, a→a, …) plus a clock into clock_in. Single-instance per rack (the WASM core is heavy). DOM-only affordances with no patch port: the ROM dropzone/file picker, and a right-click "see output definition for CV/GATES" panel that explains every game-event output for the loaded ROM; the card's OUTPUT FIT toggle sets the fillMode param (letterbox vs fill). Non-SMW ROMs still boot and show video/audio but the game-event outputs stay inert.

A Super Nintendo emulator turned into a patchable video+audio module. It runs the snes9x2005 (CAT SFC) libretro core compiled to WASM, rendering the SNES screen (locked 256×224/239, 4:3) to the video out and 32 kHz stereo to audio_l/audio_r. The ROM is user-provided and gitignored: if /roms/snes9x/game.sfc isn't autoloaded the card shows a LOAD A ROM dropzone/file-picker (drop or click a .sfc/.smc — it stays local in your browser). Beyond the picture and sound, it reads the live SNES WRAM each frame to emit game-event CV/GATE: for Super Mario World it pulses on kills and deaths, holds a CV for the current world, and turns clock_in into a clock multiplied by (world+level). Drive it by wiring a GAMEPAD module's gate outputs straight into the 12 SNES button inputs (du→up, a→a, …) plus a clock into clock_in. Single-instance per rack (the WASM core is heavy). DOM-only affordances with no patch port: the ROM dropzone/file picker, and a right-click "see output definition for CV/GATES" panel that explains every game-event output for the loaded ROM; the card's OUTPUT FIT toggle sets the fillMode param (letterbox vs fill). Non-SMW ROMs still boot and show video/audio but the game-event outputs stay inert.

the faceplate

snes9x · singletonclock_ingateoutvideoaudio_laudioaudio_raudioaudiocvgatepitch
1 inputs · 3 outputs · 2 params

inputs

idcablewhat it does
clock_ingateClock input (gate cable). Each rising edge is treated as a clock pulse that feeds the gate3 multiplier: the period between edges is measured and replayed as (world+level) evenly-spaced sub-pulses on gate3 (×1 passthrough when not in a level).
gate / trigger; modulates cv_clock_in (summed directly (the destination DSP scales it))

outputs

idcablewhat it does
outvideoVideo output: the live SNES screen, letterboxed/pillarboxed into the engine framebuffer (Y-flipped, 4:3). Shows a faint scanline void until a ROM frame is available.
RGB video stream
audio_laudioLeft audio channel of the emulator's 32 kHz stereo output, split off a ChannelSplitter from the PCM worklet. Patch into the audio domain.
audio signal
audio_raudioRight audio channel of the emulator's 32 kHz stereo output (the other split of the PCM worklet). Patch into the audio domain.
audio signal

params

idlabelrangedefaultcurve
cv_clock_inCLOCK0..10linear
fillModeFill0..10discrete

controls

controlwhat it does
Cv aA (0..1, linear). Synthetic gate param backing the a input; its level sets whether the SNES A button is held.
Cv bB (0..1, linear). Synthetic gate param backing the b input; its level sets whether the SNES B button is held.
CLOCKCLOCK (0..1, linear). Synthetic param target of the clock_in gate input; its rising edge drives the gate3 clock multiplier. Set by patching clock_in, not a user knob.
Cv downDOWN (0..1, linear). Synthetic gate param backing the down input; its level sets whether the SNES DOWN button is held.
Cv lL (0..1, linear). Synthetic gate param backing the l input; its level sets whether the SNES L shoulder button is held.
Cv leftLEFT (0..1, linear). Synthetic gate param backing the left input; its level sets whether the SNES LEFT button is held.
Cv rR (0..1, linear). Synthetic gate param backing the r input; its level sets whether the SNES R shoulder button is held.
Cv rightRIGHT (0..1, linear). Synthetic gate param backing the right input; its level sets whether the SNES RIGHT button is held.
Cv selectSELECT (0..1, linear). Synthetic gate param backing the select input; its level sets whether the SNES SELECT button is held.
Cv startSTART (0..1, linear). Synthetic gate param backing the start input; its level sets whether the SNES START button is held.
Cv upUP (0..1, linear). Synthetic gate param backing the up input — its level sets whether the SNES UP button is held. Set by patching the up gate, not a knob.
Cv xX (0..1, linear). Synthetic gate param backing the x input; its level sets whether the SNES X button is held.
Cv yY (0..1, linear). Synthetic gate param backing the y input; its level sets whether the SNES Y button is held.
FillFill (0..1, discrete). Output fit mode: 0 = letterbox/pillarbox (default, aspect-preserving), 1 = fill/cover-crop. Driven by the card's OUTPUT FIT toggle; only matters when the output aspect isn't 4:3.

source

snes9x.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo