I remember reading at some point about the possibility of having several NMI handlers for different situations. How many of you utilise this? Those of you who do/have, why did you decided to utilise them?
Even just starting out, I'm starting to feel like this_flag and that_flag as a means of communicating between the main and NMI threads could start to get rather cumbersome. Maybe I'm looking for a solution in the wrong place, but it seems like multiple NMI handlers could help with that somewhat. I had in mind a jump table based on a variable that is set in main; a bit to indicate the PPU should be turned off/back on, a bit to indicate the palette should be changed, something akin to that. Sort of feel like it would be preferable to have several NMI handlers for different situations/purposes, than to have one big NMI with lots of branch conditions that ends up all spaghetti-like. Of course, you'd probably struggle to fit every possible condition in 8 bits, but I thought of this as more of a supplement to the flags, I suppose.
Probably way off mark here, but I had to ask. Thanks
P.S. (Would it be preferable to have a general thread of my questions instead of new ones? Not that I plan on posting more right away, but I'm making a more concerted effort to to be prepared this time before attempting to code a game proper)
Even just starting out, I'm starting to feel like this_flag and that_flag as a means of communicating between the main and NMI threads could start to get rather cumbersome. Maybe I'm looking for a solution in the wrong place, but it seems like multiple NMI handlers could help with that somewhat. I had in mind a jump table based on a variable that is set in main; a bit to indicate the PPU should be turned off/back on, a bit to indicate the palette should be changed, something akin to that. Sort of feel like it would be preferable to have several NMI handlers for different situations/purposes, than to have one big NMI with lots of branch conditions that ends up all spaghetti-like. Of course, you'd probably struggle to fit every possible condition in 8 bits, but I thought of this as more of a supplement to the flags, I suppose.
Probably way off mark here, but I had to ask. Thanks
P.S. (Would it be preferable to have a general thread of my questions instead of new ones? Not that I plan on posting more right away, but I'm making a more concerted effort to to be prepared this time before attempting to code a game proper)