<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Commodore on RetroCosi</title>
    <link>https://www.retrocosi.com/tags/commodore/</link>
    <description>Recent content in Commodore on RetroCosi</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>it-IT</language>
    <copyright>© 2024 RetroCosi :: All rights reversed</copyright>
    <lastBuildDate>Sun, 08 Sep 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.retrocosi.com/tags/commodore/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Magic of the Commodore 64: MOS 6581 SID Chip &amp; The 64KB Revolution</title>
      <link>https://www.retrocosi.com/posts/commodore-64-sid-chip-revolution/</link>
      <pubDate>Sun, 08 Sep 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.retrocosi.com/posts/commodore-64-sid-chip-revolution/</guid>
      <description>&lt;p&gt;When Commodore released the &lt;strong&gt;Commodore 64&lt;/strong&gt; in August 1982 for $595, competitors like Atari, Apple, and Sinclair could hardly believe the specifications: 64 kilobytes of RAM, 16-color VIC-II graphics with hardware sprites, and, most surprisingly of all, a custom dedicated audio synthesis chip named the &lt;a href=&#34;https://en.wikipedia.org/wiki/MOS_Technology_6581&#34;&gt;&lt;strong&gt;MOS Technology 6581 SID&lt;/strong&gt;&lt;/a&gt; (&lt;em&gt;Sound Interface Device&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;While other computers of the era produced primitive single-channel square wave &amp;ldquo;beeps&amp;rdquo; through tiny piezoelectric speakers, the C64 featured a true polyphonic synthesizer on a single DIP-28 silicon die.&lt;/p&gt;</description>
      <content>&lt;p&gt;When Commodore released the &lt;strong&gt;Commodore 64&lt;/strong&gt; in August 1982 for $595, competitors like Atari, Apple, and Sinclair could hardly believe the specifications: 64 kilobytes of RAM, 16-color VIC-II graphics with hardware sprites, and, most surprisingly of all, a custom dedicated audio synthesis chip named the &lt;a href=&#34;https://en.wikipedia.org/wiki/MOS_Technology_6581&#34;&gt;&lt;strong&gt;MOS Technology 6581 SID&lt;/strong&gt;&lt;/a&gt; (&lt;em&gt;Sound Interface Device&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;While other computers of the era produced primitive single-channel square wave &amp;ldquo;beeps&amp;rdquo; through tiny piezoelectric speakers, the C64 featured a true polyphonic synthesizer on a single DIP-28 silicon die.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-vision-of-bob-yannes&#34;&gt;The Vision of Bob Yannes&lt;/h2&gt;
&lt;p&gt;The SID chip was conceived and designed almost single-handedly by engineer &lt;strong&gt;Bob Yannes&lt;/strong&gt; (who would later co-found Ensoniq). Yannes was an amateur synthesizer enthusiast who was deeply dissatisfied with the audio chips of the late 1970s, such as the General Instrument AY-3-8910 or the Texas Instruments SN76489.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&amp;ldquo;I thought the sound chips on the market were primitive and designed by people who knew nothing about music. I wanted to design a real synthesizer chip with envelopes, resonance, and multi-mode filters.&amp;rdquo;&lt;/em&gt;&lt;br&gt;
— Bob Yannes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Due to grueling deadlines set by Commodore founder Jack Tramiel to announce the machine at the Winter CES in January 1982, Yannes had only five months to take the SID chip from initial schematic drafts to fabricated silicon.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;architectural-teardown-what-made-sid-unique&#34;&gt;Architectural Teardown: What Made SID Unique?&lt;/h2&gt;
&lt;p&gt;The MOS 6581 was mapped to the C64 memory bus at addresses &lt;code&gt;$D400&lt;/code&gt; through &lt;code&gt;$D41C&lt;/code&gt; (29 write/read registers). It packed features that were previously only available in studio synthesizers costing thousands of dollars:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Three Independent Audio Oscillators&lt;/strong&gt;: Each capable of operating across an 8-octave musical range (approximately 16 Hz to 4 kHz) with 16-bit frequency resolution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Four Selectable Waveforms per Voice&lt;/strong&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Triangle Wave&lt;/strong&gt;: Warm, mellow, flute-like tone.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sawtooth Wave&lt;/strong&gt;: Bright, brassy, rich in odd and even harmonics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Variable Pulse (Square) Wave&lt;/strong&gt;: Programmable 12-bit pulse width duty cycle (from 0% to 100%), allowing lush chorus and phasing effects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pseudo-Random White Noise&lt;/strong&gt;: Built with an internal 23-bit Linear Feedback Shift Register (LFSR), ideal for snare drums, cymbals, explosions, and wind effects.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hard Oscillator Sync &amp;amp; Ring Modulation&lt;/strong&gt;: Allowed Voice 1 and Voice 2, or Voice 2 and Voice 3, to modulate one another, creating bell-like metallic overtones and complex harmonics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ADSR Envelopes&lt;/strong&gt;: Dedicated hardware Attack, Decay, Sustain, and Release generators for each of the three voices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analogue Multi-Mode 12dB/octave Filter&lt;/strong&gt;: Low-pass, Band-pass, and High-pass filtering with controllable resonance and cut-off frequencies.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2 id=&#34;programming-the-sid-in-6502-assembly&#34;&gt;Programming the SID in 6502 Assembly&lt;/h2&gt;
&lt;p&gt;To understand how developers interacted with the SID chip, here is a minimal 6502 assembly routine that initializes Voice 1 with a sawtooth wave at 440 Hz (Concert A) and triggers the note:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-assembly&#34; data-lang=&#34;assembly&#34;&gt;; =================================================================
; RETROCOSI // MOS 6581 SID VOICE 1 INITIALIZATION
; Target: Commodore 64 (MOS 6510 @ 0.985 MHz PAL)
; =================================================================

