Page 1 of 1

DMC IRQ behaviour

Posted: Tue Jun 05, 2012 12:19 pm
by Roni
I'm trying to get my program to exhibit the working of $4010.7. it should be as simple as

Code: Select all

lda #$80
sta $4010
lda #$10
sta $4015
but the IRQ that the wiki talks about never happens.(in all the emulators I've tried)

I've been reading docs and coding seemingly aimlessly for days, and finally my frustration brings me back here grovelling for answers. I don't know whether it's an emulator problem or my understanding but no matter what I try, no matter which registers I set up in what order with what values, I can't get the DMC to trigger an IRQ at the end of a sample, as described in all the documentation. if there was some example code or program that successfully exhibits this function it would be a great help to study but I can't find anything like that so far.

Posted: Tue Jun 05, 2012 12:34 pm
by Dwedit
Set the DMC length counter first.

Posted: Tue Jun 05, 2012 12:41 pm
by Roni
didn't work.

Posted: Tue Jun 05, 2012 12:45 pm
by Dwedit
Make sure CPU interrupts are enabled, and frame IRQs are disabled.

Posted: Tue Jun 05, 2012 1:04 pm
by Roni
whoa, somehow I must've missed that. an $ff to $4017 fixed it.

I guess I should've investigated on $4017 more. thanks for clarifying what the wiki didn't.