Dual DPCM?

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Dual DPCM?
by on (#78117)
Is it possible to play two DPCM samples simultaneously via (1) the NES' $4010-13 registers, and (2) the MMC5's $5010-11 registers?

If possible, would both samples would have to be located in the same bank mapped to $C000-FFFF, or could enough leeway exist to arrange some well-timed bank swaps?

by on (#78119)
Wiki article on MMC5 audio part says:

Quote:
MMC5's DAC is changed either by writing a value to $5011 (in write mode) or reading a value from $8000-BFFF (in read mode). If you try to assign a value of $00, the DAC is not changed; an IRQ is generated instead. This could be used to read stream 8-bit PCM from ROM and terminate at $00.

It uses $8000-$BFFF because the 2A03 DMC uses $C000-$FFFF. However, 2A03 DMC will also wrap to $8000 when it increments from $FFFF. This could be used to allow MMC5 and 2A03 playing the same data at the same time, although it will sound different because of the 8-bit MMC5 PCM format and the 7-bit 2A03 PCM or 1-bit DPCM.

by on (#78121)
Ach du lieber! I missed that part about the MMC5 PCM samplebank being located at $8000-BFFF!

This seems to trade a question for a conundrum: how to best organize the MMC5 bankswap protocols in order to embrace this arrangement? If 2A03 PCM is being used for sound effects, it pretty much needs to be hardwired. This allows MMC5 PCM to be utilized for music samples, essentially requiring a semi-hardwired bank somewhere in the range of $8000-BFFF (swapped only between songs).

Something tells me this is going to end with the 4 x 8kB motif...