It is currently Sat Oct 21, 2017 9:03 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Fri Feb 12, 2016 5:38 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
Just curious...if a DMC sample is playing, and the bank it sits in is switched for a few hundred cycles and switched back...what would likely happen? Noise for 1/100th of a second? Would the sample stop?

I'm trying out an AxROM style mapper, and I think it would be a waste of space if I had to put the DMC samples on every bank.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Feb 12, 2016 5:48 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6289
Location: Seattle
DMC fetches a new byte every 400 (PAL, maximum frequency) to 3424 (NTSC, maximum period) CPU cycles.

If the wrong bank is mapped when it fetches its byte, it'll just fetch the wrong byte.


Top
 Profile  
 
PostPosted: Fri Feb 12, 2016 6:02 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5728
Location: Canada
Usually the use pattern means the wrong bytes are being fetched at a regular interval (i.e. 60 Hz), which will likely manifest as a bit of a buzz at the interval frequency. The strength and timbre of this buzz would vary with how much of the interval is spent with the wrong samples playing.

Note also that the DPCM is only going to fetch a new byte every 400 cycles or so at worst, so if the time spent in the wrong bank is relatively small, you might not even catch a bad byte every frame.

Also, receiving "noise" DPCM is not nearly as strong an effect as it would be if it was PCM. The counter only gets a +2 or -2 per sample, so the relative amount of distortion you're getting for a single bad byte is fairly low.


Top
 Profile  
 
PostPosted: Fri Feb 12, 2016 6:39 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
I figured as much, but I hadn't thought about the 60 hz buzz. Thanks.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Feb 13, 2016 7:58 am 
Offline
User avatar

Joined: Fri Jan 24, 2014 9:05 am
Posts: 132
Location: Hungary
You might even find a use for the random noise that aries, or playing back code as DPCM. Unrolled PPU update code can usually produce some kind of limited wavetable-like tone.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group