Talk:The frame and NMIs

From NESdev Wiki
Revision as of 05:15, 7 October 2014 by Memblers (talk | contribs) (Created page with "quote "You can't keep the music updated during slowdown, or during bulk drawing transitions, because NMIs will be disabled" Sure you can. I'm not sure if I should edit it in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

quote "You can't keep the music updated during slowdown, or during bulk drawing transitions, because NMIs will be disabled"

Sure you can. I'm not sure if I should edit it in, I don't want to turning a newbie-friendly article into a technical dorkfest, but I was thinking of this: first instruction in the NMI would be 'inc nmi_nest_level', and last NMI instruction (before RTI) would be 'dec nmi_nest_level' the NMI routine would check the nest_level variable, if it is higher than 1, then you could could the play music, then exit. To avoid corrupting temporary variables in the music play routine, you would need to guarantee that the music routine can never be interrupted.