DMC looping
Page 1 of 1

Author:  Disch [ Mon Dec 13, 2004 1:04 pm ]
Post subject:  DMC looping

RushJet on the boards was having problems getting DMC looping to work. To try and figure out what the problem was, I made my own small sample NSF:

The NSF loops a 17-byte DMC sample. I tried it out in a few emus/nsf players. VirtuaNES/NotSo/Nintendulator play it as expected... but FCEU/NSFPlug seem to exhibit a clicking noise (almost seems like they're delaying a few cycles before looping the sample -- which breaks the tone). Is this an emu problem? Or does that problem exist on the real thing? Anyone willing to try it out?

Author:  J2 [ Mon Dec 13, 2004 2:09 pm ]
Post subject:  RushJet's Problem

Heh, I did that exact same test awhile back (looping 17-byte DMC small triangle wave) and got the same results (FCE does the delay). It worked on all the other emulators, I'm not sure if the NES actual does that. Sry, I don't have a devcart to test it on right now.

Although I believe RushJet's problem was with MCK. I had made my dmc testing NSF with MCK and had expeirienced problems also. You see MCK loads the sample + it adds a lot of $AAs and then sets $4013 to the end of the $AAs for some reason. My DMC sample was 17-bytes, but it added $AAs until the sample was 64 bytes and probably loaded $4013 with 4 (which is 65 bytes in length even though MCK made the sample 64 bytes...). I don't believe Rushjet's sample was even 17 bytes, it was someething like 64 bytes and $4013 was set to the wrong number anyway...

So I had to manually write to $4013 so that it looped it was set at the proper length of the sample. Ehh, MCK...

Author:  Disch [ Mon Dec 13, 2004 4:26 pm ]
Post subject: 

Yeah... I figured MCK would be doing something weird as well (I watched the register writes his nsf was doing and it was kind of weird... like he had 2 seperate DMC samples in there, even though only one was playing). I had a potential "fix" which would involve manually increasing the sample size by 1 byte (I'd assume MCK doesn't like the multiple-of-16-plus-1 deal... and expects things to be a clean multple of 16). But if the fix doesn't solve the clicking, there's no real point.

So do you think this delay is an emu problem? I can't see the looping feature to have much use if it can't be used in this manner.... so I'd assume there's no delay on the NES (making it an emu problem). I would love to get a definite answer though.

Author:  J2 [ Thu Dec 16, 2004 2:21 pm ]
Post subject: 

Well, I'm almost positive it's just a little bug in the NSF player of the emulator. I believe making an NES version of the NSF file would prove it though (I'll check that out).

Blaarg did a whole mess of experiments with the 2A03's APU, including his own triangle wave with the DMC, and he didn't complain about any cycle delay (of course he used the DMC IRQ and looped it manually (it let him get a wider range of frequencies and allowed him to reset the volume via $4011 in some cases), I'm sure if the DMC IRQ wasn't a cycle off I'm sure looping wouldn't be either). I'm sure blarrg would have documented if their was a delay as he seemed to RE almost everything else :-)

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group