Commodore 64

aliases C64, C-64, Commodore 64
sources SID-Wizard 1.8 User Manual (summary) · Creating Chiptunes with SID-Wizard, Second Edition (summary) · Newman — Driving the SID chip: Assembly Language, Composition, and Sound Design for the C64 (2017) · C64 Programmer's Reference Guide, ch. 4 — Programming Sound and Music on Your Commodore 64 (1982) · MOS 6581 Sound Interface Device (SID) datasheet — the text behind Appendix O · chipmusic.org — C64 Music for Dummies (ant1's SID-Wizard 1.0 tutorial, 2012) · HVSC — SID file format description (PSID v1–v4, RSID) · commodore-64.eu — The C64 SID Chip (6581 vs 8580 overview) · Lemon64: How does one learn SID sound design these days? (2020) · Asger Alstrup — Examination of SID triangle waveform / noise waveform (The SID Homepage, 1995) · uCApps MIDIbox SID — Wavetable Sounds Tutorial #1 (Thorsten Klose) · The SID Homepage — The creation of the SID chip (Christer Rindeblad) · The SID Homepage — Interview with Bob Yannes (Andreas Varga, August 1996) · The SID Homepage — Interviews with Rob Hubbard (Commodore Zone, Happy Computer 7/86) · The SID Homepage — Interviews with Martin Galway (Commodore Zone 6–7, Happy Computer 11/86) · TW #54 — Interview with Quantam Porcupine · SIDin #3 — Stephan Schmid (Steppe) interview (Stefano Tognon, 2003) · SIDin #8 — Catweasel Mk4: a PCI card with two SID sockets (Stefano Tognon, 2005) · SIDin #9 — Catweasel Mk4 follow-up: driver, hardware buffer, two 6581s and the filter (Stefano Tognon, 2006) · SIDin #9 — Nata (Stephan Parth) interview (Stefano Tognon, 2006) · SIDin #1–15 — Editorials and News digest (Stefano Tognon, 2002–2015) · defMON wiki — DIN/MIDI/LSDj/Nanoloop sync, stereo SID, manual BPM tables · defMON wiki — features, interface overview, seqED key map · chipmusic.org — the defMON megathread (2014–2026) · electro·pizza — defMON, VICE, and the Pocket CHIP (2019) · goto80.com — defMON posts and the Improv page · Remix64 — An Interview with Anders Carlsson aka GOTO80 (Neil Carr, 2002) · Wikipedia — Goto80 (en) · My Computer Chronicles — Jens-Christian Huus / JCH (2017) · SIDin #4 — Ripping a BASIC program into RSID: Telengard (Stefano Tognon, 2003) · Furnace tracker — C64 (SID) system and instrument documentation · SIDin #12 — Ripping Trivia Arcade (Stefano Tognon, 2008)
created 2026-08-30 · updated 2026-08-31

The Commodore 64 is the home computer whose sid chip defines the "SID" branch of chiptune. Music is produced by a player routine that updates the SID registers from a raster interrupt every frame; trackers that run on the machine itself include sid-wizard (and the editors it cites: GoatTracker, SDI, X-SID, SID-Factory, JCH Editor, DMC), while goattracker runs on a PC (source: s-sid-wizard-manual).

Facts from the sources#

  • Frame-based timing: SID-Wizard's "8× framespeed = 400 Hz" implies a 50 Hz frame rate on PAL machines; the editor supports PAL, NTSC and Drean machine types, and PAL machines can use alternative tunings (Verdi A4 = 432 Hz, just intonation).
  • Cartridges on the expansion port clash with MIDI interfaces that map to $DE00–$DFFF.
  • Music files are typically distributed as .prg/.P00 executables or .sid files (sid-format); vice is the emulator the SID-Wizard manual assumes.
  • After a crash, a warm reset plus SYS 2061 restarts SID-Wizard — the editor lives at the BASIC start address.

