HVSC — SID file format description (PSID v1–v4, RSID)

author Michael Schwendt (PSID v1/v2), Simon White (PSID v2NG, RSID), Dag Lem (PSID v2NG), Wilfred Bos (v3/v4); document by LaLa
date undated (current HVSC DOCUMENTS version, fetched 2026-08-30)
article Introduction · header v1 · header v2/v3/v4 · the SID file environment
created 2026-08-30 · updated 2026-08-30

The reference description of .sid files as used by the High Voltage SID Collection: a big-endian header (magic, version, offsets, addresses, song count, speed bits, three 32-byte strings, and from v2 on flags for clock and SID model, relocation info and extra SID addresses) followed by the C64 binary. Written "for programmers or other people with reasonable background".

Key claims#

  • Two families: PSID files run on PlaySID/libsidplay1-style emulators; RSID (Real SID) marks tunes that "strictly require a true Commodore-64 environment" — multispeed, samples, extra interrupt sources or busy loops — so older emulators reject them safely. RSID = PSID v2NG with loadAddress, playAddress and speed forced to 0, version 2–4 only, and the PlaySID-specific flag reinterpreted as a C64 BASIC flag; a player "MUST" reject an RSID file that violates these.
  • Header v1 (dataOffset $76): magic; version 1–4; loadAddress (0 = the data carries its own little-endian load address, as a normal C64 file does — RSID requires this and a real load address ≥ $07E8; the document warns at length about accidentally doubling the load address); initAddress (the song number in the accumulator; 0 = the load address; RSID: never inside ROM/I/O areas $A000–$BFFF, $D000–$FFFF); playAddress (called repeatedly; 0 = init installs its own interrupt handler — always the case for RSID); songs 1–256; startSong (default 1); speed — one bit per song, 0 = vertical-blank interrupt (50 Hz PAL / 60 Hz NTSC), 1 = CIA 1 timer (default 60 Hz), with a v2NG redefinition of how songs above 32 are handled; name, author, released (once copyright) as 32-byte Windows-1252 strings.
  • Header v2–v4 (dataOffset $7C): flags — bit 0 musPlayer (Compute!'s Sidplayer MUS data needing an external player), bit 1 psidSpecific (PlaySID samples — a 1990s Amiga trick that converted C64 volume-register samples into something PlaySID could play once per frame, at the cost of C64 compatibility) / C64 BASIC flag for RSID, bits 2–3 clock (unknown/PAL/NTSC/both — introduced because the speed bits could not express NTSC and the NTSC refresh (17045 cycles) differs from the CIA latch (17095 cycles), where "the SID ADSR bugs can actually break the tune"), bits 4–5 sidModel (unknown/6581/8580/both), bits 6–7 and 8–9 the model of a second and third SID (v3, v4); startPage/pageLength describe the largest free page range for driver relocation (0 = clean file, $FF = no free page); secondSIDAddress/thirdSIDAddress give the middle byte of $Dxx0 — even values $42–$7F and $E0–$FE only (i.e. $D420–$D7F0, $DE00–$DFE0).
  • 6581 vs 8580, as the document states it: combined waveforms are "generally louder on a MOS8580", some combinations audible there are "completely silent on a MOS6581"; the 8580's internal DC levels are so small that "software or hardware tricks must be used to play volume samples"; and the two filters have "totally different characteristics" — hence the model bits.
  • The SID file environment: emulators set $02A6 to 1 for PAL, 0 for NTSC; CIA 1 timer A runs at 60 Hz ($4025 PAL, $4295 NTSC); to play an NTSC tune on a PAL machine use a CIA value of $3FFB (312 × 63 × 50 / 60 − 1), a PAL tune on NTSC $5021; PSID files get the bank register set per call address ($37 below $A000, $36 below $D000, $35 from $E000, else $34); RSID files get the power-on environment (VIC raster IRQ set but disabled, CIA 1 timer A at 60 Hz with IRQs active, bank $37); with the BASIC flag the song number goes to $030C.

Practical takeaways#

  • What the export dialogs of sid-wizard's SID-Maker and goattracker actually fill in: init/play addresses, subtune count, the clock and SID-model flags, the strings; and why a tune using multispeed through a CIA timer or samples belongs in an RSID.
  • The format has room for a second and third SID — the container for 2SID/3SID tunes.

Notable quotes#

"Tunes that are multi-speed and/or contain samples and/or use additional interrupt sources or do busy looping will cause older SID emulators to lock up or play very wrongly (if at all)."

Relevance#

Resolves the wiki's unverified description of the .sid container on sid-format and documents hvsc's DOCUMENTS folder; the model-difference paragraph is a third independent statement of the 6581/8580 split for sid.

Pages touched#

sid-format · hvsc · sid · multispeed · sid-player-routine · commodore-64

source file wiki/summaries/s-hvsc-sid-file-format.md · graph