So I've been working on my DMC implementation. I think it is fairly complete and seems to be working pretty well, but I have this nasty little bug that I can't figure out.
When I play bomberman I hear the explosions. When I play Kung Fu I hear the grunts/laughs. But when I play Duck Hunt I hear 1 "arf!" and that's it - no more. When you first start the game the dog actually barks 3 times in a row, but I only ever hear 1 bark.
On the very first bark, if I watch registers $4010-$4013 and $4015, I see the DMC Enable flag (bit 4 of $4015) get set to 1. This causes the DMC to start playback as the the Wiki says it should. But after this initial bit set the DMC Enable is never cleared and set again to cause playback to (re)start.
The only DMC-related registers which are written to following the first bark are $4012 (sample address) and the $4010 frequency index bits. Is writing different values to these registers supposed to (re)start playback somehow? If so, there is no mention of it in any DMC RE'ing documents that I could find. I think I must be missing some critical information about the DCM....
Also, I can see in register $4010 that the DMC Loop flag and DMC Interrupt Enable flag are _not_ set. So this is not a looping problem and its not an interrupt problem.
The only way I know of that the DMC can be manually (re)started (from looking at the documentation I have) is by changing bit 4 of $4015 from 0 to 1. Is there some other way?
Also, if anyone knows if the 3 barks is actually a single "track" of 3 barks or if it is simply 1 bark repeated 3 times that might help me a little bit in my debugging... I am currently assuming it is the same bark "data" repeated 3 times (since it would require the least memory space) but that might be a bad assumption.
Thanks in advance!
Jonathon
When I play bomberman I hear the explosions. When I play Kung Fu I hear the grunts/laughs. But when I play Duck Hunt I hear 1 "arf!" and that's it - no more. When you first start the game the dog actually barks 3 times in a row, but I only ever hear 1 bark.
On the very first bark, if I watch registers $4010-$4013 and $4015, I see the DMC Enable flag (bit 4 of $4015) get set to 1. This causes the DMC to start playback as the the Wiki says it should. But after this initial bit set the DMC Enable is never cleared and set again to cause playback to (re)start.
The only DMC-related registers which are written to following the first bark are $4012 (sample address) and the $4010 frequency index bits. Is writing different values to these registers supposed to (re)start playback somehow? If so, there is no mention of it in any DMC RE'ing documents that I could find. I think I must be missing some critical information about the DCM....
Also, I can see in register $4010 that the DMC Loop flag and DMC Interrupt Enable flag are _not_ set. So this is not a looping problem and its not an interrupt problem.
The only way I know of that the DMC can be manually (re)started (from looking at the documentation I have) is by changing bit 4 of $4015 from 0 to 1. Is there some other way?
Also, if anyone knows if the 3 barks is actually a single "track" of 3 barks or if it is simply 1 bark repeated 3 times that might help me a little bit in my debugging... I am currently assuming it is the same bark "data" repeated 3 times (since it would require the least memory space) but that might be a bad assumption.
Thanks in advance!
Jonathon