SID_BASE   = $D400
V1_FREQ_LO = SID_BASE + $00     ; Voice 1 Frequency Low Byte
V1_FREQ_HI = SID_BASE + $01     ; Voice 1 Frequency High Byte
V1_PW_LO   = SID_BASE + $02     ; Voice 1 Pulse Width Low Byte
V1_PW_HI   = SID_BASE + $03     ; Voice 1 Pulse Width High Byte
V1_CR      = SID_BASE + $04     ; Voice 1 Control Register
V1_ATT_DEC = SID_BASE + $05     ; Voice 1 Attack / Decay
V1_SUS_REL = SID_BASE + $06     ; Voice 1 Sustain / Release
VOLUME_FLT = SID_BASE + $18     ; Master Volume &amp;amp; Filter Mode

init_sid:
    ; Set Master Volume to Maximum (15) without filters
    lda #$0F
    sta VOLUME_FLT

    ; Clear Voice 1 Control Register
    lda #$00
    sta V1_CR

    ; Set Frequency for Concert A4 (~440 Hz on PAL C64: $1CDE)
    lda #$DE
    sta V1_FREQ_LO
    lda #$1C
    sta V1_FREQ_HI

    ; Set Envelope: Instant Attack, Moderate Decay ($09)
    lda #$09
    sta V1_ATT_DEC

    ; Set Sustain level high, short Release ($A3)
    lda #$A3
    sta V1_SUS_REL

    ; Gate on: Trigger Sawtooth waveform (Bit 5 = Sawtooth, Bit 0 = Gate)
    lda #%00100001
    sta V1_CR

    rts
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Executing this code instantly produces a rich analog sawtooth note from the C64&amp;rsquo;s composite/audio port!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;the-pioneers-of-chiptune&#34;&gt;The Pioneers of Chiptune&lt;/h2&gt;
&lt;p&gt;Without the SID chip, European video game music in the 1980s would have looked drastically different. Brilliant programmers and musicians pushed the silicon beyond anything Commodore originally anticipated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rob Hubbard&lt;/strong&gt;: &lt;em&gt;Commando&lt;/em&gt;, &lt;em&gt;Monty on the Run&lt;/em&gt;, &lt;em&gt;International Karate&lt;/em&gt;. Hubbard exploited the LFSR noise generator and rapid arpeggio pitch sweeps to simulate drums and basslines simultaneously on a single channel.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Martin Galway&lt;/strong&gt;: &lt;em&gt;Rambo: First Blood Part II&lt;/em&gt;, &lt;em&gt;Wizball&lt;/em&gt;. Galway discovered that by rapidly flipping the 4-bit master volume register at &lt;code&gt;$D418&lt;/code&gt;, he could play back 4-bit digital PCM samples—giving birth to sampled speech and acoustic drum hits on the C64.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chris Hülsbeck&lt;/strong&gt;: &lt;em&gt;The Great Giana Sisters&lt;/em&gt;, &lt;em&gt;Turrican&lt;/em&gt;. Developed the custom sound replay routine &lt;em&gt;TFMX&lt;/em&gt;, layering complex musical polyphony and emotional melodies.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;6581-vs-8580-the-revision-debate&#34;&gt;6581 vs. 8580: The Revision Debate&lt;/h2&gt;
&lt;p&gt;Later in the C64&amp;rsquo;s lifecycle, Commodore transitioned from the original NMOS &lt;strong&gt;6581&lt;/strong&gt; (used in the classic &amp;ldquo;Breadbin&amp;rdquo; cases, running at 12V) to the HMOS &lt;strong&gt;8580&lt;/strong&gt; (introduced in the redesigned C64C, running at 9V).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;6581&lt;/strong&gt; is famous for its warm, slightly distorted analog filter. Due to silicon process variations at MOS Technology, every single 6581 chip had a slightly different filter response curve and suffered from a DC bias leak (which ironically enabled Galway&amp;rsquo;s 4-bit sample trick to work).&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;8580&lt;/strong&gt; cleaned up the filter curves, reduced background noise, and stabilized waveform mixing—making it the favorite of the modern demoscene for crystal-clear chiptune playback.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;More than four decades after its debut, the MOS 6581 remains one of the most celebrated achievements in computer audio engineering, proving that hardware constraints often spark the purest artistic innovation.&lt;/p&gt;
</content>
    </item>
    
  </channel>
</rss>
