New PCM demo

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

frantik
Posts: 318
Joined: Tue Mar 03, 2009 3:56 pm

New PCM demo

Post by frantik » Tue Mar 17, 2009 7:00 am

Here's a little demo using $4011 to play raw 7bit PCM data while simultaneously doing some graphics stuff and reading from the controller. This is my first demo so let me know what you think :)

Download demo

User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg » Tue Mar 17, 2009 7:55 am

Hahaha, excellent. Wins on both counts.

Celius
Posts: 2157
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius » Tue Mar 17, 2009 8:36 am

Wow! Amazing quality!! And pretty humorous, too :) .

User avatar
Dwedit
Posts: 4236
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit » Tue Mar 17, 2009 8:55 am

When is the horizontally flipped image used?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

frantik
Posts: 318
Joined: Tue Mar 03, 2009 3:56 pm

Post by frantik » Tue Mar 17, 2009 9:21 am

it's not used.. i just wanted to put something in the other pattern table for nosy folks lol ;)


glad u guys enjoyed it :D :D

Roth
Posts: 399
Joined: Wed Aug 03, 2005 3:15 pm
Contact:

Post by Roth » Tue Mar 17, 2009 11:31 am

D'oh! You got me! haha Pretty nice demo : D

WedNESday
Posts: 1236
Joined: Thu Sep 15, 2005 9:23 am
Location: Berlin, Germany
Contact:

Post by WedNESday » Tue Mar 17, 2009 11:34 am

Aw shame, I've just tested it out on WedNESday, but there's no sound emulation at the moment...

User avatar
blargg
Posts: 3715
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg » Tue Mar 17, 2009 11:57 am

No sound? Then you were half-spared :)

strat
Posts: 340
Joined: Mon Apr 07, 2008 6:08 pm
Location: Missouri

Post by strat » Tue Mar 17, 2009 12:25 pm

Woah - I didn't know the NES could play anything other than bloop bloop bloop.

smkd
Posts: 101
Joined: Sun Apr 22, 2007 6:07 am

Post by smkd » Tue Mar 17, 2009 1:59 pm

cool demo. i thought about 4011 streaming with other tasks crammed in between a little while back, you get a decent chunk of time with 8khz or 16khz between 4011 writes. i thought about using irq to time between 4011 but then i remembered ppu address lines aren't active in nmi so that wouldn't work out too well.

eventually i'd like to write a pcm streamer but i'd also want it doing something in the background otherwise it's pretty unremarkable. i co-authored something similar for the snes, was pretty fun to make.

User avatar
koitsu
Posts: 4216
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Tue Mar 17, 2009 4:40 pm

Haha, awesome. The audio quality is downright scary.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples » Tue Mar 17, 2009 4:59 pm

strat wrote:I didn't know the NES could play anything other than bloop bloop bloop.
How many words can you make before the sun goes down?

Are. Eye. See. Kay. Rick.
Are. Oh. Ell. Ell. Roll.
Good job! Go again.

I wonder how much the quality would suffer under ADPCM.

User avatar
Hamtaro126
Posts: 765
Joined: Thu Jan 19, 2006 5:08 pm

Post by Hamtaro126 » Tue Mar 17, 2009 5:24 pm

Can Frantik release source code for the NES Demo? And can SMKDan do the same with the SNES Demo? Because the Sound/Music is nice and I'd like them to be released.

frantik
Posts: 318
Joined: Tue Mar 03, 2009 3:56 pm

Post by frantik » Tue Mar 17, 2009 6:17 pm

tepples wrote:I wonder how much the quality would suffer under ADPCM.
haha I actually got the idea from you musing about the same thing a year ago

It would be interesting to hear using ADPCM compression.. but would you have enough time to decompress it and play the audio in addition to doing everything else? The audio is playing back around 14.5 kHz and there are only 16 clock cycles left between each sample.

one cool thing I discovered is you can get away with using more clock cycles if you only do it once in a while.. like you can do a fair amount of work during vblank and the distortion isn't noticeable until you've wasted a lot of clock cycles.

strat
Posts: 340
Joined: Mon Apr 07, 2008 6:08 pm
Location: Missouri

Post by strat » Tue Mar 17, 2009 7:20 pm

"Haha, awesome. The audio quality is downright scary."

Honestly, that sounds at least as good as vinyl.

Thanks for the Big Bird vid, Tepples

Post Reply