I will not talk about sound or noise generator.
I still have problem to fully understand the sound chip and there is no informations available about the Coleco sound routines in the Coleco bios.

BUT, I use the sound routines included in the Coleco library by Marcel de Kogel so I can talk about sounds a little bit.

The way I learn how to generate sounds in my Coleco project is by looking the source code of Marcel de Kogel's Cosmo Challenge (available with his coleco library).

To avoid computing myself a sound effect, I created a tool named WAV2CV to convert a sound from a normal WAV file into a C file to be used with the coleco library sound routines. I have done two programs about sound effects with menus. The source code of these programs are available : visit my coleco web site.

http://www.geocities.com/newcoleco

Ok, my Coleco web site is not up-to-date but this is the page where you can found some of my codes. It's in french only (sorry)

http://www.geocities.com/newcoleco/dev/devfr.html

THE SOUND ROUTINES I USE

At the end of the NMI routine, I add the following instruction :
update_sound ();
This instruction placed in the nmi will update the sound at each vertical retrace. Yes, in the NMI routine, it's the best place to put this instruction.

start_sound (sound_data,sound_priority);
This instruction add some informations in the RAM like the pointer to the sound in ROM and the sound priority. The informations in RAM will be used by the update_sound routine to play the sound. When 3 sounds are played and another sound is started, the sound_priority is used to see wich sound must be ignored because there is only 3 sound channel. A sound priority number 10 win over a sound priority number 1. (I hope you understand)

sound_pointer = start_sound(sound_data, sound_priority);
You can get the information about the pointer in RAM where the sound informations are placed. This way, you can use the following instruction to stop this particular sound without stoping all sounds:

stop_sound(sound_pointer);
You cannot use stop_sound without the sound_pointer otherwise all sounds may stop forever.

THE WAY I ADD SOUNDS IN MY COLECO PROJECTS

I don't fully understand how works the sound routine "update_sound" but I can talk about wav2cv.

It's very easy. Simply open wav2cv and select the WAV file you want to convert. You can also change the parameters before selecting the WAV file to increase or decrease the sound quality. If it's a simple sound like BEEP, use only one channel. If it's a complex sound like a digitalized sound, use two or three channels. Remarks : WAV2CV can freeze if you ask for more channel than you really need (it's a bug i can't fix). Normaly, WAV2CV will minimized for short laps of time and take 90% of your CPU time. More longer is the sound, more longer you will freeze your Windows. WAV2CV applies FAST FOURRIER TRANSFORM to find frequencies of the sound... for each laps of time based on the vertical retrace frequency (NTSC 60Hz or PAL 50Hz).

The generated C file can be renamed and added into your Coleco project. You can also copy-paste the C code into your source code where you want to avoid having too much C files to compile. I suggest to use one C file to regroup all the sound data for your coleco project.

WAV2CV cannot convert noisy sounds. To add a noise sound effect, you must refer to the sound data you can found in the cosmo challenge source code.

static byte shoot_sound[]=
{
1,
0xf8,0xe4, 1,0xf2, 1,0xe4, 1,0x63,0x02,0x01,0xe5, 1,0xe4,
1,0xe5, 1,0xe4, 1,0xe5, 1,0xe4,
1,0xe5, 1,0xe4, 1,0xe5, 1,0xe4,
5,
0,0,0
};
Remark : Sound data end with three zero : "0,0,0".

Ok, You have informations about SOUNDS, GRAPHICS, JOYSTICK and TOOLS you can use. If you know how to program in ANSI C language, you have all the informations to program your own ColecoVision projects. There is no reason to ask again how to program a ColecoVision game in C.

NOW, it's YOUR TURN to talk about NEW ColecoVision HOMEBREW GAMES.