DMC IRQ behaviour

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

Post Reply
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

DMC IRQ behaviour

Post 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.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Set the DMC length counter first.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post by Roni »

didn't work.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

Make sure CPU interrupts are enabled, and frame IRQs are disabled.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Roni
Posts: 114
Joined: Fri Sep 26, 2008 7:55 pm
Location: Montreal
Contact:

Post 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.
Post Reply