From the SID-Wizard book and Newman#

  • Released in 1982, about 17 million sold — "the best-selling single personal computer model of all time"; the SID's 29 registers sit at $D400 (source: s-newman-driving-the-sid-chip).
  • Frame rates (book, ch. 10.3): PAL 17734475 Hz / 18 system clock, 312 raster lines × 63 cycles → 50.125 frames/s; NTSC 14318180 / 14, 263 × 65 → 59.826 frames/s. Hence BPM ≈ 3007.4744 / (tempo × lines per beat) on PAL and 3589.5659 / (…) on NTSC.
  • Getting files onto a real C64: X1541-family cables with Star Commander/OpenCBM (~10–20 €, parallel port), SD2IEC/µIEC (~50 €, .D64 images on SD), 1541 Ultimate (~130 €), Turbo Chameleon 64 (~200 €, FPGA cartridge).
  • Testing and noise: run plgDavid's one-page BASIC SID benchmark to test waveforms and filter; beware fake SIDs sold online; the audio output is noisy because of the SID's audio input — ground video-port pin 5 to pin 2 through ~100 Ω, or (carefully) bend SID pin 26 out of its socket.
  • A second SID (SID2SID or DualSID adapter) gives six voices; SID-Wizard's 2SID version and VICE's stereo SID setting need the same base address (source: s-witchmaster-creating-chiptunes-with-sid-wizard).

From the Programmer's Reference Guide and the datasheet#

  • The c64-programmers-reference-guide (1982) programs the SID from BASIC with POKE 54272+n, value (n = 0…24) and reads oscillator 3 and envelope 3 back with PEEK(54272+27) / +28; its frequency formula Fn = Fout / .06097 and Appendix E's eight-octave note table are the machine's official pitch reference (source: s-c64-prg-chapter-4-sound).
  • The datasheet's formulas assume a 1.0 MHz Ø2 clock (Fout = Fn × Fclk / 16777216; "for other Ø2 frequencies, multiply the given rate by 1 MHz/Ø2"), so the PAL and NTSC machines above run every SID pitch and envelope time a little differently from the printed tables — the PRG's constant corresponds to the NTSC clock (derived; source: s-mos-6581-datasheet).
  • Which chip is inside: "the 6581 from the original 'breadbox' C64s, and early versions of the C64C, and the 8580 chip from the later C64Cs" (source: s-chipmusic-c64-music-for-dummies); see sid.
  • .sid files record the machine's clock (PAL/NTSC) and chip model so players can compensate — including CIA timer values for playing an NTSC tune on a PAL machine ($3FFB) and vice versa ($5021) (source: s-hvsc-sid-file-format; see sid-format).

Clock, frame and memory map#

The PAL Ø2 clock is 985248 Hz and the NTSC one 1022727 Hz — the figures frantic's defBPM calculator works from, and they agree with the book's 17734475 / 18 above. One PAL frame is 19656 cycles, which is why defMON's 1× timer preset is $4CC7 (19655, and the timer counts one more) and its tempo formula is BPM = 60 × (clock / (timer + 1)) / (speed × steps per beat). defMON is unusual among C64 editors in being driven by a CIA cycle countdown rather than being frame-locked, so it can sit on an exact BPM instead of the nearest frame multiple (source: s-defmon-wiki-sync-and-stereo; multispeed).

The addresses that keep recurring across the sources, in one place:

