Re: TI-H: Need help with 8-bit sound software/MODEM IDEA!!!


[Prev][Next][Index][Thread]

Re: TI-H: Need help with 8-bit sound software/MODEM IDEA!!!



Richard Piotter wrote:
> 
> >Yes, the sound needs to be 8 bit or else it will sound completely
> >horrible.  I think that the best solution would be to use a serial
> >DAC, just like the ones used in most portable CD players.  I can't
> >remember where, but somewhere on the WEB I saw some datasheets for
> >one of these chips.  This would make the sound adapter very simple.
> >
> >-Ed

Hmmm... that sounds interesting... but nevermind, that isn't the message
I am replying too... see below.


> The chip I'm using is from MAXIM, and you can get LOTS of FREE SAMPLES
> from them. I got the MAX550B and several other chips. I made my first
> prototype with a 10-bit DAC, so realy we could have done 10-bit sound,
> but that isn't a standard. I finalized the prototype design by
> switching
> it with the MAX550B, which is a Microwire serial DAC that seems
> perfect.
> I just need to know if Microwire is a protocol that TI calcs can
> interface with. If it is, then I HAVE a WORKING 8-bit sound generator.

Well, if you study the PDF data sheets, you need to switch 3 (three)
data lines.  Not only do you need to switch the data (DIN) and clock
(SCLK) lines, you have to raise the chipselect (/CS) line after every
16-bit word for it to be loaded into the DAC.  So it won't be easy.  I
may have a theory as to how to solve this but it may be wrong, so I'm
going to test it first (I ordered the sample chip yesterday.  How long
does it take, usually?).  More below.

> I
> want to get someone who's good al link port programming to try
> programming a waveform generator. A full featured waveform generator
> could probably create Sine, triangle, sawtooth, square, and noise
> waveforms, combine 2 or more wave functions and output the 8-bit
> composite wave to the link or SPinTerface port. The DAC would convert
> it
> to analog data, alowing the 8-bit sound to vbe played through a
> speaker.
> The sound quality and capabilities could easily reach GameBoy  type
> sound. You could do dizitized sound, but it is so large (5K per each
> second of sound when sampled at 5KHz). Digitizing of 8-bit sound is
> something only expander games should use, and you would want the
> expander to be connected, so for now, I think we should settle on a
> standard piece of AVALIABLE hardware that's simple as possible (one
> chip) and we should have two standards for generating sound. Digitized
> sound output a byte at a time and waveform generated sound that would
> make specific frequencies. There should be a way set up to interface
> to
> it so you can give the atack, delay, sustain, and decay stuff and
> simple
> tone generations. I know that the processor can do it because the
> Commodore 128 had only a 1 MHz Z80 in it. It had the physical waveform
> generator, but that can be emulated with those extra 5 MHz we have at
> our disposal. My only concern is the big games like Daedalus. Stuff
> like
> that use massive compute cycles for graphics and sound would take just
> as much power, so maybe we could make turbo only software that would
> be
> designed specificly for turboed calcs.

Hmmm... I'm not so sure about that.  A hardware waveform generator can
be pretty effective even with older technology.  But doing the same in
software is going to burn up CPU cycles like crazy.  I can see only one
potential application for this: something like a MIDI composer.  No
separate instruments of course, but there could be a standard song file
format, and a program to play them and/or play notes entered on the
keypad (a little like those first sound test programs).  But you would
probably need nearly all of the CPU cycles to do it (if it is even
possible), so using it in a game is probably out of the question.  More
below (sorry! :).

> I just wan't to emphasize the WAVEFORM GENERATION. I think it has been
> skipped over twice. It is like plotting a graph, to the link port,
> where
> the collumns of the "screen" are each byte of data. The wave increases
> and decreases the value of the byte just as the dots of a screen are
> plotted higer or lower. Digitizing is like taking a picture of that
> graph, saving each individual dot. Dizitizing takes too much memory,
> but
> the result is almost instant. The waveform generation plots the sound
> out as a function. The obvious advantage is that you simply need an
> equation and a plotting routine to "plot" to the link port. this takes
> extra cycles though, which is the most obvious disadvantage. I want
> somone to evaluate for me what needs to be saved more, cycles or
> memory.
> I say we should go with Waveform Generation and save memory, at the
> cost
> of some cycles.
> 
> Another idea is an acoustic modem. It would be slow, but you could
> possibly transmit at nearly 5Kbits per second (maybe) by transmitting
> data converted to sound. You would have to add an ADC to the circuit
> and
> alternate them or something, but at least you're transmitting analog
> sound rather than stuck with useles digital data. Besides, what game
> will need more than 625 bytes per second? You could plug a device into
> the phone or use an electromagnetic pickup so the sound doesn't get
> interference. you would dial the number and wait for the other pesom
> to
> pick up and attach the calcs. Start sending data and you're ready.
> What
> about that AND, OR, XOR stuff. Would it be possible to use those to
> join
> a digital signal with a carier sine wave. It would all be done with
> software, but software emulation may someday lead to a suggestion for
> a
> hardware solution???

A hardware solution would probably only be possible with a
custom-programmed uP, the same thing some people are fighting against in
the expander/extender "industry."  I'm not even going to say anything
about the modem idea.  :)  You _may_ be able to put data on a carrier
wave in real time, but in my opinion, you'll never be able to take it
back apart in real time with software.  Maybe.  It depends on what
exactly you are doing.  625 Bps is probably out of the question, though. 

Ok.  I have an idea that might simplify this whole idea of better
quality sound on the calc than the current link port speakers.  First,
you take something like this MAX550B, if you could control it (maybe use
the serial DACs mentioned at the very top of this, or maybe some I2C
chips).  So now you have a varying voltage.  Now you take a
voltage-to-frequency converter (I have no idea where to get one or what
part number it would be.  But I know they exist, as that is one way you
can measure a voltage with a microprocessor.  Count the number of
pulses, then you can calculate the voltage.).  Stick that on there, and
you get a varying freqency.  Bingo.  Now your prog can just send a
number to the DAC, then get a certain frequency that continues, not
taking CPU cycles, until your prog tells it to stop.  _Much_ more code
efficient.  You can't, of course, control volume, but maybe that is
okay.

Anyway, thats a possibility.  Sorry for such a long message (I wonder
how many fell asleep while reading it.  You know, having keyboard keys
embedded in your forehead can be kinda painful... :)

Just my $0.021 cents (It was so long, it cost a little extra. :)

-- 
Ben Shakal
shakalb98@jhs.net
Quote of the Month:
"Common sense is the collection of prejudices acquired by age 18."
                                                - Albert Einstein


References: