[Coco] Assembly audio routines

Glen Hewlett glen.hewlett at sympatico.ca
Sun Mar 19 17:35:10 EDT 2017


Hi Evan,

Thanks for the info, I looked at your code and it will be useful if I want to play tones from the computer like the sound command in DECB.  But what I’m looking for is some code to play back audio samples (PCM audio data) like wav files.  I think this is the only way I can keep the game going at the same time as playing sound effects/music.  As I understand it will take using the FIRQ and sending certain number of sampled bytes every time the FIRQ is triggered.  So it will have to be very optimized code.

Cheers,
Glen

> On Mar 19, 2017, at 5:18 PM, Evan Wright via Coco <coco at maltedmedia.com> wrote:
> 
> Here is the github repository for the CoCo project I recently did.
> https://github.com/evancwright/CoCo
> 
> If you look in floodit_cart.asm there is a routine which plays the intro melody to the game.  I never did get sound working in an unblocking fashion, though,  It looks like the ISR checks the values for the length and freq of the tone to play, then loops until the sound is done playing.
> I used this as a reference...http://www.lomont.org/Software/Misc/CoCo/Lomont_CoCoHardware.pdf
> 
> Hope this is at least somewhat useful.
> -Evan
> 
> 
> 
> |  
> |   
> |   
> |   |    |
> 
>   |
> 
>  |
> |  
> |    |  
> evancwright/CoCo
> TRS-80 CoCo Projects  |   |
> 
>  |
> 
>  |
> 
> 
> 
> 
>    On Sunday, March 19, 2017 1:34 PM, Glen Hewlett <glen.hewlett at sympatico.ca> wrote:
> 
> 
> Hi All,
> 
> Does anyone have some example code for playing audio samples in an assembly program?  I’m making some nice speed improvements in my Pac Man transcode and I thought it would be nice to test with some sound added to the game.  If someone has some code I can take a look at that would be great.
> 
> Cheers,
> Glen
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
> 
> 
> 
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list