nesdev.com
http://forums.nesdev.com/

Bank switching while DMC sound plays
http://forums.nesdev.com/viewtopic.php?f=6&t=13848
Page 1 of 1

Author:  dougeff [ Fri Feb 12, 2016 5:38 pm ]
Post subject:  Bank switching while DMC sound plays

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.

Author:  lidnariq [ Fri Feb 12, 2016 5:48 pm ]
Post subject:  Re: Bank switching while DMC sound plays

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.

Author:  rainwarrior [ Fri Feb 12, 2016 6:02 pm ]
Post subject:  Re: Bank switching while DMC sound plays

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.

Author:  dougeff [ Fri Feb 12, 2016 6:39 pm ]
Post subject:  Re: Bank switching while DMC sound plays

I figured as much, but I hadn't thought about the 60 hz buzz. Thanks.

Author:  za909 [ Sat Feb 13, 2016 7:58 am ]
Post subject:  Re: Bank switching while DMC sound plays

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.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/