Question on Pulse Channel Frequency Range

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Question on Pulse Channel Frequency Range
by on (#81464)
From the equation on the wiki, the max audible pulse channel frequency would be (1.79MHz/(16*(5+1)) = 18.64kHz. But I'm curious why BT's nessound.txt says the max square wave freq is only 12.4kHz. i know BT's stuff is old but it seems odd that he would get that wrong...am i missing something about the pulse channel that only allows it to go up to 12.4kHz?

by on (#81466)
Where'd you get the 5? Replace the 5 with an 8 and you have 12.4 kHz. Now where'd I get the 8? From APU Sweep: "When the channel's current period is less than 8 or the target period is greater than $7FF, the channel is silenced".

by on (#81467)
Aha!! Thanks tepples!! :)

tepples wrote:
Where'd you get the 5?

I picked 5 just because it was the minimum period value that would generate and audible frequency (i.e. under 20kHz).

by on (#81470)
This leads me to another question...should the noise channel also be silenced when the input period generates ultrasonic frequencies? For example, an input period of $0 to the noise channel results in a frequency of 1.79MHz/4 = ~447kHz.

by on (#81471)
It doesn't generate only ultrasonic frequencies, it's on or off irregularly enough that it makes audible noise.

Noise channel isn't just a simple square wave, it turns on and off whenever the shift register tells it to.

by on (#81472)
Okay, awesome. I thought it might have something to do with the randomness but wanted to make sure. Thanks Dwedit!

by on (#81992)
What should be the best replacement for 5?


____________________
Male supplement virility ex.Genital wart relief wartrol.zetaclear nail fungus relief.

by on (#81993)
tepples wrote:
Replace the 5 with an 8