FM-1 · SID

M-VAVE FM-1 · pi32v2 @ 240 MHz · 6502 · reSID 0.16

Commodore 64 music,
on a pocket FM synth.

Runs an emulated 6510 + SID in the emulated FM-1 on a WASM virtual machine.

Every tune runs its own 6502 code, and reSID makes the sound: all of it on the FM-1’s CPU, in a firmware written for it. Here the whole synth is emulated in your browser. Press Power, then pick a tune from the 61,000 in the High Voltage SID Collection, or switch to the synth and play its SID instruments from the keys or a MIDI keyboard, through a stereo chorus, delay and reverb.

Now playingInstrument

0:00 / –:––

Play the FM-1’s keys, your computer’s A W S E D … ; ' (C4–F5), or a MIDI keyboard.

BPM120
Octave+0
Cutoff±0
Resonance±0
Attack±0
Release±0
song 1 / 1
over USB, from Chrome or Edge

    Write your own chiptune

    FM-1 SID has GoatTracker 2’s editor built in: the tracker C64 musicians use, on the FM-1’s knobs and keys, while the song plays. The keys C4–D#5 type the hex digits 0–F. Here is a whole first song in about 15 minutes, a pulsing bass, arpeggio chords and drums made of noise, played key by key on the emulated FM-1 before it was written down. The full guide, step by step.

    1. SEQ in the player opens the editor; SEQ four more times to SONG, SCL twice: a new, empty song.
    2. SEQ to INSTRUMENT, REC on, and type the six instruments (KNOB1 picks the instrument, PRESETS moves the cursor).
    3. SEQ to TABLES and type the sounds: wave rows from 01, the pulse sweep, the vibrato.
    4. SEQ twice to PATTERNS: the bass on channel 1 with the tempo command F06, the chords on 2, the drums on 3.
    5. PLAY loops it, SAVE keeps it in flash, HOME: it is in the player’s list.

    Instruments

    01 Bass08 48 01 01
    02 Lead09 A8 01 01 00 01 08 vibrato
    03 Chords09 A8 04 01
    04 Kick00 88 09 00
    05 Snare00 9A 0E 00
    06 Hat00 56 13 00

    Attack/decay, sustain/release, where the sound starts in the wave and pulse tables.

    Wave table

    01 pulse41 00 · 0F 80 · FF 02
    04 chord41 00 · 41 03 · 41 07 · 41 0C · FF 04
    09 kick81 A8 · 11 9F · 11 9A · 11 96 · FF 00
    0E snare81 BE · 81 BA · 81 B6 · 81 B2 · FF 00
    13 hat81 D4 · 81 D0 · FF 00

    A waveform and a note per frame: 41 pulse, 11 triangle, 81 noise; FF jumps. The chord is a minor arpeggio, so fast it sounds like one.

    Pulse, speed, notes

    Pulse 0187 40 · 30 08 · 30 F8 · FF 02
    Speed 0108 18 the lead’s vibrato
    BassA-2 A-3 A-2 A-3 D-3 D-4 D-3 D-4, every other row
    ChordsA-3 on row 00, D-3 on 08: A minor, D minor
    Drumskick 00, hat 04, snare 08, hat 0C

    The pulse sweep is the classic C64 “PWM” bass. Then: a melody with the lead, more bars on ORDERS, the filter.

    The editor is the same on the emulated FM-1 above (press Power, pick a GoatTracker song, 0 for SEQ) and on a real one. The songs in the playlist, from GoatTracker 2’s examples, open in the editor too: see how their tables make their sounds. GoatTracker 2 on a computer, or sid-tracker in the browser, writes the same .sng files; drop them on Your files to play them here.

    How it works

    Seven layers, from your speakers down to a 1982 sound chip. The page only builds the firmware image and moves keys; everything below the first layer is the FM-1’s own CPU at work.

    1. Your browserAudioWorkletAsks for 128 frames at a time. The emulator runs until the FM-1’s I2S DMA has produced them, so the sound card is the clock.
    2. fm1-coreRust → WebAssemblyThe JieLi AC791N’s pi32v2 CPU with its interrupts, timers, I2S, the SPI screen and the key matrix, worked out from the stock firmware. Idle time is skipped, not emulated.
    3. The firmwareC · fm1-dock + FM-1 SIDFM-1 SID runs as the one synth of fm1-dock, which keeps USB, the installers and the rescue. The tunes ride after it in flash as a tune pack, which this page builds from your playlist and boots.
    4. A 6510an instruction at a timeEach tune’s own init and play routines, every memory access at its exact cycle, in 64 KB of C64 memory with the I/O banking, the CIA timer and the raster line.
    5. SID writescycle-stampedThe main loop runs the tune up to three frames ahead and queues every register write with the C64 cycle it happened on.
    6. reSID 0.16Dag LemClocked to each write’s cycle inside the audio interrupt, with measured 6581 and 8580 waveforms and filters. Or fm1-sid’s own integer model, at about 70 % of the cost.
    7. Effectsafter Felucca’sA stereo chorus, a delay on the tempo and a room reverb after the chip, in the same interrupt: the mono SID gets width. The synth starts with a little of each; the player stays dry until you turn them up.
    9.5 %of the 240 MHz core goes to the audio interrupt with reSID, 14 % with the effects
    0.984correlation with reSID on a PC, fed the same register stream
    260 KBof firmware: fm1-dock, the player, the GoatTracker editor, the synth, two SID engines and the effects
    61,157tunes in HVSC, one search away

    The numbers come from the emulator, which counts instructions, not cycles. This firmware is installed and playing on a real FM-1, with the installers reaching it over USB as it plays (the heaviest audio block at 34 % of its time, no overruns). The status line under the synth shows how fast your machine runs it.

    Controls

    The firmware reads the FM-1’s own controls; the buttons above press them for you.

    On the FM-1

    HOME: tune player or SID synth. Player: PRESETS / SELECT, OCT− / OCT+: tune; PLAY: pause. Synth: the keys play; PRESETS / SELECT: instrument; OCT±: octave; KNOB1–4: cutoff, resonance, attack, release. Sequencer: SEQ page, PLAY run / stop, REC record, SCL ENV LFO track 1 2 3, ALGORITHM tempo, GLO clear step, ARP clear track. Both: EDIT: reSID or the own model; FX: the effects page, where KNOB1 is the chorus, KNOB2 the delay, KNOB3 its time (1/16 to 1/4 of the tempo), KNOB4 the reverb, SELECT the delay’s feedback and PRESETS 6581 or 8580; FX again goes back. The synth starts with a little of each, the player dry.

    Keyboard

    A W S … ': the note keys · ↑ ↓ ← → or N P: tune or instrument · 7: HOME · Space: PLAY · 0: SEQ · R: REC · 2 3 4: tracks · , .: tempo · 5: EDIT · 1: FX · Z X: OCT− / OCT+

    fm1-dock

    HOME held 1.5 s: fm1-dock’s list (FM-1 SID and the sine). OCT− held while switching on: the USB rescue, only the updater running. Play on my FM-1 sends the tune playing here to FM-1 SID on your FM-1 over USB (Chrome, Edge): into its memory and played at once, nothing written to flash, gone at the next tune.

    Links

    The address bar follows the tune: copy it to send someone straight to it. ?t= takes any HVSC path, ?mode=synth starts on the synth.

    On a real FM-1: Install FM-1 SID on my FM-1 at the top of the page writes the latest release over USB (Chrome, Edge). sidplayer.fwsc is this page's firmware as an update package: fm1-dock with FM-1 SID as its synth, starting in the player with GoatTracker 2’s example songs, Dojo first (no HVSC tunes). It installs the way the community firmwares do, and the installers reach it while it runs (fm1-dock’s USB), so going back to any other firmware is an ordinary install; OCT− held while switching on is the USB rescue. Install it at your own risk. For a package with your own .sid tunes and .sng songs: dock/build_solo.sh in the repository. The package carries three files of JieLi’s SDK under the Apache-2.0 licence.