addresswhat a musician meets it as
$0801BASIC start — where a .prg loads, where SID-Wizard lives (SYS 2061 restarts it), and where an RSID rip of BASIC music gets assembled (sources: s-sid-wizard-manual, s-sidin04-ripping-basic-rsid)
$1000–$1FFFby scene custom, the tune and its player: the VIC-II always sees character ROM through that 4 K window, so the RAM is useless for graphics and gets given to the music — jsr $1000 inits, jsr $1003 plays (source: s-chipmusic-defmon-thread; calling conventions on sid-player-routine)
$D011 (53265)VIC-II control — POKE 53265,65 switches the screen off, a recording trick (source: s-chipmusic-defmon-thread)
$D012the current raster line — read it to find out where in the frame a player runs (source: s-sidin12-ripping-trivia-arcade; vice)
$D400–$D41C (54272–54300)the sid's 29 registers: the write-only voice and filter registers from $D400, then the read-only POTX/POTY, oscillator 3 ($D41B) and envelope 3 ($D41C). From BASIC, POKE 54272+n, value for n = 0…24 and PEEK(54272+27) / +28 (sources: s-mos-6581-datasheet, s-c64-prg-chapter-4-sound)
$D418the last of them, and the odd one out: master volume and filter mode in one register — hence both the $D418 sample trick and the click when a tune changes filter mode (source: s-mos-6581-datasheet; chip-samples, sid)
$DD00 / $DD01CIA #2: the serial-bus lines (defMON's defSYNC starts two C64s together by polling the CLK bit) and the user port (its sync adapter holds PLAY on bit 2 and pulses SYNC on bit 3) (sources: s-chipmusic-defmon-thread, s-defmon-wiki-sync-and-stereo; sync)
$DE00–$DFFFthe I/O expansion area — cartridges, MIDI interfaces and the usual homes of a second SID (source: s-defmon-wiki-sync-and-stereo; the full second-SID address map is on sid)

That last row is the machine's one crowded neighbourhood, and it decides hardware choices: a MIDI cartridge, a fastload cartridge and a second SID all want the same 512 bytes. frantic put defMON's sync on the user port for exactly that reason — MIDI cartridges collide with the 1541 Ultimate and Action Replay setups whose fastload routines defMON uses for its own disk I/O (source: s-chipmusic-defmon-thread) — and the SID-Wizard book's warning above about cartridges clashing at $DE00–$DFFF is the same collision seen from the other side (derived).

Music from BASIC, and what an interpreted note costs#

Before player routines there was POKE. Telengard (Avalon Hill, 1983) drives the SID from BASIC with no interrupt at all — the register-level description of it is on sid; what makes it a machine story is the timing. Its sequencer reads rows of four bytes (a duration in jiffies of the TI clock, then one byte per voice, 0 meaning "leave this voice alone" and 255 meaning gate off — a tracker's empty row and note-off, written by a BASIC programmer in 1983; orderlist), but the note lengths inside a row are simply how long the interpreter takes to reach the next statement.

Stefano Tognon had to measure that before he could rip the tune: one poke f+x,y runs about 5 200 cycles (0.0053 s), for qq=1 to 600: next about 672 000 (0.682 s), a 90-jiffy TI wait about 1 548 000 (1.572 s). A single POKE therefore eats roughly a quarter of a PAL frame (derived from the 19 656 cycles above) — the argument for moving music into machine code on a raster interrupt, in one number. His port pads every translated statement with a hand-tuned delay routine (C5200 = 256 × (6+6+4+2+2) cycles, then corrected by ear) and ships as an RSID, the sid-format variant whose init routine may simply never return: "we can execute a flow of instructions without using IRQ routine at all" (source: s-sidin04-ripping-basic-rsid).

The keyboard#

The C64's keyboard is part of the instrument, and it carries keys a PC keyboard does not: RUN/STOP, the Commodore key C=, CONTROL, the back-arrow in the top-left corner, £, and RESTORE. C64 editors lean on them hard — defMON is driven almost entirely from them: toggles between the sequence editor and the sound table and CTRL+← switches between SID 1 and SID 2, RUN/STOP toggles between the sequence editor and the sequence list, holding C= or SHIFT edits the first or second sound-program column and CTRL+C= the speed column, and the four function keys play, follow, stop and set the speed. Notes are typed protracker-style, two octaves across the letter rows (source: s-defmon-wiki-manual).

Under emulation those keys move: VICE's default symbolic keymap puts on _, C= on Ctrl, RUN/STOP on Esc and CONTROL on Tab — worth learning before blaming the editor (source: s-electropizza-defmon-vice-chip; the full mapping tables, SID-Wizard's included, are on vice). Enough of the layout becomes muscle memory that overlays exist: FlexiArcade was selling a 3D-printed defMON keyboard overlay in May 2026 (source: s-chipmusic-defmon-thread).

