Intentional PPU hum...

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

Moderator: Moderators

User avatar
hap
Posts: 355
Joined: Thu Mar 24, 2005 3:17 pm
Contact:

Post by hap »

How about an audio recording of nesdev_anthem.zip B00daW? :)

yay, the same concept on TMS9918 family graphics chip, as you can see, amplitude can be changed by changing brightness.
http://www.youtube.com/watch?v=rGA_fVegAb4
I spent most of the time creating note- and lengthtables. :(

sourcecode here if anyone's interested: http://samor.nl/hap/crap/vdpmusic.zip (the .com is not for PC)
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

This is all very nice, but is it also possible to make some video out of audio signals?
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Probably not, seeing as you'd need HBLANK and VBLANK in order to have video frames.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

Dwedit wrote:Probably not, seeing as you'd need HBLANK and VBLANK in order to have video frames.
And there's no way to simulate those with audio? I'm just curious, I know nothing about audio and video signals.
lidnariq
Posts: 10677
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Post by lidnariq »

tokumaru wrote:And there's no way to simulate those with audio? I'm just curious, I know nothing about audio and video signals.
Sure you could. You just need a ~60/50Hz pulse wave and a ~15723/15625Hz pulse wave. Only problem is that the NES has a maximum pulse wave frequency of 14kHz, which most TVs won't sync to. Depending on the television, you might be able to drive at the first undertone (~8kHz) and have it sync.

Drawing things in addition to generating sync will be nontrivial, however.
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

lidnariq wrote:Drawing things in addition to generating sync will be nontrivial, however.
I was just curious as to what kind of things would be possible. The resolution of whatever was generated would probably be laughable.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

You might be able to generate something like a TI83+ can if you're lucky, but a TI83+ has a 6MHz Z80. Is the NES fast enough for generating anything visible through PCM output?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

lidnariq wrote:
tokumaru wrote:And there's no way to simulate those with audio? I'm just curious, I know nothing about audio and video signals.
Sure you could. You just need a ~60/50Hz pulse wave and a ~15723/15625Hz pulse wave. Only problem is that the NES has a maximum pulse wave frequency of 14kHz, which most TVs won't sync to. Depending on the television, you might be able to drive at the first undertone (~8kHz) and have it sync.
$4011 can be used to generate frequencies of up to ~447 kHz.
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post by B00daW »

nesdev anthem is a cover of that really annoying mouser.nes song. ;P
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

B00daW wrote:nesdev anthem is a cover of that really annoying mouser.nes song. ;P
Which in turn is a cover of E2M3.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Intentional PPU hum...

Post by rainwarrior »

Since emulators aren't very good at showing this off, I made a video of nesdev_anthem.nes:

Image
http://www.youtube.com/watch?v=xjrFJbN5iCc
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Intentional PPU hum...

Post by tepples »

I think I know how to get more bit depth. Vertical mirroring, black nametable 0, white nametable 1, use $2005 as if it were $4011. What this ends up doing is using the scroll to create pulse width modulation.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Re: Intentional PPU hum...

Post by blargg »

I thought you just outputted the 1-bit waveform to $2007. I take it this approach is to have the PPU hardware output a continuous tone without CPU assistance.
zzo38
Posts: 1080
Joined: Mon Feb 07, 2011 12:46 pm

Re:

Post by zzo38 »

hap wrote:On another note, it shouldn't be too hard to add this PPU noise as simulation to emulators...
Yes, if it actually makes the NTSC signals (rather than RGB mode), it will work.

Can you make music through the tape output? Can you make a music combining the video out, 2A03 audio out, mapper audio, and tape?
[url=gopher://zzo38computer.org/].[/url]
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Re: Intentional PPU hum...

Post by B00daW »

When I was experimenting with it, I noticed using other color and brightness values it made louder or softer waveforms. If someone were to experiment, they could create a look-up table of the loudest to softest or softest to loudest to create PCM waveforms.

...It would also be prettier.
Post Reply