SIDaster - Commodore "SID" 6581/8580 shield and Synth engine

Dear Arduino community,

You may already have heard of the SIDaster Shield&Synth in a previous thread, I'm glad to announce that the Shield and SW are released in V4 and V3.

SIDaster is a Midi powered Arduino Shield for the famous SID chip (MOS6581/8580) you can find in vintage Comodore 64 computers. It's also a library for connecting those chips to Arduino, and a Monophonic synth engine in itslef !

For curriosity, I summarised all the data I cound find on the chip itself and rebuilt a "datasheet" of the chip with historical quotes, you can find it here.

I'm re-posting about this project today because i've made a couple of PCBs of this shield to finish the design, and have about 5 PCBs that i'd be happy to offer to anyone interested in the SIDaster project. So if you're one of those, send me a PM or write me an email to the address on the blog, I'd be glad to send you one PCB

Thanks for a great build!

I've made my own shield based on your v4 design and have just built a SIDaster with a pulled MOS 6581 - supposedly working.
I'm using an Leonardo at the moment and is feeding VCC 12 v and there's no blue smoke or heat 8)

However, I have no MIDI keyboard at home right now and I just want to verify that the build is sane...

I have connected a small speaker to SL1 and I'm not looking for great sound here, only for test purposes. (I can admit that I haven't ascertain what the line level is at SL1...)

In the loop() I'm trying to use synth_on() with various int values but no joy, nor does MIDI.sendNoteOn(42,127,1) generate anything...

Any help would be great here!
I should be able to get my hands on a cheapo MIDI controller soon since I'm reluctant to connect my Roland Guitar MIDI kit thru the SIDaster and then wire it to my Linn stereo BEFORE initial tests.
I have no oscilloscope at home either so I can't measure the pins on SL1.
SL2 is closed with a jumper.

Many thanks in advance!

Hi Jen,

Try using this code below.

It's basically the SIDaster SW with a note on command inserted in the main loop. It's working fine on my SIDaster and should generate a mellow sounding triangle signal, with fast attack and slow release.

Use the SHield V4 pushbutton as in the schematic to trigger note on/off by pressing it.

One key thing here : the SIDaster should not be powerfull enough to drive a speaker. Try plugin it to your soundcard line-in instead, this is what i'm doing and it works great.

1 - Look for the global Synth init section and update the registers as follow
2 - Go to the main loop and add the code below the midi call

//==============================
// GLOBAL SYNTH VARIABLES INIT
//==============================
// Coarse Frequency, base 32, value from 0 (-16) to 31 (+15)
static byte coarse1 = 16;
static byte coarse2 = 16;
static byte coarse3 = 16;

// Fine Frequency, base 0 value from 0  to 127 
static byte fine1 = 0;
static byte fine2 = 0;
static byte fine3 = 0;


// Default midi channel
static byte mchannel = 1;

// Synth State Managment
static boolean trigged = false; // indicating if synth is playing
static boolean retrigger = true; // indicating if retriggering ADSR is on

// Local Osc Frequency 
// Registers @ B00000 and B00001
// Default 440hz = 0x1CD5
static word	freq1 = 0x1CD5;
static word	freq2 = 0x1CD5;
static word	freq3 = 0x1CD5;

// PWM
// Default Square Wave = 0x800  
// Formula : PWout = (PWn/40.95) %
static word	pw1 = 0x800;
static word	pw2 = 0x800;
static word	pw3 = 0x800;

// Control Register
// Default: Saw
// Content NOI|SQR|SAW|TRI|TST|MOD|SYN|GAT
static byte	ctrl1 = 0X10;
static byte	ctrl2 = 0X00;
static byte	ctrl3 = 0X00;

// Attack and Decay
// Default : Shortest
static byte	ad1 = 0x40;
static byte	ad2 = 0x80;
static byte	ad3 = 0xF0;

// Sustain and Release
// Default: Max sustain and no release
static byte	sr1 = 0xF8;
static byte	sr2 = 0xF0;
static byte	sr3 = 0xF0;

// Cutoff Frequency
static word	freq = 0x7FF;

