programming the GMC module (SN76489 chip)

Hardware Hacking, Programming and Game Solutions/Cheats
Post Reply
pser1
Posts: 1247
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

programming the GMC module (SN76489 chip)

Post by pser1 » Thu Aug 08, 2019 5:47 pm

Hello,
while trying to add music to the AGD engine, I have come to a small music player that can
play three music channels controlled by the /FS IRQ, no problem at all. Works well.
The problem arises when I want to program some kind of drums, say snare, bongo or cymbal
on the 4th channel (noise).
I haven't found anywhere an example. I am not playing samples but actual music scores
Is there anyone in this group that would share any example(s) of how to program the noise channel
of that chip to create some kind of drums sound?
I would really appreciate any hint or link to sort that hurdle.
Thanks in advance
pere

User avatar
robcfg
Posts: 1237
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden

Re: programming the GMC module (SN76489 chip)

Post by robcfg » Fri Aug 09, 2019 8:35 am

You could try Deflemask or any other chiptune tracker, and load some SN76489 songs to see how they do it.

sixxie
Posts: 1075
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: programming the GMC module (SN76489 chip)

Post by sixxie » Fri Aug 09, 2019 8:42 am

I suppose in general, very quick attack, decay pretty quick too but can probably vary that and then play with the frequency you set the noise generator to.

Stewart played with it a bit here and noted:

"The drum sounds are simply bursts of noise with the volume and frequency changing over time. The kick drum has a really rapid drop in frequency to make it sound like a thud while the snare has a short period of rapid frequency drop followed by a longer period with more gentle change."

pser1
Posts: 1247
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: programming the GMC module (SN76489 chip)

Post by pser1 » Fri Aug 09, 2019 6:28 pm

Hello,
thanks Roberto Carlos and Ciaran, but the biggest hurle that has suddenly appeared is that the sounds in AGD games are all created
using BEEP commands that are processed in AGD using the 6 bits DAC in the 6809 engine.
Trying to add music implies using the audio input from the cartridge and this is another input to the sound source selector
I could have figured it before, but I just programmed code and tested :-(
So it seems that it won't be possible to use both sources at the same time and the only plan I can imagine is to reprogram all of the
sounds to be played on the fourth channel of the SN76489.
This means a lot of work and will affect all of the games that contain BEEP and PLAY commands. Too much burden for a very small gain.
There are just a few games (all from 128k Spectrum) that play music.
In fact, if I could say this, I am losing more and more the desire to face this project ...
I will be testing the drums capability of the GMC for learning purposes only.
Again, thanks to all of you that have given me pointers to learn more about the GMC sound generation
cheers
pere

User avatar
robcfg
Posts: 1237
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden

Re: programming the GMC module (SN76489 chip)

Post by robcfg » Fri Aug 09, 2019 8:09 pm

Does the same happens with the CoCoPSG?

I remember that I did nothing special with the JCB Microsystems Sound Extension Module to get the sound through the tv. I don´t know if they can be mixed though.

I can try to test that during the weekend.

pser1
Posts: 1247
Joined: Sun Mar 25, 2012 7:32 pm
Location: Barcelona (SPAIN)

Re: programming the GMC module (SN76489 chip)

Post by pser1 » Fri Aug 09, 2019 8:54 pm

robcfg wrote:
Fri Aug 09, 2019 8:09 pm
Does the same happens with the CoCoPSG?
I remember that I did nothing special with the JCB Microsystems Sound Extension Module to get the sound through the tv. I don´t know if they can be mixed though.
I can try to test that during the weekend.
Hello Roberto Carlos,
I have not tested it but maybe one could use the sound output jack on the PSG and keep using the internal 6 bits DAC for effects
but this will 'need' an external mixer to be able to listen to both outputs
I think that mixing two sound 'sources' inside the Dragon is not possible, and I don't believe switching from one to the other will help.
regards
pere

User avatar
robcfg
Posts: 1237
Joined: Sat Apr 04, 2009 10:16 pm
Location: Stockholm, Sweden

Re: programming the GMC module (SN76489 chip)

Post by robcfg » Sun Aug 11, 2019 7:10 pm

You're right.

It´s a pity that the cartridge sound cannot be mixed with the dac output.

Anyway, having a psg is very nice as it does not take all cpu to make sound.

Post Reply