Poor MOS6560, it could so much better outside a VIC-20!
For chipsounds 1.0, I got the help of eslapion from the Denial forum to analyze the RC filter output of the VIC-20. Eslapion got me to learn how to understand the link between the resistors and capacitors and how to extract the exact low pass filter coefficients that was needed to implement in DSP. It simply turns out to be a 1.6Khz one pole low pass filter. (third party confirmation here).
Such a low cutoff makes for one REALLY DULL sounding chip
But that's not the only sound coloration present on the real VIC. There is also quite a bit of clipping going on when all voices play at once. This clipping does add quite a bit of character when there are a combination of more than one pulse voices playing, as well as the noise channel.
Lets look at the phenomenon on a scope:
Quoting Eslapion:
"The specs sheet of the 6560 specifies the audio pin has an output impedance of 1kOhms. This impedance interacts with C9 (0.01uF) to create a 1st order low pass filter of 15.9kHz.
This is followed by R8 (1kOhms) and C10 (0.1uF) which combine to create another 1st order filter of 1.6kHz.
In other words, these two filters combine to provide a 20dB/decade attenuation from 1.6kHz to 16Khz and then 40 dB/decade above that.
Q1 acts as a current multiplier to ensure enough driving power on the final output but, as we can see, R27 acts as a pull down only device and there is no biasing. The output of the 6560, multiplied by Q1 pulls up and R27 pulls down.
Add to that, the fact that the volume control induces a DC offset.
DC offset values for register 36878: (average) (values picked after R8)
0:4.06
1:4.17
2:4.28
3:4.41
4:4.53
5:4.64
6:4.76
7:4.86
8:4.95
9:5.06
10:5.17
11:5.27
12:5.37
13:5.47
14:5.56
15:5.64
This DC offset, on the final output, is cancelled out by C11 which combines with R27 to create a high pass filter of 339Hz with 20dB/decade attenuation. Therefore, when no sound is playing there is no way to tell on the output that a DC level forms on the base input of Q1 as the volume is increased.
If the 6560 is going to pull up in DC when the volume rises then the maximum excursion of a sound wave is limited by a combination of the pull down current (set by R27) as well as the voltage feed which, in this specific case is 0 to 5volts. When the volume goes above a certain level, clipping of the positive side of the wave occurs as the 6560 attempts to pull up above 5V.
This clipping effect is even more intense when playing multiple voices simultaneously as their combined excursion adds to each other.
Obviously, the smallest amount of clipping occurs when the DC offset provides a DC level of 2.5V on the base of Q1. This is achieved when setting the volume level to 8.
Now, looking at the rise and fall time of the signal taken directly at pin 19 of the 6560, we see that the rise time is much greater than the fall time. Considering the effect of Q1, as seen by the 6560, R27 should appear as about 100 times greater.
This asymetrical voltage change is caused by the diode in the base of Q1 which can draw current on voltage rise but not give back any on the falling edge. This causes C9 and C10 to charge slowly as Q1 "steals" current used to charge these capacitors but not restore it when the 6560 discharges them. This assymetrical time constant is less dramatic on the actual output as C10 and C11 are still discharging at the very instant C9 appears to be empty."
Heres an audio capture form the final analog output of the VIC-20 CR:
Clipping sound
So there you have it!
The VIC emulation im working on for 2.0 includes that clipping and filtering and is starting to sound very close to the real thing.... stay tuned
Ongoing Research and Development for Plogue's 'retro digital' products: chipsounds, chipspeech and chipcrusher .... and various retro computing stuff.
Friday, September 10, 2010
Saturday, August 21, 2010
X marks the spot!
People following my twitter might have been wondering what that Canadiana Road Trip stuff was a'boot yesterday. It was about salvaging a pile of 50 arcade boards from certain death.
My Pirate Map pointed to a secret location near Ottawa, Ontario, so went, dug up, and found the treasure!
(yes that's the trunk of MY CAR)
A quick evaluation can be made to about 65 soundchips on these. (some boards do have more than one). I don't know WHEN I'll get time to go through the good, the bad and the awesome. What works and whats useless, but there you go.
Each board is different (except two MS Pacman boards, but i will NOT complain here, lets just hope I can get one running, even it if means cannibalizing the other)
chipsounds 2.0 R&D really REALLY doesn't need more chips at this point....
well there's ... oh hell...
My Pirate Map pointed to a secret location near Ottawa, Ontario, so went, dug up, and found the treasure!
(yes that's the trunk of MY CAR)
A quick evaluation can be made to about 65 soundchips on these. (some boards do have more than one). I don't know WHEN I'll get time to go through the good, the bad and the awesome. What works and whats useless, but there you go.
Each board is different (except two MS Pacman boards, but i will NOT complain here, lets just hope I can get one running, even it if means cannibalizing the other)
chipsounds 2.0 R&D really REALLY doesn't need more chips at this point....
well there's ... oh hell...
Friday, August 6, 2010
30 Minute JAMMA SuperGun Audio test
I use MAME differently than you I'm pretty sure. You can sort games by name, company, date, but usually I sort entries by 'sound'. For a guy like me, its both salivating and dangerous... for my finances.
There are a few sound chip gems that are only found on obscure PCBs. However, a side effect of the omnipresence of MAME is to somewhat lower the price on used game PCBs on Ebay. Why would you have this 20+ year old board around in a wooden box when you can play the game on your PC or some MAME'ed cabinet?
When you're a sound chip freak its not a question of course. Since I cant put myself to loan a van just to shove an Arcade cabinet into the office (not that it wouldn't be nice to have a Shinobi or Splatterhouse around). It just wouldn't be convenient.
I'm contemplating starting a collection of PCBs, to get new chips, but also just to get a few spares. Recently I acquired a 10$ game from a local Ebay seller, a really crappy Jap quiz game to get an extra YM2413.
Friday after work, bored, Ok should I trash this board and get the chip from it? Or, wait a minute... there must be something to play this thing for cheap! And of course there is ... A SuperGun!
Two minute googling and I found this very well done document on building a home made JAMMA harness. Cool, but i just want to HEAR the intro tune, not to see and play it!
I had about 5 more or less useless PC casings at home, so I looked around for one which had a suitable PSU (read working +5v,-5v +12v). (it allowed me to sort through them at last and thrash two deabeats, ... missus is happy)
15 Minutes soldering and it worked.
That is JUST a test of course, I'll surely hook all that with two joysticks an fake coin slots on the PC case in the future. And of course proper video outs.
Or.. maybe I should go back to sound R&D...
More later
There are a few sound chip gems that are only found on obscure PCBs. However, a side effect of the omnipresence of MAME is to somewhat lower the price on used game PCBs on Ebay. Why would you have this 20+ year old board around in a wooden box when you can play the game on your PC or some MAME'ed cabinet?
When you're a sound chip freak its not a question of course. Since I cant put myself to loan a van just to shove an Arcade cabinet into the office (not that it wouldn't be nice to have a Shinobi or Splatterhouse around). It just wouldn't be convenient.
I'm contemplating starting a collection of PCBs, to get new chips, but also just to get a few spares. Recently I acquired a 10$ game from a local Ebay seller, a really crappy Jap quiz game to get an extra YM2413.
Friday after work, bored, Ok should I trash this board and get the chip from it? Or, wait a minute... there must be something to play this thing for cheap! And of course there is ... A SuperGun!
Two minute googling and I found this very well done document on building a home made JAMMA harness. Cool, but i just want to HEAR the intro tune, not to see and play it!
I had about 5 more or less useless PC casings at home, so I looked around for one which had a suitable PSU (read working +5v,-5v +12v). (it allowed me to sort through them at last and thrash two deabeats, ... missus is happy)
15 Minutes soldering and it worked.
That is JUST a test of course, I'll surely hook all that with two joysticks an fake coin slots on the PC case in the future. And of course proper video outs.
Or.. maybe I should go back to sound R&D...
More later
Wednesday, July 21, 2010
Friday, June 18, 2010
ZIF socketed C64 for SID chip swap
ZIF (Zero insertion force) sockets are a great way to reduce the wear on chip pins when you need to swap them often, which is as you've guessed what I need.
A simple 28PIN ZIF socket like this:
Can be used to quickly swap SIDs to run tests.

