Page 1 of 3

Intentional PPU hum...

Posted: Thu Apr 02, 2009 7:53 pm
by B00daW
I've been playing around with the concept of using the 2C02 PPU hum intentionally.

So far I've created a flickering BG0 test ROM that yields no noise. I've also used NO CARRIER's GlitchNES; then modified it so that the APU and all channels are turned on. All I get is a small pop when the APU turns on and a click when the NES is shut off.

Does anyone have any idea about which part of the PPU would be producing the hum and what would be done to purposefully make the hum? (Speaking strictly via software that is.)

Furthermore, what frequencies are achieved and are they consistent?

I'll be messing about with this a bit further.

Posted: Fri Apr 03, 2009 3:06 am
by blargg
Haha, great idea. Hours later, here's a demo that plays the first few notes of the SMB theme through the PPU. Run on a NES and plug your audio RCA cable into the VIDEO output to hear (turn down volume first, as the buzz is kind of loud).

ppu_tune.mp3
ppu_tune.zip with NES ROM and ca65 source

I got side-tracked trying to play 6-bit PCM out of the PPU (couldn't get the output levels to match what they should have). I did get 3-bit PCM working, but lack the RAM on my devcart to put any decent-length sample on it. Had to settle for a simple square wave. It just plays it by loading the palette with black and white, and toggling between the two entries by changing the PPU address (with rendering disabled). Connect NES normally to "see" the waveforms on screen.

Posted: Fri Apr 03, 2009 6:00 am
by hap
creativity at its best :)
I'm gonna try it on the TMS9129.

Posted: Fri Apr 03, 2009 9:21 am
by B00daW
It seems like the brightest colors are the loudest and the darkest are the most quiet.

blargg: I'm using the ppu_tune and a PowerPak. It doesn't work. A white screen pops up and it goes black and quiet. (Yes. I do have the audio cable in the video. :))

What kind of devcart are you using?

Posted: Fri Apr 03, 2009 12:31 pm
by B00daW
I tried compiling the ROM and it yielded the same results as your compile. It compiled without bitching, but in the binary there is a string:

"Passed..Done.Failed..Failed #..Internal error" @ 0x67BD w/ header.

Posted: Fri Apr 03, 2009 12:38 pm
by Dwedit
And I thought this thread was going to be about the audible interference from the PPU that you can hear.
Especially noticeable in Wizards and Warriors 3 in areas with black and white tiled floors.

Posted: Fri Apr 03, 2009 12:38 pm
by Jeroen
Doesnt work for me either :-/

Posted: Fri Apr 03, 2009 12:44 pm
by B00daW
Dwedit wrote:And I thought this thread was going to be about the audible interference from the PPU that you can hear.
Especially noticeable in Wizards and Warriors 3 in areas with black and white tiled floors.
Well, that's what was intented, but either way this is a development I'd like to run with for now.

Posted: Fri Apr 03, 2009 3:32 pm
by hap
blargg's example is the same as you describe Dwedit, it's just (much) clearer if you switch the cables.

On another note, it shouldn't be too hard to add this PPU noise as simulation to emulators, provided that the emulator supports borders, not just the 256 pixels per line.

Posted: Fri Apr 03, 2009 5:27 pm
by Zepper
hi

Posted: Fri Apr 03, 2009 7:23 pm
by Drag
hap wrote:On another note, it shouldn't be too hard to add this PPU noise as simulation to emulators, provided that the emulator supports borders, not just the 256 pixels per line.
At that point, you'd might as well get some kind of TV emulator going, because you very well could use that as input for it, and possibly get the most accurate-ever picture that the nes emulation scene has ever seen. :P

Posted: Fri Apr 03, 2009 7:58 pm
by tepples
What is the upscaler in an HDTV other than a "TV emulator"?

Posted: Fri Apr 03, 2009 8:49 pm
by blargg
Crap, I had made a stupid little change just before releasing it. Should work now (same link).

Posted: Fri Apr 03, 2009 9:14 pm
by B00daW
Nice! Works now. Thanks, blargg. Time to experiment. ;D

Posted: Fri Apr 03, 2009 9:54 pm
by B00daW
After a few minutes of experimentation, I've been able to cover NESdev's venerable anthem.

http://average.truechiptilldeath.com/ne ... anthem.zip