Page 2 of 3

My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 5:41 pm
by BruceMcF


On 11/18/2022 at 12:14 PM, m00dawg said:




Yep this is kinda what I was thinking, although your solution is much improved over what I had thought about to this point. Using a uC I'd be going with an SPI DAC more than likely and then just a few pins for the states (though what is on the other end of that I haven't fully figured out yet - referring to running the various channels through the Spin). I think with the Spin in play, a uC is the better solve.



I still wonder whether an I2C DAC and I2C GPIO extender wouldn't work, in which case you can put a pin header on the board and run a small ribbon cable to the I2C pin header, and the slot is just used for the audio lines and power.


My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 5:55 pm
by m00dawg

I wondered that myself actually! This was my original thought.

Looking over the board, I'm not sure where/how the addressing would work while making it ez-mode for folks to just plug the thing in and go. The API would be different from Vera and YM which also isn't ideal though not the worst (could write a API/function which, optionally, could be chucked into ROM). Doing it this way would be the most cost effective solution I think. The bus is lightly used now though I'm curious how much CPU ovrehead and saturation might be caused by say, using software envelopes to manipulate the filters over the I2C bus vs memory mapped I/O like with using the Verasound.


My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 7:43 pm
by neutrino

@m00dawg Maybe the sound thing could be hooked in to the same bus that will deliver the keyboard? (I2C or SPI last time I checked to a MCU)

And if burst modes are realised via a 6522/6526. Then it could perhaps even be attached to the CBM-488 (IEC) bus.

Seems many programs use the vertical blanking period to command the SID chip. This would mean as a worst case: 60 Hz x 29 register addresses x 8-bits => 60 * (5 bits + 8 bits) = 780 bits/s maybe with start-stop bits and pause 1140 bit/s. Ie doable over I2C which will handle at least 100 kbit/s per specification.

For programming a library could help out.

 

Practical hardware question, how many analog components would it take to implement the analog SID parts in physical components?


My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 8:21 pm
by m00dawg

Yep current board uses I2C for the power and some other things. I2C pins are exposes as headers on the board too so @BruceMcF 's suggestion I think can work. I use SPI more often so I had to do a bit of digging with I2C, and it includes addressing which avoids having to use extra pins, but also requires possibly having to set the address somewhere in the X16? I'll need to dig into that more. For now I found that SSI makes a DIP adapter for the filter so am KiCAD'ing out a quick schematic so I know what other components I'll need so I can put in an order of things to breadboard this for a Eurorack module.  That will be nice since there's only a few modules that use this chip and I don't believe they have a LP to HP sweep which is something I'd really like to have. The SID didn't have that feature so, worst case, I just have a sort of switch for the filter modes, but if I'm already controlling cutoff and ressonance why not add a sweep control.

Whoa weird deja-vu I just had...freaky! Anyways!

As far as the analog parts of the SID, I think the schematics are out there for what would be needed but I think it's mostly the output amp and filter. I'm not sure what the amp stage looks like but making a juicy analog output stage is certainly possible. The filter could be realized with the SSI2140 at least in function since the SID has a multimode filter. The sound of the 2140 wouldn't be the same though. Better or worse is subjective but it wouldn't match the SID filter in sound.

It got me to thinking what it would take to implement the SID's functions using all voltage controlled analog parts at least using what I know from Eurorack. That would look something like:

For each voice:


  • SSM2131 for Saw, Tri, PWM


  • a noise source (LSFR or a simple transistor noise circuit perhaps)


  • SSI2146 quad VCA to build a voltage controlled mixer to mix the 4 oscillators.


  • AS3310 VADSR for envelope control


  • 9 DAC outputs (1 for pitch - ala V/Oct, 3 for the mixer, 1 for PWM, 4 for ADSR)


  • 2 logic outs for the gate and trigger for the ADSR envelope


You'd build 3 of these and then they would go into some sort of switching/mixer to route them through an SSI2140 filter or not, then mix that together and finally out. 2140 would be controlled by 2 more DAC outputs. I'm not mentioning all the parts here like the op-amps that may be required at various points but I think that might cover it?

It's a lot ? 29 DAC outputs, 6 logic outs and lots of op-amps along the way. But we're still under the 32-byte addresses allocated to each card ? And that's if we wanted to 1:1 map these to addresses. Wavicle's method could be used instead.