// Resonnance and CTRL
// Res= 0 no resonnance, Res=F max resonnance
// Routing 0 is no filter, 1 is filter
// RES(4)|EXT|F3|F2|F1
static byte	res = 0x00;

// Mode 
// Content EXT|HP|BP|LP|VOL(4)
static byte	mode = 0x0F;

// Mono Note Memory
static byte last_note = 0;
static byte current_note = 0;
static byte notes = 0;

// ########################################################

SID sid;

// Give voices some initial params
//
void synth_init() 
{
  // Freq init
  sid.send(SID_FREQ1LO,char(freq1));
  sid.send(SID_FREQ1HI,char(freq1>>8));
  sid.send(SID_FREQ2LO,char(freq2));
  sid.send(SID_FREQ2HI,char(freq2>>8));
  sid.send(SID_FREQ3LO,char(freq3));
  sid.send(SID_FREQ3HI,char(freq3>>8));

  // PWM Init
  sid.send(SID_PW1LO,char(pw1));
  sid.send(SID_PW1HI,char(pw1>>8));
  sid.send(SID_PW2LO,char(pw2));
  sid.send(SID_PW2HI,char(pw2>>8));
  sid.send(SID_PW3LO,char(pw3));
  sid.send(SID_PW3HI,char(pw3>>8));

  // CTRL
  sid.send(SID_CTRL1,ctrl1);
  sid.send(SID_CTRL2,ctrl2);
  sid.send(SID_CTRL3,ctrl3);

  // ADSR
  sid.send(SID_AD1,ad1);
  sid.send(SID_SR1,sr1);
  sid.send(SID_AD2,ad2);
  sid.send(SID_SR2,sr2);
  sid.send(SID_AD3,ad3);
  sid.send(SID_SR3,sr3);

  // Filter + Main
  sid.send(SID_FCLO,char(freq));
  sid.send(SID_FCHI,char(freq>>3));
  sid.send(SID_RES,res);
  sid.send(SID_MODE,mode);
}

// Play sound at frequency specified on voice specified
//
void synth_on(int note) 
{
  freq1=NOTES[note+coarse1-16]+fine1;
  sid.send(SID_FREQ1LO,char(freq1));
  sid.send(SID_FREQ1HI,char(freq1>>8));
  freq2=NOTES[note+coarse2-16]+fine2;
  sid.send(SID_FREQ2LO,char(freq2));
  sid.send(SID_FREQ2HI,char(freq2>>8));
  freq3=NOTES[note+coarse3-16]+fine3;
  sid.send(SID_FREQ3LO,char(freq3));
  sid.send(SID_FREQ3HI,char(freq3>>8));
  ctrl1|=1;
  sid.send(SID_CTRL1,ctrl1);
  ctrl2|=1;
  sid.send(SID_CTRL2,ctrl2);
  ctrl3|=1;
  sid.send(SID_CTRL3,ctrl3);
}

void synth_off(int note) 
{
  ctrl1&=~1;
  sid.send(SID_CTRL1,ctrl1);
  ctrl2&=~1;
  sid.send(SID_CTRL2,ctrl2);
  ctrl3&=~1;
  sid.send(SID_CTRL3,ctrl3);
}

void setup() 
{
  pinMode(LED,OUTPUT);
  pinMode(A5,INPUT);
  digitalWrite(LED,HIGH);
  delay(1000);
  // Set up the SID chip
  sid.clk_setup();
  sid.SPI_setup();

  // Give the voices some initial values
  // Set up the MIDI input
  MIDI.begin();
  MIDI.setHandleNoteOn(DoHandleNoteOn);
  MIDI.setHandleNoteOff(DoHandleNoteOff);
  MIDI.setHandleControlChange(DoHandleControlChange);

  synth_init();
  digitalWrite(LED,LOW);
}

// Main program loop
//
void loop() {
  MIDI.read();
  if (!digitalRead(A5)) 
    { synth_on(40);
      digitalWrite(LED,HIGH);
    } else {
      synth_off(40);
      digitalWrite(LED,LOW);
    }

}

Thanks! :slight_smile:

Now for some tinkering again!

