DMC IRQ behaviour

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
DMC IRQ behaviour
by on (#95072)
I'm trying to get my program to exhibit the working of $4010.7. it should be as simple as

Code:
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.

by on (#95073)
Set the DMC length counter first.

by on (#95074)
didn't work.

by on (#95075)
Make sure CPU interrupts are enabled, and frame IRQs are disabled.

by on (#95076)
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.