I probably missed several details but that's just what I came up with using what I know of the SSI chips having read up on them for the filter and Eurorack. The above actually does quite a bit more than the SID could do and most of it is all analog (whereas the SID used digital oscillators). We have 8-bit resolution (assuming an 8-bit DAC) for all the controllable things, whereas I believe the SID used 4-bits for lots of things. We could nearly halve the DAC outputs by doubling them together and going down to 4-bits perhaps.



The above wouldn't be a "build to a cost target" like the SID was by any means! Could shave a lot of the above by using something like an ARMSID, a microcontroller, or microcontroller/DAC platform like the Electrosmith Daisy to do all the digital stuff (everything but the analog filter basically) and then just deal with a nice analog amp stage and filter. That would cut a lot of cost. Essentially that boils down to my original idea for the X16's output more or less.


My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 9:30 pm
by neutrino

D/A output can be made full scale directly with appropriate transistor setup. Thus eliminating the need for a D/A + amplifier.

For the digital part a CPLD or FPGA would be a good candidate. So that jitter races between signals can be avoided.

Regarding the noise generation per wikipedia:

"The noise generator is implemented as a 23-bit-length Fibonacci LFSR (Feedback polynomial: x^22+x^17+1). When using noise waveform simultaneously with any other waveform, the pull-down via waveform selector tends to quickly reduce the XOR shift register to 0 for all bits that are connected to the output DAC. As the zeroes shift in the register when the noise is clocked, and no 1-bits are produced to replace them, a situation can arise where the XOR shift register becomes fully zeroed. Luckily, the situation can be remedied by using the waveform control test bit, which in that condition injects one 1-bit into the XOR shift register. Some musicians are also known to use noise's combined waveforms and test bit to construct unusual sounds."

http://www.oxyron.de/html/registers_sid.html

https://codebase64.org/doku.php?id=base:noise_waveform#the_noise-waveform

Replicating the noise generation and the "test bit" is likely important to get the sound right.

The general idea being a FPGA + surface mount analog frontend. Because small surface mount components is the closest to analog ASIC there is.

For reference:

ka-electronics.com - SSM2131 audio power operational amplifier.pdf

amazingsynth.com - SSI2164 4x voltage controlled amplifier.pdf

alfarzpp.lv - AS3310 ADSR voltage controlled envelope generator.pdf

SID block diagram:

633px-SID_Block_Diagram.png


My take on a "SID 2.0" (hint: it's the filter)

Posted: Fri Nov 18, 2022 9:40 pm
by m00dawg

Ah nice I wasn't toooo far off then, other than the noise. Yeah to be clear my "analog SID" would in no way actually sound like a SID, it'd just be a digital controlled analog synth with similar features. I don't expect I'll be going down that road. At least not at the moment. I do think I'll pursue this bolt-on filter idea though. In incremental steps, the first being the Eurorack module because then I can get an idea of how things might sound by running my MB6582 through it (and/or if it's in my hands in time, the X16). If it adds enough charm/use then I'll look at the next steps.

