Author |
Message |
factus10
Joined: Jun 20, 2007 Posts: 158 Location: Buffalo, NY
|
Posted: Thu Jan 31, 2008 5:18 pm Post subject:
AY-3-8910/12/13 "module" |
|
|
I've been thinking about building an AY-3-8910 module for a year or so and finally started laying out a schematic over the past few weeks. I'm still deciding how many knobs, etc, to put on it but it'll also have a PIC that'll receive MIDI for it (and drive the display, A/D the knobs, etc). Eventually I'll probably also add MIDI send (to d/l sysex).
Am I the only one crazy enough to want such a thing? |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Feb 04, 2008 3:06 pm Post subject:
Re: AY-3-8910/12/13 "module" |
|
|
factus10 wrote: | Am I the only one crazy enough to want such a thing? |
It seems so...
But no, I think it sounds like a fun project and you should just go right ahead and do it
DJ
-- |
|
Back to top
|
|
|
v-un-v
Janitor
Joined: May 16, 2005 Posts: 8933 Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1
|
Posted: Mon Feb 04, 2008 3:39 pm Post subject:
|
|
|
To be honest, I always thought that the AY chip was just a watered-down version of the SN76477 chip. A friend of mine had a BBC micro which had an AY in it, and I thought it sounded awful.
You may very well be mad, but otoh.......... _________________ ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN. |
|
Back to top
|
|
|
DrJustice
Joined: Sep 13, 2004 Posts: 2114 Location: Morokulien
Audio files: 4
|
Posted: Mon Feb 04, 2008 5:31 pm Post subject:
|
|
|
For what ist's worth, natively the BBC had an SN76489 which had three counter based squarewave oscillators and a noise source, each with an amplitude control. The AY-3-8910, which was similar, but a bit more advanced, was used in a lot of the early home computers like Atari and ZX Spectrum. The SN76477 was more or less a simple analog synth voice.
Anyway, they're all the stuff of good memories
DJ
-- |
|
Back to top
|
|
|
factus10
Joined: Jun 20, 2007 Posts: 158 Location: Buffalo, NY
|
Posted: Tue Feb 05, 2008 8:46 am Post subject:
|
|
|
The AY had some advantages (and disadvantages) in relation to its peers. It's SID-like not as powerful but it's been a while since I've programmed the SID. And it has slightly better envelope control than the 76489.
It was used in MSX computers, Atari ST (and later), the Orchestra 90 cart for the Radio Shack Color Computer, Spectrum, and the Mockingboard (a synth for the Apple that used 3 AY chips). Apparently it was wildly popular in arcade games.
Thanks for turning me on to the 76489. Another potential project |
|
Back to top
|
|
|
v-un-v
Janitor
Joined: May 16, 2005 Posts: 8933 Location: Birmingham, England, UK
Audio files: 11
G2 patch files: 1
|
Posted: Tue Feb 05, 2008 10:53 am Post subject:
|
|
|
factus10 wrote: | Apparently it was wildly popular in arcade games.
|
Only because nothing else was available on the market at that time. It (the AY) was programmable via logic rather than VC. This made it far more popular at the time. Essentially the output is a mixture of squarewave and psuedo-random noise. The 'envelopes' were very basic.
What Commodore were doing at the time was revolutionary, and that's the main reason that their chip survived. The SN76477 has also survived because it had V.C. and of course what people like Blacet and TH have done with that chip is legendary.
You wanna make an AY sound box? Hey, I'm not gonna stop you _________________ ACHTUNG!
ALLES TURISTEN UND NONTEKNISCHEN LOOKENPEEPERS!
DAS KOMPUTERMASCHINE IST NICHT FÜR DER GEFINGERPOKEN UND MITTENGRABEN! ODERWISE IST EASY TO SCHNAPPEN DER SPRINGENWERK, BLOWENFUSEN UND POPPENCORKEN MIT SPITZENSPARKSEN.
IST NICHT FÜR GEWERKEN BEI DUMMKOPFEN. DER RUBBERNECKEN SIGHTSEEREN KEEPEN DAS COTTONPICKEN HÄNDER IN DAS POCKETS MUSS.
ZO RELAXEN UND WATSCHEN DER BLINKENLICHTEN. |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Fri Feb 15, 2008 6:55 pm Post subject:
|
|
|
Sounds like a project that would be worth the time simply due to the fact that you are keeping "alive" some of those god old chips from the 80's. Sure you could not only use that PIC for the MIDI control, BUT, could also do the sound generation better than the AY chip. That would take the fun out of using that vintage chip you have always wanted to play with.
I believe you can play a trick with the AY-89xx chips by setting an oscillator with a zero frequency value and then command a series of VOLUME messages to have it act as a low resolution DAC. Then you can do simple speech and other sampled sound FX
I have about 20 of these chips in my stash !!!
Quote: | Although the chip wasn't designed to handle raw PCM data (digital samples), the effect could be simulated. The chip used a simple OR based mixing function for combining noise and tone on its three channels and could be persuaded to produce a level non-zero wave. By altering the volume this level wave could be shaped into a waveform. Obviously, this involved more CPU usage than chips designed for this purpose (such as the MOS Technology 8364 "Paula" as used in the Commodore Amiga), but it was nevertheless a technique widely used on platforms such as the Atari ST to play sampled music, and on the Amstrad CPC to play short audio samples, in some games. |
Bill |
|
Back to top
|
|
|
CJ Miller
Joined: Jan 07, 2007 Posts: 368 Location: 127.0.0.1
|
Posted: Thu May 08, 2008 4:00 pm Post subject:
|
|
|
I agree that a PIC or other decent MCU is overkill for such a project, since such chips could just as easily replace the AY itself anyway. But they are still cool chips, especially if you love olde schoole square wave chip tunes. For instance I have random 8085 and 8088 processors in my junk box so it could be a fun excuse to put something together. Maybe ADCs for analog-controlled chip tunes would be fun.
I found 12 AY-3-8910 and 1 8912 for $5.50 last week, and figured they were worth the minimal cost to play with. I agree that the SID is way more robust, if anybody has 12 of *those* they want to sell me for $5.50, let me know! ;]P |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Thu May 08, 2008 5:47 pm Post subject:
|
|
|
Quote: | found 12 AY-3-8910 and 1 8912 for $5.50 last week, and figured they were worth the minimal cost to play with. I agree that the SID is way more robust, if anybody has 12 of *those* they want to sell me for $5.50, let me know! ;]P |
Wow, CJ !!! Good price on those ! Yes, it is hard to get those SID chips ...... I have one spare SID chip in my chip collection lucky for me Unfortunately it does no good showing it off sitting in a block of black foam so I really should build something with it. I have 5 others but they are in Commodore computer systems.
Bill |
|
Back to top
|
|
|
Tony Deff
Joined: May 25, 2008 Posts: 51 Location: Suffolk, UK
|
Posted: Sun May 25, 2008 2:31 am Post subject:
Overcoming the flaws of the 8910 |
|
|
Wow! Someone else is still using the AY-3-8910.
I hung onto a couple of these out of sentimentality, but in truth they are fatally flawed, musically.
Because the clock input (which is already severely limited in frequency) is divided by a prescalar of 16, the remaining programmable divisor to obtain the required note is too small to get a pitch precise enough for equal temperament (except perhaps for bass notes).
To get around this problem, I used the Just Scale in a design published in ETI in 1989 for a polyphonic doorbell (!)
It belted-out an impressive version of Star Wars, complete with phasing noise effect.
The circuit used a Z80 and PROM (but no RAM) and used the register codes of the 8910 chip to implement a compact (1K) "interpreter".
To use this interpreter, the user entered simple single-byte or dual-byte codes which would set-up the required registers or implement software routines.
A single byte would, for example, set the required divisor for middle-C in any of the 3 divisors, whilst another single byte would set-up the registers to implement an attack and then delay for the required note-time. Sub-routines without RAM are possible by exploiting the Z80's rich register set, and this allowed whole chunks of music to be repeated in just a few bytes of coding.
I kept the 8910s wondering if the crude D-to-A converters would be useful to bias a wide-ranging phase-locked-loop quickly into the required frequency range.
Pity I got rid of all the spare PCBs a couple of years ago! |
|
Back to top
|
|
|
blue hell
Site Admin
Joined: Apr 03, 2004 Posts: 24085 Location: The Netherlands, Enschede
Audio files: 278
G2 patch files: 320
|
Posted: Sun May 25, 2008 9:12 am Post subject:
|
|
|
Tone-Deaf,
never would have expected to hear about a new (for me) z80 trick after, what is it ... 20 years or so _________________ Jan
also .. could someone please turn down the thermostat a bit.
|
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Sun May 25, 2008 7:19 pm Post subject:
|
|
|
Quote: | Because the clock input (which is already severely limited in frequency) is divided by a prescalar of 16, the remaining programmable divisor to obtain the required note is too small to get a pitch precise enough for equal temperament (except perhaps for bass notes). |
Yes, I agree and did some calculations too see just how bad it is. Unfortunately, GI used a simple count down divider rather than a phase accumulator based DCO for obvious reasons, it would have too costly to implement that sort of integration for the device.
Given the frequency equation for the device is:
Ftone=(2 * 10^6)/(16 * TONE_PERIOD)
Where Ftone is the output frequency of one channel, the input clock is set at 2 MHz, and TONE_PERIOD is the 12 bit tune word that is latched into the device to set the desired frequency which is 1 to 4095.
When comparing the output frequency to a standard chart of notes verses frequency, you see that the chip is fairly accurate to B5 or 987.766 HZ. A value of 127 stuffed into the tune register will yield a tone frequency of 984.252. Not too bad but any tune values below 127 start to go horribly bad (smaller tune word values yield higher frequencies) and the accuracy becomes intolerable for anything musical. This certainly makes it a very good, accurate, bass generator but for frequencies higher than 1KHz, you would need to tweak the clock frequency into the device to something a bit higher. OK, so we all over-clock our CPU's right? Why not slightly overclock this sound generator a bit to get more accuracy out of it?
I have attached a text file of a table I calculated with the first column being the tune word and the second column being the frequency output using a clock input of 2 MHz. Ignore the last column. The title of the file will has the clock frequency for ID purpose.
If the input clock were just a bit higher at 2.007140512 MHz (Tunable type oscillator, a bunch are out there) we would yield a frequancy of 987.766 HZ when a tune word value of 127 were used. No error there now ...
So, with all of this, I would say experimenting with a clock just over the 2 MHz limit may make this chip more musical at the higher frequencies above B5 ....... You could strike a good middle ground and maybe get away with synthesizing only one or two frequencies above 2 MHz to get good results across the audio band without any tricks at all.
The second example table uses a clock frequency of 2.007140512 MHz instead of 2 MHz to show how the higher frequency already helps the higher end and still maintains a very good low end accuracy. Take a peek at 127, now it's right at the right frequency for note B5
Get your graphing calculators out and see for yourself and find the sweet spot for the input clock!!!
Bill
Description: |
|
Download |
Filename: |
2MHZ_CLK_TABLE.txt |
Filesize: |
97.09 KB |
Downloaded: |
394 Time(s) |
Description: |
|
Download |
Filename: |
2.007140512MHZ_CLK_TABLE.txt |
Filesize: |
97.12 KB |
Downloaded: |
266 Time(s) |
|
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Sun May 25, 2008 7:26 pm Post subject:
|
|
|
Quote: | Because the clock input (which is already severely limited in frequency) is divided by a prescalar of 16, the remaining programmable divisor to obtain the required note is too small to get a pitch precise enough for equal temperament (except perhaps for bass notes). |
I just realized, with a name like Tone-deaf, why would you care about frequency accuracy ............
OK, throw the tomatoes at me now ....
Bill |
|
Back to top
|
|
|
Tony Deff
Joined: May 25, 2008 Posts: 51 Location: Suffolk, UK
|
Posted: Wed May 28, 2008 3:21 pm Post subject:
Accuracy & tone-deafness |
|
|
Quote: | I just realized, with a name like Tone-deaf, why would you care about frequency accuracy ............ Laughing
OK, throw the tomatoes at me now ....
|
I am new at this and do not know where to find Tomato Emoticons. Would a Cherry do?
Merde, ce n'est pas la même chose. Oh for ze Good Old Days!
I thought sooner or later someone would cotton-onto that anomaly.
It comes about from my pretensions at being an amateur composer, thwarted by being unable to determine whether that melody I am thinking of goes down a semitone or up a third. I was thinking of making a device you whistle at, and a LED illuminates on a stave, indicating its pitch. Then I found a pitch-trainer on the web (and guessed every interval incorrectly).
As for the 8910, I thought 2MHz was already well over-clocking.
I was naive enough to believe their figure of 1.76MHz. |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Thu May 29, 2008 1:18 pm Post subject:
|
|
|
Quote: | As for the 8910, I thought 2MHz was already well over-clocking.
I was naive enough to believe their figure of 1.76MHz. |
The data sheet, I thought, says that the frequency boundry should be from MIN=1.76 to MAAX=2.0 MHz thus 2 MHz would actually not be overclocking but certainly close to it . Anyhow, it would make for an interesting experiment to see if one could go above the 2 MHz upper frequency limitation a bit to "fix" the top end of the frequency generator as I explained in detail on my previous post.
Bill |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Thu May 29, 2008 1:19 pm Post subject:
|
|
|
Quote: | Merde, ce n'est pas la même chose. Oh for ze Good Old Days! |
|
|
Back to top
|
|
|
factus10
Joined: Jun 20, 2007 Posts: 158 Location: Buffalo, NY
|
Posted: Fri May 30, 2008 10:47 am Post subject:
|
|
|
I recall the tuning issue when I first contemplated this a number of years back. In one of my notebooks, I have a table of the various note/register values for whatever osc I had chosen.
I'll have to go take another look at the Orchestra-90 cart for the Radio Shack Color Computer to see what clock they used. As I recall, the shortened version of William Tell built into it didn't sound that off _________________ Nothing succeeds like excess. |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Fri May 30, 2008 12:36 pm Post subject:
|
|
|
Quote: | I'll have to go take another look at the Orchestra-90 cart for the Radio Shack Color Computer to see what clock they used. As I recall, the shortened version of William Tell built into it didn't sound that off Smile |
Most probably not that "off", I agree, as the frequencies were most likely kept at 1 KHz to 2 KHz or below. If you look at the equation I write in the post, you see that you will get significant frequency tuning error at the higher registers (lower tuning word values) simply because of the topology of the circuit design. A simple down counter is all they used ............ I believe you concur with that
Quote: | I recall the tuning issue when I first contemplated this a number of years back. In one of my notebooks, I have a table of the various note/register values for whatever osc I had chosen. |
Would like to see if you recall that data. I wish I had this chip on my prototype board and play with various clocks and tuning words. I'll bet you can get that clock above 2 MHz and solve all thos nasty mistunings at the higher frequencies !
Bill |
|
Back to top
|
|
|
Tony Deff
Joined: May 25, 2008 Posts: 51 Location: Suffolk, UK
|
Posted: Sun Jun 01, 2008 1:22 pm Post subject:
Subject description: The right frequency plus the right divisor |
|
|
When choosing the clock frequency and the divisor, bear in mind the intervals between the notes.
For any single note, you can optimize either as you wish; if the 8910 could be forced to gallop at 2.4576 MegaSquirtz, then a divisor of 311 will give you an excellent B = 7902.
If you want a series of notes in a reasonable semblance of the equal-temperament scale, then one of the well-known divisor sets must be chosen, otherwise all sorts of scaling errors and/or locked intervals can occur.
For example, you have found a good B = 987.766 with a register value of 127. The register value of 142 gives you A = 883.425, but that means the step from A-B is 6.7 cents too small.
Sorry to be a kill-joy, but I think we should keep our fond memories and bid the 8910 farewell.
The 8253 has 3×16-bit dividers that can operate at 8 MegaSquirtz
The ML2867 can operate up to 27MHz. and has a 64-poly synth with General Midi set. Will one day we be looking-back senimentally at this? |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Sun Jun 01, 2008 1:37 pm Post subject:
|
|
|
Quote: | Sorry to be a kill-joy, but I think we should keep our fond memories and bid the 8910 farewell. |
That all depends on how you look at it Thanks for the comments though .......
Bill |
|
Back to top
|
|
|
factus10
Joined: Jun 20, 2007 Posts: 158 Location: Buffalo, NY
|
Posted: Mon Jun 02, 2008 7:04 pm Post subject:
|
|
|
Heh... high fidelity isn't exactly my goal in this _________________ Nothing succeeds like excess. |
|
Back to top
|
|
|
State Machine
Janitor
Joined: Apr 17, 2006 Posts: 2809 Location: New York
Audio files: 24
|
Posted: Tue Jun 03, 2008 4:16 am Post subject:
|
|
|
Quote: | Heh... high fidelity isn't exactly my goal in this |
Yes, which is why my last comment was "all depends how we are looking at this". My presentation did show, however, that you could most likely get good results from the chip at frequencies above 1 KHz but needed to be verified on the bench
Bill |
|
Back to top
|
|
|
Tony Deff
Joined: May 25, 2008 Posts: 51 Location: Suffolk, UK
|
Posted: Sun Jul 06, 2008 1:43 pm Post subject:
PCB boards for AY-3-8910 going for a song (or less) |
|
|
Anyone want to "play" with a Programmable Sound Generator?
I was too sentimental, and have found that I retained several glass-fibre single-sided PCBs for my Programmable Doorbell (Polybel) project (vintage 1989 — gosh! Tempus Fugit)
You may have to chop and change to get what you want.
It interfaces an AY-3-8910 to a Z80 and a 2K EPROM/EEPROM (2817)
There is no RAM involved — clever interfacing (even if I do say so myself) uses the Z80's WRITE commands (normally used in a CALL Subroutine command) to set-up the PSG's control-lines via an LS139.
An efficient "interpreter" was written that takes up 256 bytes of the EEPROM: the other 7 "pages" are taken up by "tuneware", selectable by a rotary switch. Of course, you can do your own thing here, but this saves an awful lot of code-writing!
Setting the registers to select one of 32 notes of the Just Scale takes just 1 byte. Another single byte sets one of 16 tempo-related timing delays.
Two output port bits are used to control a crude filter, and two are free for your use, all set by a single byte. The interpreter allows for "recalls" (a repeat of a passage) and for "escaping" into your own machine-code.
This board takes-in a 6V battery supply and passes it through a "bistable regulator" comprising an LM10 op-amp with reference (that are hard to come by these days — I may have a couple left). (I also have several NEC CMOS z80s going spare)
Regulated +5V is produced when a pushbutton is pressed, and is turned-off by a HALT command from a Z80.
There is also a small patch-board area.
Last, but not least, you can program the thing from a PC printer port.
The catch is, you have to have the software already loaded into EEPROM, and I no longer have the means to do this!
The cost? — Basically free, but if you want photocopies of all the documentation, I cannot afford world-wide postage. In the UK, send Stamped Addresses Envelope; to Europe, offer an exchange or plead poverty, in more exotic climes, write an open invitation to laze by your swimming pool! |
|
Back to top
|
|
|
new voodoo
Joined: May 06, 2013 Posts: 94 Location: RVA USA
|
Posted: Wed Aug 28, 2013 9:56 am Post subject:
you still have that info/hardware? |
|
|
I am DEFINATELy interested.
Ive got some 8910/12s and Ive got maybe 20, so Id LOVE to figure out a relatively cheap way to make about 18 devices to dessiminate to some friends and the alternatives that i can find seem to be PICs and Arduinos to run it and that does seem counterproductive.
I have the vague sort of hope that id like to make it a bass synth primarily so..not too heavily concerned with perfection at higher frequencies..just with making it work and getting them to play. |
|
Back to top
|
|
|
new voodoo
Joined: May 06, 2013 Posts: 94 Location: RVA USA
|
Posted: Wed Aug 28, 2013 10:00 am Post subject:
|
|
|
im thinking ill add a little board off to the side with perhaps a 2399 simple delay circ, a 308 rat-type distortion with perhaps 3-4 diode clipping choices and a simple 7-band eq from some eq chips I have laying about and then running it all thru a matsuhita-type tube overdrive using a 12au7 or 9au7 vacuum tube thickening up the sound so I can run the whole sound section from a 9v..so hopefully making it really killer.
just an idea. we'll see how it progresses. got about 11 other projects currently on various front burners |
|
Back to top
|
|
|
|