Video:
A simple 28PIN ZIF socket like this:

Video:
Friday, June 4, 2010
Monday, May 31, 2010
I'll get you 1771!
A full day spent figuring that chip's sound generation again. Recorded the two separate output pins in a multitude of ways, but there seems to be signal bleed whatever I try (even removing the chip and lifting one of the pins of its socket from the circuit)
This is not your typical PSG.
Friday, May 28, 2010
uPD1771C noise puzzle
LFSR feeding a delta-modulated logarithmic DAC???
Evil 80's reverse engineering protection???
Alien message?
Wednesday, May 26, 2010
.plan (audio version)
Anyone old enough to remember what a .plan file is?
I just got the idea of making a status update on what im working on, in audio form. These will not come with any explanations whatsoever. They might be current bugs, new features, tests or experiments from code im currently working on...
Here's the second one.
I'll twitter any updates to it as I go along (twitter.com/plgDavid)
I just got the idea of making a status update on what im working on, in audio form. These will not come with any explanations whatsoever. They might be current bugs, new features, tests or experiments from code im currently working on...
Here's the second one.
I'll twitter any updates to it as I go along (twitter.com/plgDavid)
Thursday, May 13, 2010
The one page BASIC SID Benchmark.
How do you make sure the SIDs you bought from Ebay are fully working before giving feedback?
Or, you are the seller and you want to claim "100% fully working SID all voices. All Filters guaranteed!" and double check your stuff before you send the chips?
How do you make sure the SIDs that are in the old C64 in your dad's basement works before attempting a MIDIBox SID, sammichSID or other similar project? (Or midway through the project your dodgy soldering skills makes you wonder if you just blew out your 50$ SID?)
You find certain .sid files sound ODD on your setup and you want to be sure all waveforms of all channels sound good across the entire frequency range?
You want to make sure the filters are behaving within tolerance, or you want to quickly compare its frequency response with a third party?
or...
You are a nerd that does SID research, collect SIDs like Pokemons and compare each of them with scopes and frequency analyzers?
A: Sure I'm interested, but I don't have any fancy cart, X1541 transfer hardware. I only a bare C64 and a TV!
Then welcome to the world of BASIC program retyping!
This plays a sweep of every waveform on every channel like this:
Note: (T=Triangle, S=Saw, P=Pulse, N=Noise)
Next it does a filter sweep(resonance off) from all three channels with Noise
Low Pass (voice1, voice2, voice3)
Band Pass (etc)
High Pass
To my knowledge there is no other SID benchmark that is both relatively thorough and fast to type. This however does not test Pulse Width Modulation sweeps, ring mod or hard sync, and these could be part of a more in depth Benchmark, which I could code in assembler directly, and if there is enough demand, even make a 8KB ROM image in order to quickly use it with the various EPROM carts on sale on Ebay.
Closest thing I found is referenced from here. But it doesn't test sweeps nor all waveforms.
Also Mssiah users have access to a built in "Audio Test" which tries all voices and filter modes. But again, no help to you if you dont have that cartridge.
Proper steps for non C64-literate people:
Make sure nothing previously ran on your C64, or hit run/stop restore to make sure and type the following in:
type 'run'
If the test goes through without errors, it means you've probably typed it properly. Maybe its time to SAVE it! (You don't want to type this for all your SIDs right?)
using a 1541:
Note If you want better audio quality you can add these lines which will turn off the VIC chip (thanks to Lord Nightmare's SID Filter measurement code for the tip)
Alternatively:
If you have a X1541 transfer cable, get the D64 image
If you own a Commodore datasette, you can record this WAV file onto a cassette deck and play it on your c64. (note might have to invert phase in your favorite sound editor depending on your setup).
IMHO it surely beats randomly playing a few SIDs and affirming your chip is right.
Bonus points: you can test it in your favorite emulator to see how much aliasing it adds to the normal SID waveform generation's natural aliasing. Compare the audio results of the various SID settings in your emulator, etc.
So this post would not be complete without a few reference runs from some of my own chips.
Correct chips (NOTE these are NTSC recordings, PAL will have slightly different pitch):
6581R4AR (6581R4 AR 3086 S PHILIPPINES - see picture) Notes: (Brown C64) My 6581 reference for heavy filters.
6581CBM (6581CBM AR 2485 KOREA AH224867) Notes: (Brown 250407 C64) weird amplitude modulation in _PS_ wavform (seen this a few times on R2 and R3s)
8580R5 (8580R5 4887 25 HONG KONG HH465216 HC-30 - not pictured)
) Notes: (9V C64C) typical 8580, combined waveform are all audible, smooth filter.
Faulty chips:
6581_remarked2 (see remarked sid #2 in image) Notes: (Brown 250407 C64) quiet Low Pass filter, Near pass-through BP/HP
6581_remarked3 (see remarked sid #3 in image) Notes: (Brown 250407 C64) quiet LP/HP. Near pass-through HP.
EDIT January 2013: More Tests:
http://www.lemon64.com/forum/viewtopic.php?t=45909
Sad thing those remarked SIDs, I guess a whole subject in itself. People: there are no NOS SID chips anywhere now get it? Anything you buy as such should be taken with extreme caution. Please use this benchmark as a guide.
I agree with Wilba here, if the SIDs are FULLY tested, then I don't care if they are remarked or not "new old stock" as long as they are sold as such. SIDs are getting rare, this might be the only chance for some people to get their hands on SIDs...
Well not counting cannibalizing one of the 30 million C64's sold that is...
Or, you are the seller and you want to claim "100% fully working SID all voices. All Filters guaranteed!" and double check your stuff before you send the chips?
How do you make sure the SIDs that are in the old C64 in your dad's basement works before attempting a MIDIBox SID, sammichSID or other similar project? (Or midway through the project your dodgy soldering skills makes you wonder if you just blew out your 50$ SID?)
You find certain .sid files sound ODD on your setup and you want to be sure all waveforms of all channels sound good across the entire frequency range?
You want to make sure the filters are behaving within tolerance, or you want to quickly compare its frequency response with a third party?
or...
You are a nerd that does SID research, collect SIDs like Pokemons and compare each of them with scopes and frequency analyzers?
A: Sure I'm interested, but I don't have any fancy cart, X1541 transfer hardware. I only a bare C64 and a TV!
Then welcome to the world of BASIC program retyping!
This plays a sweep of every waveform on every channel like this:
___T (voice1, voice2, voice3) __S_ (voice1, voice2, voice3) __ST (etc...) _P__ _P_T _PS_ _PST N___
Note: (T=Triangle, S=Saw, P=Pulse, N=Noise)
Next it does a filter sweep(resonance off) from all three channels with Noise
Low Pass (voice1, voice2, voice3)
Band Pass (etc)
High Pass
To my knowledge there is no other SID benchmark that is both relatively thorough and fast to type. This however does not test Pulse Width Modulation sweeps, ring mod or hard sync, and these could be part of a more in depth Benchmark, which I could code in assembler directly, and if there is enough demand, even make a 8KB ROM image in order to quickly use it with the various EPROM carts on sale on Ebay.
Closest thing I found is referenced from here. But it doesn't test sweeps nor all waveforms.
Also Mssiah users have access to a built in "Audio Test" which tries all voices and filter modes. But again, no help to you if you dont have that cartridge.
Proper steps for non C64-literate people:
Make sure nothing previously ran on your C64, or hit run/stop restore to make sure and type the following in:
120 v(0)=54272:v(1)=54279:v(2)=54286 130 poke54296,15:fori=0to2 140 pokev(i)+3,8:pokev(i)+1,0 150 pokev(i)+5,8:pokev(i)+6,198:next 160 fora=16to128step16:fori=0to2 170 if a>64 then pokev(i)+3,0 180 pokev(i)+4,a+1 190 forf=0to254step2:pokev(i)+1,f:nextf 200 pokev(i)+4,a:forw=0to200:nextw 210 pokev(i)+4,8:pokev(i)+1,0 220 nexti,a:a=1 230 fori=0to2:pokev(i)+1,255 240 poke54296,(a*16)+15:poke54295,2^i 250 pokev(i)+4,129 260 forf=0to255:poke54294,f:nextf 270 pokev(i)+4,136:nexti 280 a=a*2:if a<8 then goto 230 310 poke54295,0(note at the end of line 240, the "^" character is a arrow pointing up on a C64, check listing picture)
type 'run'
If the test goes through without errors, it means you've probably typed it properly. Maybe its time to SAVE it! (You don't want to type this for all your SIDs right?)
using a 1541:
save"sidbench1",8,1using a datasette:
save"sidbench"and follow the instructions.
Note If you want better audio quality you can add these lines which will turn off the VIC chip (thanks to Lord Nightmare's SID Filter measurement code for the tip)
100 poke53280,0: poke53281,0 110 poke53265,11 290 poke53265,27 300 poke53280,254:poke53281,246
Alternatively:
If you have a X1541 transfer cable, get the D64 image
If you own a Commodore datasette, you can record this WAV file onto a cassette deck and play it on your c64. (note might have to invert phase in your favorite sound editor depending on your setup).
IMHO it surely beats randomly playing a few SIDs and affirming your chip is right.
Bonus points: you can test it in your favorite emulator to see how much aliasing it adds to the normal SID waveform generation's natural aliasing. Compare the audio results of the various SID settings in your emulator, etc.
So this post would not be complete without a few reference runs from some of my own chips.
Correct chips (NOTE these are NTSC recordings, PAL will have slightly different pitch):
6581R4AR (6581R4 AR 3086 S PHILIPPINES - see picture) Notes: (Brown C64) My 6581 reference for heavy filters.
6581CBM (6581CBM AR 2485 KOREA AH224867) Notes: (Brown 250407 C64) weird amplitude modulation in _PS_ wavform (seen this a few times on R2 and R3s)
8580R5 (8580R5 4887 25 HONG KONG HH465216 HC-30 - not pictured)
) Notes: (9V C64C) typical 8580, combined waveform are all audible, smooth filter.
Faulty chips:
6581_remarked2 (see remarked sid #2 in image) Notes: (Brown 250407 C64) quiet Low Pass filter, Near pass-through BP/HP
6581_remarked3 (see remarked sid #3 in image) Notes: (Brown 250407 C64) quiet LP/HP. Near pass-through HP.
EDIT January 2013: More Tests:
http://www.lemon64.com/forum/viewtopic.php?t=45909
Sad thing those remarked SIDs, I guess a whole subject in itself. People: there are no NOS SID chips anywhere now get it? Anything you buy as such should be taken with extreme caution. Please use this benchmark as a guide.
I agree with Wilba here, if the SIDs are FULLY tested, then I don't care if they are remarked or not "new old stock" as long as they are sold as such. SIDs are getting rare, this might be the only chance for some people to get their hands on SIDs...
Well not counting cannibalizing one of the 30 million C64's sold that is...
Monday, April 19, 2010
BLIP 2009 Presentation now online!
Hi
Here is the presentation I made at the 2009 edition of BLIP Festival, in Brooklyn New York last December. I've tried to squeeze as much info as possible in there, so it might be a challenge to follow especially considering I didnt have a microphone, so the camera just picked lots of ambiant noise (most of which has been DSP'ed out fwiw)
Thanks a lot for Max Deland for the video editing, and of for his fabulous Prezi presentation work.
PART1:
PART2:
PART3:
PART4:
We also have a yet to edit [XC3N] presetation of chipsounds been put at test in the Renoise Tracker. We will add it to the playlist when its edited and cleaned.
Here is the presentation I made at the 2009 edition of BLIP Festival, in Brooklyn New York last December. I've tried to squeeze as much info as possible in there, so it might be a challenge to follow especially considering I didnt have a microphone, so the camera just picked lots of ambiant noise (most of which has been DSP'ed out fwiw)
Thanks a lot for Max Deland for the video editing, and of for his fabulous Prezi presentation work.
PART1:
PART2:
PART3:
PART4:
We also have a yet to edit [XC3N] presetation of chipsounds been put at test in the Renoise Tracker. We will add it to the playlist when its edited and cleaned.
Thursday, April 1, 2010
Next Bidule version has something special....
You will be able to reproduce pretty much any type of LFSR based noises and tones. From simple Atari TIA tones to the more complex Noise waveform of the SID, as documented by Marko Makela and Asger Alstrup, in an interactive way.
Subscribe to:
Posts (Atom)