I would guess not many folks would use the filter card. It would be there to say "if you want the X16 to sound more like the SID, here's an analog filter." ? (Which to be fair _won't_ sound like the analog filter of the SID but at least it covers the one big SID feature lacking on the X16 for those that are put off by it not having a SID socket).


My take on a "SID 2.0" (hint: it's the filter)

Posted: Sat Nov 19, 2022 11:49 am
by neutrino

If you don't look for exact replication. Then maybe it might be worthwhile to use 16-bit data control various aspect. Or add more "voices".

It might be worth to keep in mind that Bob Yannes didn't get enough time to get the SID 6581 the way he wanted and then there was unintended signal leakage. The Ensoniq ES5503 DOC seems to be what he really had in his mind. Example differences are 32 voices and a 128 kB memory for sampled wavetable instruments. So maybe concepts from this chip might be of interest.








 


Ensoniq chip datasheets:



https://zine.r-massive.com/ensoniq-technical-documents-and-schematics/



  ( ensoniq_5503_digital_oscillator_chip.pdf )



 



My take on a "SID 2.0" (hint: it's the filter)

Posted: Sat Nov 19, 2022 4:35 pm
by m00dawg

Yep that's the chip the Apple iigs used. I have a few demo disks and they sound pretty great. I had thoughts to make a multi-channel version of the GB voice module I'm working on for Eurorack. It implements a 16 bank 4-bit/32-slot wavetable much like you find on the GameBoy and LSDJ. A multi-voice one would be similar-ish to the TG16 (it had 6 voices of 5-bit channels, though documentation on the sound chip is kinda vague). 5503 takes that a few steps further.

The GB Wav output approach was interesting and according to the X16 Discord conversations I've had not too far from the Amiga. The resulting pitch of the waveform is controlled by clocking the DAC at different rates ("# of steps * pitch"). Very clever and indeed my GB module sounds strikingly similar as I'm doing the same thing. I thought about taking this up to say a 4 voice solution, where each voice had its own DAC which is then just passively mixed together. This is still quite a ways away from the 5503. Even the Vera isn't near it save for the number of voices (though maybe we'll get something like it in Vera 2.0)

But given GUS is also something that comes up, it might be simpler to emulate such behavior using a GUS style card instead (akin to making "chiptunes" in a 90's tracker such as Impulse Tracker). Won't sound exactly the same (digital mixing and interpolation) but I'd imagine a GUS would be far more adapted than a random voice card.

To be clear I don't think a filter card would get much adoption either haha but it'll be nice to have a solution ready to go just to offer _something_ when someone chimes in about "does it have SID?" - the retro equivalent to "but can it play Jump?" of synthesizers.

 


My take on a "SID 2.0" (hint: it's the filter)

Posted: Sat Nov 19, 2022 6:03 pm
by neutrino

GB = Game Boy ?

LSDJ = Little Sound DJ a homebrew cartridge designed for the original Nintendo Game Boy?

TG16 = TurboGrafx-16 ?

GUS = Gravis Ultrasound ?

Why not go for at least 8-bit if not 16-bit? memory is cheap now. Also at least 16 voices would be good as this was an obstacle both with the C64/SID and Amiga/Paula. And no restriction which waveform each voice are capable of.

Any filter can be replaced by a DSP or perhaps even a fast MCU for those on the cheap. I just thought it might be interesting to explore what if? a SID out of digital components with an analog frontend would sound like? (which we would have known by now if Pantazopoulos hadn't died). The only catch is really that any schematic will not tell how the leaks inside the chip were "wired" up.

 


My take on a "SID 2.0" (hint: it's the filter)

Posted: Sat Nov 19, 2022 6:45 pm
by m00dawg

Yes all those acronyms are correct. To elaborate a but on the GUS, it comes up a lot on Discord because the VERA's PCM requires a lot of hand-holding by the CPU. GUS has hardware mixing (among other things) and its own patch RAM and offloaded all that from the CPU. Was a really fun card to use from the late 90's PC era and for the X16 would pretty much take care of a ton of digital audio. I think maybe an 8-bit version of that would be a better fit.

Which brings me to "why not 16-bit" - I certainly could. In fact the Vera outputs really clean fairly high bitrate (though I forget what the bitrate is offhand) waveforms at a pretty high samplerates as I recall. Almost too clean. Part of why I made the GB Voice eurorack module was to capture all the aliasing of the 4-bit gross waveforms on purpose. It produces a unique sound with plenty of grit. I already have a really capable wavetable module (the Modbap Osiris) in my rig. One of its shortcomings is the "low fidelity" mode doesn't really sound quite the same.

One can _definitely_ go full hifi. The DSP/MCU idea is pretty much realized in the Electrosmithy Daisy I mentioned. It's the beating heart of several Eurorack modules (Osiris included) and some standalone synths. It could easily form the core of an extremely hifi solution. Teensy and Arafruit's Trinket M4 would also be good candidates, though the Daisy platform has a bunch of helper libraries specifically for sound synthesis and effect processing.

But back to the SID, I think the VERA + filter board covers the "a SID out of digital parts with an analog filter" pretty well, though it's more "SID-like" than a close copy. My filter board is probably lacking in having some overdrive to add a bit of grit from the SID. Much like the X16 is a spiritual successor to the VIC-20, X16 + filter is more like a spiritual successor to the SID. For what I was going after, that fits the bill.