Hardware seen in the later sources#

  • Frames: the PAL raster interrupt at 50 Hz makes the player's frame 20 ms — "frame = 50 × seconds" when locating a sound in a register dump (source: s-ucapps-wavetable-sounds-tutorial-1).
  • The REU: a RAM Expansion Unit can DMA-copy a register every clock cycle — asger-alstrup filled $10000 bytes of REU bank 0 from $D41B to measure the SID's waveforms; the same SID sits in the C128 (source: s-sidmusic-alstrup-waveform-examinations).
  • Modern machines and replacement chips: a 2020 poster returned to the C64 "with an Ultimate64" (source: s-lemon64-learning-sid-sound-design); because original SIDs "are becoming increasingly scarce and expensive" and ageing chips fail, drop-in replacements exist — ARMSID (ARM-based, 6581 and 8580 modes selectable by a switch, fits the 28-pin socket), SwinSID Nano (AVR-based, smaller, needs a small adapter, "core SID functionality") and the SIDFX board (two SIDs, real or emulated, for stereo; switchable mono/stereo) (source: s-commodore-64-eu-sid-chip; secondary — an unsigned enthusiast page). A C64C with a SwinSID appears in a 2016 forum post (s-chipmusic-c64-music-for-dummies); the book's warning about fake SIDs sold online is above.
  • A SID in a PC: the catweasel Mk4 (Individual Computers, PCI, 2005) is a floppy controller with two SID sockets — jumper-selectable 6581 or 8580 each, audio to the sound card's CD/AUX input — driven on Linux by Simon White's hardsid module for sidplay2, xsidplay, vice 1.18 and goattracker; its hardware buffer replays timed register writes so the host OS's latency does not reach the chip (sources: s-sidin08-catweasel-mk4, s-sidin09-catweasel-6581). The 2005–06 experience — an early card with DC-DC trouble, muted filtered voices, two 6581s of 1984 and 1986 — is on sid.
  • Flash storage as a test rig: nata composed in GoatTracker on a PC and used an MMC64 card to "easily … test my music, play games and listen to the HVSC" on the real machine, with the caveat that its BIOS "has no save/load routines and only a simple Sidplayer" (source: s-sidin09-nata-interview).

Noise, and recording the machine cleanly#

The audio-input fix from the book above (video-port pin 5 grounded to pin 2 through ~100 Ω) is one of a family of measures; goto80's flat complaint about the machine in 2002 was "the noise from the C64" (source: s-remix64-goto80-interview). frantic records from the video port rather than the audio jack and points at codebase64's noise-reduction page, and 4mat adds the display: black border and background, or POKE 53265,65 to switch the screen off entirely while recording (2016-05-17) (source: s-chipmusic-defmon-thread).

