Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - SMS PSG Frequency

Reply to topic
Author Message
Eric
  • Guest
Reply with quote
SMS PSG Frequency
Post Posted: Wed Sep 08, 1999 11:26 pm
Forgive me, but I wanted to start this in a new thread so everyone would see it.

I found a copy of Texas Instrument's SN74689 specification. (Its at http://www.nvg.org/data/bbc/doc/datasheets/sn76489.zip. Perhaps Zoop would be good enough to place it in the Technical Informations page?)

According to this document, the base frequency is determined by the following formula:

F = N/32n

where F is frequency, N is the carrier clock, and n is a 10-bit binary number.

It seems apparent that n is the same 10-bit value SMS/GG programmers write to the sound ports, and that N is most likely the system clock, 3.579545MHz.

I therefore conclude that the SMS PSG frequency has a maximum of 111860.78125, or approximately 111.8 KHz. Note that this value is very close to the value used by Marat Fayzullin's SN76489 emulator software (provided in his EMUlib library.) This somewhat confirms this figure, over the 125000 value provided in Talbot-Watkins' document. (Note that if Talbot-Watkins assumed a 4Mhz clock, which is the max clock for old Z80s, then the 125KHz figure makes sense.)

It seems that Limbs a Flyin's speculation about the probably frequency was right on, given the actual CPU clock.

Eric
 
Nyef
  • Guest
Reply with quote
Post Posted: Thu Sep 09, 1999 12:25 am
Quote
> I therefore conclude that the SMS PSG frequency has a maximum of 111860.78125, or approximately 111.8 KHz. Note that this value is very close to the value used by Marat Fayzullin's SN76489 emulator software (provided in his EMUlib library.) This somewhat confirms this figure, over the 125000 value provided in Talbot-Watkins' document. (Note that if Talbot-Watkins assumed a 4Mhz clock, which is the max clock for old Z80s, then the 125KHz figure makes sense.)

> It seems that Limbs a Flyin's speculation about the probably frequency was right on, given the actual CPU clock.

For some independant verification: I just tried this in DarcNES, and it sounds a lot closer to the real thing. And thanks for the pointer to the spec, I'll take a look to see if I find anything useful there.

Quote
> Eric

--Nyef
 
Limbs a Flyin'
  • Guest
Reply with quote
Post Posted: Thu Sep 09, 1999 12:53 pm


Quote
> I therefore conclude that the SMS PSG frequency has a maximum of 111860.78125, or approximately 111.8 KHz. Note that this value is very close to the value used by Marat Fayzullin's SN76489 emulator software (provided in his EMUlib library.) This somewhat confirms this figure, over the 125000 value provided in Talbot-Watkins' document. (Note that if Talbot-Watkins assumed a 4Mhz clock, which is the max clock for old Z80s, then the 125KHz figure makes sense.)

now you too can use your sms as a dog whistle!

Quote
> It seems that Limbs a Flyin's speculation about the probably frequency was right on, given the actual CPU clock.

cool. it was something a thought about a while ago (finding the relationship between clock and tone) but forgot about. then partialy rethought about again since the topic got brought up.

Quote
> Eric
 
Limbs a Flyin'
  • Guest
Reply with quote
feeback+noise channel
Post Posted: Sun Sep 12, 1999 3:02 pm
: http://www.nvg.org/data/bbc/doc/datasheets/sn76489.zip. Perhaps Zoop would be good enough to place it in the Technical Informations page?)

now what i didnt see in that info was anything about the feedback mode on the noise channel.. Meka does it (eg Alien 3 title music), so i can assume Zoop knows how it works.. care to comment? ;)
 
Nyef
  • Guest
Reply with quote
Re: feeback+noise channel
Post Posted: Sun Sep 12, 1999 7:10 pm
Quote
> : http://www.nvg.org/data/bbc/doc/datasheets/sn76489.zip. Perhaps Zoop would be good enough to place it in the Technical Informations page?)

> now what i didnt see in that info was anything about the feedback mode on the noise channel.. Meka does it (eg Alien 3 title music), so i can assume Zoop knows how it works.. care to comment? ;)

I think it works by ignoring one of the taps on the shift register.
That way, if the bottom bit is a 1, it shifts a 0 in at the top, and vice versa.

And when it "clears" the register, it probably clears it to all ones.

I have some noise channel issues to resolve, and I have to add cycle-exact timing, and my sn76489 code will be almost perfect. :-)

--Nyef
 
Reply to topic



Back to the top of this page

Back to SMS Power!