Talk:The frame and NMIs: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(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...")
 
No edit summary
Line 1: Line 1:
quote "You can't keep the music updated during slowdown, or during bulk drawing transitions, because NMIs will be disabled"
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:
Sure you can (while keeping NMIs enabled, I mean).  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'
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.
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. [[User:Memblers|Memblers]] ([[User talk:Memblers|talk]])

Revision as of 05:17, 7 October 2014

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

Sure you can (while keeping NMIs enabled, I mean). 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. Memblers (talk)