[Coco] more 1 bit madness

Steve 6809er at srbsoftware.com
Tue Jan 21 11:48:07 EST 2014


Simon,
Never needed to poll the speech sound pak since I used the v-sync 
Interrupt to feed information into it at the right time. (Changing the 3 
"voice" channels of the Sound FX chip.)  I never used the speech side of 
the cart in my games.

By the way, the SSP used a General Instrument AY-3-8910 sound chip.
See: http://en.wikipedia.org/wiki/General_Instrument_AY-3-8910

This chip was widely used in the Video Game industry.  From Arcade Games 
to the Vectrex, I've written quite a few games using it.  I even 
produced a 6 Voice (2 chip) version called Hard Music for the TRS-80 
I/III.  This was a follow up to my software only "Soft Music" that 
played two voices simultaneously in tune.  A first for any home computer 
just using software to pull it off.

The key to Soft Music keeping both voices in turn was running both 
delays in the same loop.  How do you do that?  Use mathematics to create 
the timing.

Your non interrupt version of the code used a simple time delay to 
trigger the flip the it event.  My code used the addition of a number to 
the sum register to trigger the flipping the bit.  In the case of the 
6809, I would load up the SUM value into the D register and add its tone 
number to it. (and save back the sum.) When there was an overflow (carry 
bit set), the sound bit was flipped. (Did a xor $80 or $40 depending on 
the voice.)  After doing one voice, the code would working the second 
voice in the same loop.  The loop was coded so the flipping or not 
flipping of the audio bit took the same number of cycles.

Changing the Tone Number that was added to the sum would create the note 
at the right tone without effecting the other note.  This process was 
also a auto-tuning. If the delay for a bit flip was not right on the 
money because of the resolution of the loop, each pass would adjust 
(above/below) to the right frequency to keep the note in tune. (The 
number still in the SUM after an overflow did the tuning.) Very 
important for the higher musical notes.

As with your first demo, this code took 100% of the CPU time to pull it 
off.  That's why this code was limited to the Title Page in my games.  
But it did play a very pleasing two note harmony in a 6 octave range.

Steve

On 1/20/2014 11:14 PM, Simon Jonassen wrote:
> See, the SSC makes things a heck of alot easier....
>
> Especially if you program it in direct mode.....
>
> The only downside is having to poll it to see if it's ready for more input
>
> /Simon :-)
>   
>
> -----Oprindelig meddelelse-----
> Fra: coco-bounces at maltedmedia.com [mailto:coco-bounces at maltedmedia.com] På
> vegne af Steve
> Sendt: 21. januar 2014 07:35
> Til: CoCoList for Color Computer Enthusiasts
> Emne: Re: [Coco] more 1 bit madness
>
> May folks out there may not know that a large number of CoCo games did
> support the speech sound pak for better music and sound fx.  It also has the
> advantage of speeding up the game a bit too.
>
> Steve
>
> On 1/20/2014 10:24 PM, Nick Marentes wrote:
>> Steve <6809er at ...> writes:
>>
>>> Tandy did put a 3-voice sound chip in CoCo,  the never released
>>> Deluxe Color Computer that would sold for twice the price of the CoCo 2.
>>>
>>> But that's the problem.  Adding stuff like that would add to the cost
>>> of the computer.  The only reason we got the CoCo 3 was its build
>>> cost lower that the CoCo 2.
>> This is definetely the case.
>>
>> What may have also swayed them away from providing sound is that Tandy
>> sold a sound and speech cartridge. They probably thought "There's your
>> sound chip!" and "we can profit by selling that as an add-on
>> expansion" (along with a multi-pak!).
>>
>> With Tandy it was always about money. Keep costs down and profits up.
>>
>> Nick
>>
>>




More information about the Coco mailing list