I keep getting that annoying 57% volume effect on the Triangle and Noise channels when a 1-bit DPCM sample cuts off its predecessor. Manually writing #00 to $4011 fixes that, but also causes a distinct popping sound when over-utilized. Adv. of Bayou Billy writes #00 to $4011 at the same time it loads the other three DPCM registers with new sample data... yet when I tried replicating that in SMB1, I got substandard sample quality with popping... >:-( Not to mention that wonderful A9-0F-8D-15-40 / A9-1F-8D-15-40 juggling act that seems to produce different results in different games... What's the best order of operations here?
My second question is probably dumb, so I saved it for last. There's no chance whatsoever that MMC5's 8-bit PCM channel can also play 1-bit DPCM samples...... right?
DPCM Best Practices?
Moderator: Moderators
Writing $0F/$1F to the sound channel enable register ($4015) works as long as a game isn't using these enable registers to turn off channels. It'd work with my music player, which uses the envelope registers ($4000/$4004/$4008/$400C) to turn off channels, but music players like SMB1 that make heavy use of the length counter might use $4015 instead.
If you try to add samples to a game not designed with DPCM in mind, you might get garbage button presses while a sample is playing due to clock noise generated by the DMA unit. There are DPCM-safe controller reading routines, and there are DPCM-unsafe controller reading routines. The latter are simpler and faster, and they're actually required for peripherals where rereading has side effects (such as the Super NES Mouse and, if I remember correctly, the Vaus controller for Arkanoid).
If you try to add samples to a game not designed with DPCM in mind, you might get garbage button presses while a sample is playing due to clock noise generated by the DMA unit. There are DPCM-safe controller reading routines, and there are DPCM-unsafe controller reading routines. The latter are simpler and faster, and they're actually required for peripherals where rereading has side effects (such as the Super NES Mouse and, if I remember correctly, the Vaus controller for Arkanoid).
Re: DPCM Best Practices?
Try to understand where the popping comes from. It comes from sudden changes in volume, so if the DPCM counter is at a value other than zero when you write zero to it, it will pop. How loud the pop is depends on the previous value (going 127->0 or vice versa will produce the biggest pop).Dr. Floppy wrote:I keep getting that annoying 57% volume effect on the Triangle and Noise channels when a 1-bit DPCM sample cuts off its predecessor. Manually writing #00 to $4011 fixes that, but also causes a distinct popping sound when over-utilized. Adv. of Bayou Billy writes #00 to $4011 at the same time it loads the other three DPCM registers with new sample data... yet when I tried replicating that in SMB1, I got substandard sample quality with popping... >:-( Not to mention that wonderful A9-0F-8D-15-40 / A9-1F-8D-15-40 juggling act that seems to produce different results in different games... What's the best order of operations here?
Then it's just a matter of trying to work around the issue, by doing stuff like what Dwedit suggested.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi