Intentional PPU hum...

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Intentional PPU hum...

Post 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.
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post 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.
User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post by hap »

creativity at its best :)
I'm gonna try it on the TMS9129.
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post 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?
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post 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.
User avatar
Dwedit
Posts: 4921
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post 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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Jeroen
Posts: 1048
Joined: Tue Jul 03, 2007 1:49 pm

Post by Jeroen »

Doesnt work for me either :-/
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post 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.
User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post 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.
User avatar
Zepper
Formerly Fx3
Posts: 3262
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

hi
Last edited by Zepper on Mon Apr 06, 2009 8:18 am, edited 1 time in total.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post 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
tepples
Posts: 22705
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

What is the upscaler in an HDTV other than a "TV emulator"?
User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

Crap, I had made a stupid little change just before releasing it. Should work now (same link).
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post by B00daW »

Nice! Works now. Thanks, blargg. Time to experiment. ;D
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post 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
Post Reply