Oh, forgot to precise : you need to declare A5 as an input in your sketch as well, otherwise it won't work.

Hi guys!

My name is Julian, I was in contact some time ago with the creator of SIDASTER, probably one of you guys!!
I was trying to make the Sidaster work in a Mega 2560 some time ago. Well after some time I decided to get my hands again in my abandoned Sidaster and make it work on my new Arduino UNO board :slight_smile:

Today I was reading here and decided to do the A5 test to get the mellow sound, and yeah!! I can hear a mellow sound, like a triangle wave, when I click the button.

Now when I triger MIDI all I can hear is a short sound, I can see the Led flashing when MIDI notes are triggered from my keyboard, on MIDI Channel 1. Maybe is the default setting of the oscillator or envelope, is there a way I could get a copy of the VST plugin for accesing all MIDI parammeters easily? I can´t seem to be able to download it.

Many thanks in advance... looking forward to get this friend screaming :slight_smile:
Cheers,
Julian

Hello Julian,

Actually you just need either :

  • to play with any Midi compatible controller, to send Midi CC which shall change the parameters of the chip according to the Midi mapping table.
  • to edit the corresponding lines in setup() function. However, normally it should stay lound while key is pressed, sustain is maxed up by default.

Maybe something goes wrong with the Midi implementation, I hate Arduino Midi library btw.

There is better than the VST now : a SIDaster user made a great GUI with Processing, I will ask him if I can share it on the website.

On my side, lots of work going on with the SIDaster. Since Arduino Midi library is buggy (missing alot of Midi in messages), I'm currently re-programming the SIDaster using a home made interrupt driven Midi engine with a large buffer and optimised Midi message handling, to lower processing time (e.g., I discard everything that is not CC, or Note, Or pitch bend). Moreover, I have implemented a nice pitch/bend feature, with 32 steps between each note stored in program memory, that brings a lot of playability to the SIDaster.

Expect a V2.0 soon.

Bonus, here is a pic a SIDaster user sent me, he added an I2C screen and rotary buttons to his synth. Lovely !

Hi dean sounds like amazing news :slight_smile:

Looking forward to see the V2 progress. Will keep an eye here and your blog to test the processing GUI or any guide to incorporate those lovely Encoders and LCD to the Sidaster!!

I think there might be an issue with MIDI, I definitely get a sound when pressing the a5 button. Also can see the Midi interface responging correctly, and I managed to switch on and off an led with Midi so that part is correct.

My other issue is the Power supply I think, I got my SIDs from two commodore 64 shiped from America, and had 110v supply which I can´t use here in Spain. So Im using different 12 V transformers for the 6581 with more or less same performance.

Will keep trying things and will let you know.
Keep up the good work!

Cheers,
Julian

I have been looking around the web for a SID Shield, and this looks like my best bet--but the website is down, and this thread seems a bit old. I'd love to get my hands on one to play with, as I love to code for projects like this, and I'd rather not have to try an reinvent the wheel when such a well-built wheel exists ;p

SlaserX:
I have been looking around the web for a SID Shield, and this looks like my best bet--but the website is down, and this thread seems a bit old. I'd love to get my hands on one to play with, as I love to code for projects like this, and I'd rather not have to try an reinvent the wheel when such a well-built wheel exists ;p

I contacted the threadposter, I'll update if there are any spares :slight_smile:

Oh please do. I think I would love you forever!

Currently waiting for chinese new year to get a few PCBs and might have a few spare ones.

Anyway, better contact directly the designer and, if he still have some, go get them from him. If not let me know :slight_smile:

If you have spares, I would definitely be interested. The designer seems MIA.

Hi,
does someone have a copy of the bom.zip file, or the schematic? I forgot to save it, and when i sent the board file to the fab the site was still online :slight_smile:

it seems the website is up again so you can get the BOM there: http://www.banson.fr/wiki/doku.php?id=sidaster_shield

Hi all,

I have a spare Sidaster v4 PCB. If someone interested can pickup in Singapore. I've just completed mine but haven't tried it yet.

:slight_smile:

i would like as i have a spare sim chip, but can't find any info on these board, i would interested on buying one!