Running it in emulation#

  • The emulator does not include the machine. On Debian-family Linux apt install vice ships no C64 system ROMs, for copyright reasons; the fix is to copy data/C64/* out of the VICE source tarball into /usr/lib/vice/C64/ (source: s-electropizza-defmon-vice-chip).
  • What it is good for. A 2019 walkthrough's verdict on emulated defMON: the sound is good "but not as good as running this on an actual SID chip", complex tunes hiccup, and the key commands "make a lot of sense on a Commodore 64, but not so much when they are mapped to a modern keyboard layout" — so practice and sound design yes, live performance no. frantic stayed native for the other half of the same reason ("then you can work on the real chip and the proper SID sound while you work"), and goto80 signed off a 2002 interview "Don't imitate, innovate — fuck emulators" (sources: s-electropizza-defmon-vice-chip, s-chipmusic-defmon-thread, s-remix64-goto80-interview). Setup, engines and version differences are on vice.
  • Modelled rather than emulated. Cross-platform trackers reproduce the machine instead of running on it: furnace offers the C64 as a system with a selectable clock rate and 6581/8580 revision, plus a separate Commodore 64 (SID 6581) with software PCM variant for the $D418 fourth channel — an independent description of the same hardware in a different vocabulary (macros instead of tables, "envelope reset" instead of hard-restart); the details sit on sid and furnace (source: s-furnace-c64-docs).

Two machines at once, and composing on a third#

  • Two C64s. goto80 and frantic met weekly from 2008 to jam with two C64s both running defMON, and those sessions fed straight back into the program's design; some were later edited and released as Kommando Knorr. The 2020 version made it a feature — "synchronizing two defMONs by connecting two C64s to the same disk drive (or just straight into the other)", plus a tempo nudge "to stay in sync with your local brass band" — implemented as a polling loop on the serial-bus CLK bit in $DD00 (sources: s-goto80-site-defmon-posts, s-chipmusic-defmon-thread; sync, live-tracking).
  • Composing on another machine and carrying it over. JCH wrote his first tunes on an Amiga 500 in Aegis Sonix and moved them on paper, note by note, typing them into the C64 through BASIC input programs — a Christmas medley took over five hours to write down and another three or four to type in. From December 1990 he cross-assembled his editor on the Amiga with EASS, a hardware cross-assembler by Henning Andersen, which compiled and dumped the result straight into C64 RAM; turbo-assembler running on the C64 itself had become the bottleneck through sheer memory footprint. The finished v3.04 also ran on the SX-64 and the C128 (source: s-chordian-my-computer-chronicles; jch-editor).
  • The division of labour never went away: Ocean's pairs of C128Ds and later Atari ST system are below, and nata's PC-plus-MMC64 rig above is the same idea with newer parts.

Origins (1981–82) and how composers saw the machine#

  • "Project C64" was first discussed at Commodore in January 1981 as a game computer that became a home computer, with two chip groups — graphics and the SID (source: s-sidmusic-creation-of-the-sid-chip). bob-yannes: "the Commodore 64 (which I also designed)"; the SID/VIC-II/C64 schedule was "incredibly tight (some would say impossibly tight)--we did things faster than Commodore had ever done before and were never able to repeat after!" (source: s-sidmusic-yannes-interview).
  • rob-hubbard chose it because "the C64 has the best sound quality" (source: s-sidmusic-hubbard-interviews); martin-galway's school derided it for 8 K of ROM against the BBC Micro's 32 K (source: s-sidmusic-galway-interviews).
  • Development hardware at Ocean: pairs of C128Ds — music entered on one, played on the other — and later an Atari ST system (source: s-sidmusic-galway-interviews); see sid-player-routine.
  • On the PC-tracker side, quantam-porcupine's first "tracking" was Music Construction Set on the C64 (source: s-tw054-interview-quantam-porcupine).
  • Jens-Christian Huus (JCH) came to it from a TI-99/4A that allowed only Extended BASIC; he and his father bought his first C64 on 1984-04-02, on a second visit after the shop had sold out. What opened his ear was Super Pipeline's ADSR and then rob-hubbard, "who made the SID chip warp into space age almost single-handedly" — he bought cheap Mastertronic games for the title music alone (source: s-chordian-my-computer-chronicles).
  • goto80 arrived from Amiga chipmodules "but wanted the real deal with the SID-chip"; his 2002 rig was "Commodore 64 (new sid!) 1541 1581 Action Replay 6" running JCH's NewPlayer 20.G4 — an 8580 machine, two drives and a freezer cartridge (jch-editor) (source: s-remix64-goto80-interview).
  • The machine could also be the release format: per Wikipedia, goto80's early C64 songs "were distributed as executable files and not recordings, and they sounded different every time they looped" — shipping the player instead of a recording (source: s-wikipedia-goto80; secondary).

A 2003 desk#

  • stephan-schmid's setup for HVSC work: the C64 "on my desktop right beside my PC keyboard and a 1541-II on my PC case that is only used for transferring disks", a breadbox and a C64-II "to quickly change between" 6581 and 8580, a 1084 monitor whose hum belongs to composing, and vice for everything else (source: s-sidin03-schmid-interview).

SID hardware for PCs and MIDI in the SIDin news (2003–2010)#

  • HardSID cards put real SIDs in a PC: the Quattro PCI on sale by June 2003 (with WDM MIDI drivers), a single-chip HardSID PCI on 2003-10-15, the USB HardSID 4U by May 2008 ("up to four SID chips (6581/8580/6582 in any combination)", a VSTi interface updating every register at 8000 Hz) and the bus-powered Uno (one SID) and UPlay (a 6581 and an 8580/6582, switched from software) by 2010; players: ACID 64 (from 2003), SIDPLAY for Mac OS X 3.3 (2004), goattracker 2.66 (cycle-exact, 2007–08) (source: s-sidin-news-digest).
  • Catweasel MK3 PCI/Flipper (2003: one 6581 or 8580, PAL/NTSC switchable), MK4 (announced July 2004: cycle-exact scripted writes through a FIFO, "Digiboost" sigma-delta converters for 8580 samples, jumper-selectable filter capacitors, two SIDs) and MK4plus (2010) — see catweasel (source: s-sidin-news-digest).
  • In the C64 itself: the first SwinSID (2005–06) — a wavetable-synthesis module in the SID socket (sid); MSSIAH (by 2010), "a MIDI cartridge for the Commodore 64" whose applications "play the C64's audio circuit (SID) via MIDI or stand-alone with the internal sequencers" (source: s-sidin-news-digest).
  • Playing .sid files on the real machine: PSID64 (2002–05) wraps a PSID/RSID into a self-extracting executable; Sidplay64 0.3 (2005-12-19) plays HVSC files from CBM/CMD drives; the SID PC64 Winamp plug-in (2004) streams a tune over a PC64 cable to a $6A-byte C64-side player (sid-format; source: s-sidin-news-digest).

To verify#

  • Resolved (the PAL/NTSC half): a tune really does play at a different pitch and tempo on the other standard unless the player compensates. defMON is PAL-tuned, and its frequency tables had to be rebuilt for the NTSC build frantic released on 2018-02-11; its tempo math takes the clock as a parameter (985248 PAL, 1022727 NTSC) (sources: s-chipmusic-defmon-thread, s-defmon-wiki-sync-and-stereo). The .sid header's CIA timer values for playing an NTSC tune on a PAL machine and back say the same thing from the file's side (source: s-hvsc-sid-file-format).
  • (unverified) That Drean is the Argentine PAL-N variant. The SID-Wizard manual lists it as a machine type beside PAL and NTSC without saying what it is; a Commodore hardware reference would settle it.

sid · sid-wizard · sid-player-routine · multispeed · vice · c64-programmers-reference-guide · sid-format · bob-yannes · rob-hubbard · martin-galway · defmon · sync · furnace · jch-editor · goto80

Sources#

s-sid-wizard-manual · s-witchmaster-creating-chiptunes-with-sid-wizard · s-newman-driving-the-sid-chip · s-c64-prg-chapter-4-sound · s-mos-6581-datasheet · s-chipmusic-c64-music-for-dummies · s-hvsc-sid-file-format · s-commodore-64-eu-sid-chip · s-lemon64-learning-sid-sound-design · s-sidmusic-alstrup-waveform-examinations · s-ucapps-wavetable-sounds-tutorial-1 · s-sidmusic-creation-of-the-sid-chip · s-sidmusic-yannes-interview · s-sidmusic-hubbard-interviews · s-sidmusic-galway-interviews · s-tw054-interview-quantam-porcupine · s-sidin03-schmid-interview · s-sidin08-catweasel-mk4 · s-sidin09-catweasel-6581 · s-sidin09-nata-interview · s-sidin-news-digest · s-defmon-wiki-sync-and-stereo · s-defmon-wiki-manual · s-chipmusic-defmon-thread · s-electropizza-defmon-vice-chip · s-goto80-site-defmon-posts · s-remix64-goto80-interview · s-wikipedia-goto80 · s-chordian-my-computer-chronicles · s-sidin04-ripping-basic-rsid · s-furnace-c64-docs · s-sidin12-ripping-trivia-arcade

source file wiki/entities/commodore-64.md · 1 unverified · graph