I am working on improving DPCM support in FamiStudio and I was re-reading the DMC channel doc and I have a question.
What do guys think was the reasoning behind samples start addresses being 64-bytes aligned, while having their size being 16x + 1 ?
That "+1" is really wrecking my brain.
Why always play that extra byte? Wouldn't it have made more sense to have sample sizes simply rounded to a nice 16-bytes? Seems like this forces to you add padding between samples in most situation. The only reason I can think of it being designed like this is that it opens up the possibility of having 1 byte samples.
Also, I can clearly see some in NSFs, where samples sizes were already a nice multiple of 64, that they are often located one after the other in memory, without any padding. So I guess nobody cared and just assume an extra byte would be played?
Thanks!
From the wiki:
Code: Select all
$4012 AAAA.AAAA Sample address (write)
bits 7-0 AAAA.AAAA Sample address = %11AAAAAA.AA000000 = $C000 + (A * 64)
$4013 LLLL.LLLL Sample length (write)
bits 7-0 LLLL.LLLL Sample length = %LLLL.LLLL0001 = (L * 16) + 1 bytes