Re: Universal Sound Board?

From: Zonn <zonn_at_concentric.net>
Date: Fri May 02 1997 - 14:02:00 EDT

At 09:10 AM 5/2/97 -0800, you wrote:
>
>>But I hated to give up the "cheapness" of the PWM output of the PIC in
>>exchange for an external D/A and all the muxing involved, so I thought
>>another possibility would still be to use the PIC as the output device,
>>controlled by a master CPU.
>
>Well, I'd kinda agree except that a dedicated 10bit DAC is only $1.50 and
>an op-amp for the voltage output stage is only $.50, so if you already have
>a "control" CPU you could just run the DAC directly and avoid the pics, and
>the control CPU could use an external EPROM...
>
>So there's a $1 8051 with support components ($1), EPROM ($depends), DAC
>($1.50), TLO-82 ($.50)... Pretty cheap. The 8051 will run at about a MIP
>at 12MHz, which should be good for a few voics, and the waveforms could be
>complex from the ROM...

I agree. When you want a DAC, buy a DAC. Though I think you can do
multiplies quite a bit faster in a PIC than the 8051 (I've written math
packages for both). So if you want to do any kind of, on the fly, volume
control, sending the data through a PIC might get you a little better
thorough put...

>The same could be said for an 8051 (w/out external ROM) and a pair of
>POKEY's... (grand total about $3 in parts...) :-)

I'll probably get flamed for this...

I should start by saying Tempest *is* my favorite game, but none the less, I
think the sounds of those Pokey chips basically *suck*. They're not
versatile enough to do a seamless job of imitating the analog sections of
most game cards, and their white noise generation is randomly spaced square
waves (the shift register approach). The "Zoom" sound in Tempest sounds
more like a credit card on a stuckle wall than any kind of true "Engine
Rumble" (Of course who knows, beside Dave Theurer(sp?) what "Zooming"
really represents! Maybe it represents sliding down a stuckle wall with
your credit cards hanging out of you back pocket. If so, Pokeys were a
GREAT choice for Tempest!). Are Pokeys still being made? Loose the Pokeys!

(The following editorial represents only the views of the author and not
that of the Vectored Game Mailing List and Associates. Any complaints
should be sent directly to the author, where they can be thoroughly ignored.)

>>The PIC could either look at a parallel port, and when I receives the data
>>adjust it's PWM counter's accordingly. Or it could use one of those
>>dedicated serial ports (data/clock) which can be run *really* fast, as it's
>>input. Since the PIC doesn't have to convert serial to parallel in
>>software, this can be just as fast. Either method would allow the PICs to
>>be nothing but dedicated D/A's with the possibility of 4 channels per PIC
>>and very little external hardware.
>
>Or if you're going to use serial anyway, just use a single PIC and one of
>those Max528's. About $7 with serial input and 8 voltage output 8 bit
>D/A's in one package...

I like this idea a lot! I'll have to look into that Maxim(sp?) chip (Does
Maxim make some cool chips or what?). I imagine the clock rate needed to
constantly refresh 8 continuous samples of audio is pretty high. (Oh like:
8*8*SampleRate)

I believe the 68HC11 has a built in MUL instruction making Al and Jess's
idea of using the 68HC11 more viable. I think a 68HC11 and a few of those
Maxim chips might be a pretty cool way to go. Assuming the 68HC11 could do
the clocking in hardware (through a built in serial port?), the 68HC11 could
do attack/decay control in software.

If not, you can do the Attack/Decay using some properly designed sample
tables, meaning more EPROM.

Of course the 68HC11 also has the built in PWM (The 68HC11 was *another*
approach I was looking at when thinking of a Cinematronics universal sound
card.)

It's also pretty simple to use an external latch (or two) as part of the
addressing of the 68HC11 to allow for banking. And the 68HC11 being a nice,
straight forward, Von Neuman device, table look ups [of the sampled wave in
EPROM] is simple. Though for simpling data moving, it is a tad slower than
tbe PICs...

>
>>If you use one of the 33 I/O (40 pin) PICs, you can dedicate 8 lines to
>>inputs, and the rest (minus the PWM, and sound trigger lines) to outputs.
>>You can then connect the PICs outputs to the address lines of an external
>>EPROM, and the PICs inputs to the EPROMs data lines. This allows for a
>>*very* tight PIC loop, you set the outputs to the EPROM address, read the
>>EPROMs data, adjust the PWM timer, lather, rinse, repeat. This can be done
>>faster than if the data were actually in the PIC's ROM area!
>
>Hmmm. That's an interesting approach. I kinda like it except those 40 pin
>PICs are about $11 each... :-/

I know, hence the external counters and a lower end PIC. But then again how
many sound cards do you intend to buy? Even if you used 4 $11 PICs, another
$50 worth of "other stuff", a $50 PCB. Considering the prices I've paid for
my collection of Sega Boards, a "Universal Sound card at $150" sounds like a
deal to me! If one were available "right now", I'd be filling out a check,
"right now"! And hell, if I owned the card I'd want the $25 reprogrammable
PICs anyways! I'd want a "Universal" Universal Sound card!

Am I the only one to pay more than $150 for a game board?

>>A variation of this idea would be to have four loadable counters as the
>>address pointers, with the PIC controlling the enable lines of the
>>tri-statable counters. This way one write of the PIC could select between
>>the four addresses of the four voices, which could then be incremented
>>simultaneously. You could also use a smaller PIC. Each of the counters
>>could also go to different EPROMS, in which case all the EPROM's data lines
>>would be run in parallel and the EPROMs enable lines would be used as the
>>data selection lines.
>
>I've done something similar before-- but I skipped the presetable counters.
>Instead I sent a few I/O lines to the top address bits that let me select
>8K chunks of the EPROM (each "sample"). Then a single global "clear" line
>cleared the counters and a single "clock" line (at whatever rate) played
>the sample. (The EPROM outputs went directly to a little resistor based
>D/A and into a lm386 audio amp.) (It was a weird little "digitized sound
>doorbell" I made during college.)
>
>Atari's Nightmare board uses two sets of presettable counters to load a
>start address and a length, and then free-runs the counters to load out the
>samples. Works nice, but takes two 16 bit writes to set the address and
>another two for the length, and a bunch of board space for the counters...

Four 16 bit writes for the entire sound doesn't sound bad at all! The
problem is that if the samples are not being fed through the CPU, no
attack/decay control can be done.

It's too much trouble anyway. That's what CPU's are for. What's the point
in using a processor if it's just going to sit around and wait for the
hardware to do what it should be doing itself? Those poor Atari guys just
didn't have the luxury of cheap processors...

Using a processor you need only set the counters at the start of the sound,
no length, then one clock line is used to increment all counters. Though
for many of the Cinematronics games you'd want to run the samples at
different speeds, based on what the game called for (Ex: Armor Attack tanks
are the same sound engine, but speeded up as the game progresses. They do
this a lot in their games.), so you (ok *I*) might want separate clocks.

-Zonn

PS I'll look around the local electronic surplus stores for the noise
generator and let you know if I find anything.
Received on Fri May 2 11:03:50 1997

This archive was generated by hypermail 2.1.8 : Fri Aug 01 2003 - 00:32:03 EDT