A few years ago, a demo ROM was released, probably by tepples. It says "Hello" through the sound channels PCM, RAW, squares and noise.
Funny about the uninterruped sequence of spoken "Hello"s.
I'm not sure who wrote it, but I have one which GoodNES calls "Sampled Sound Test (PD)" which is exactly what you described - playing "Hello" 7 different ways (DMC, raw PCM, amplitude modulation on all 4 pulse duty cycles, and pulse width modulation).
That was mine. Thanks for rehosting it.
I will warn that the PWM is completely bugged, as I had no way to test it at the time. Mostly it was to convince emulator authors to improve resolution of volume writes ($4000) from frame-accurate to at least scanline- if not cycle-accurate the way $4011 was.
I was considering making a ROM that's nearly silent on an authentic NES or accurate emulator but produces "your clone is crap" on something with the swapped duty cycles of some famiclones.
Could the square versions be done without changing the volume of a carrier wave? Resetting the phase every sample or something so it sounds just like a 4-bit sample without any tones?
Dwedit wrote:
Could the square versions be done without changing the volume of a carrier wave? Resetting the phase every sample or something so it sounds just like a 4-bit sample without any tones?
Isn't the PWM example at the end supposed to be the "without changing the volume" version?
Duty 3 starts high, so you can set a low freq and frequently reset phase to
only use the volume as a 4-bit DAC. The other 3 duties start low, so you can't with them. With this method the high frequency tone in the other examples could be avoided.
Dunno why you'd want to use a square channel to do the DMC's job though. ;P (Aside from curiosity.)
I meant using Duty Cycle #3 (seems to be the only one that starts high) at a low frequency, and resetting the wave phase every write, so the volume always stays in the high position, never going to the low position.
This would be a 4-bit version of raw PCM basically.
tepples wrote:
I was considering making a ROM that's nearly silent on an authentic NES or accurate emulator but produces "your clone is crap" on something with the swapped duty cycles of some famiclones.
I'd suggest making it more humorous/compatible
and play the wrong duties, then go "Wait, you're on a clone with swapped duties; HERE is the way it should sound." have some silly animation swap the duty-cycle graphics.
You can't detect incorrect duty cycles in software, you can only use audio cancellation artifacts.
The only audio-related stuff you can detect is stuff like improper timing for the frame counter, or IRQs not working the way they should.
As for why you'd want to use 4-bit PCM force fed through the square channel... Maybe you just want it to be easier to add two channels together?
Dwedit wrote:
You can't detect incorrect duty cycles in software.
You can detect Dendy video timing, and presume it's swapped if you find that, but it doesn't apply to all clones with Dendy timing, unfortunately.
B00daw made a test of 4-bit square PCM a while back (sometime ine 2012 I think) but I can't seem to find it.
Edit: thefox made one a while back, it seems, but the link is dead:
post mentioning it /
archived link
rainwarrior wrote:
Edit: thefox made one a while back, it seems, but the link is dead:
post mentioning it /
archived linkThat one had a bug in it (didn't properly initialize sweep registers, IIRC), so I wouldn't advice to trying to find it. I don't think I ever got around to fixing it.
Anyway, the overhead of having to operate two pulse channels could easily be worse than the one ADC instruction you'd need to do it in software. Probably not worth it.
Dwedit wrote:
As for why you'd want to use 4-bit PCM force fed through the square channel... Maybe you just want it to be easier to add two channels together?
That or play DPCM samples and PCM samples at once. Otherwise they step on each other's fingers in $4011.