Hi.
Hypothetical scenario. Let's say I do this a bank switch:
And the NMI triggers between the 8000/8001. Lets say the NMI also does bank switches for audio and other things. Lets also assume the NMI is being nice and pushing/popping all registers.
What will happen when the code resumes and does that 8001 store?
Will it do anything, will it be ignored?
I read that it is good practice to first store the bank you want to switch to to a variable, so you can restore all banks at the end of NMI to prevent these kind of issues. Does it apply to this exact scenario?
Thanks.
-Mat
Hypothetical scenario. Let's say I do this a bank switch:
Code:
lda xxx
sta $8000
; NMI triggers here
lda yyy
sta $8001
sta $8000
; NMI triggers here
lda yyy
sta $8001
And the NMI triggers between the 8000/8001. Lets say the NMI also does bank switches for audio and other things. Lets also assume the NMI is being nice and pushing/popping all registers.
What will happen when the code resumes and does that 8001 store?
Will it do anything, will it be ignored?
I read that it is good practice to first store the bank you want to switch to to a variable, so you can restore all banks at the end of NMI to prevent these kind of issues. Does it apply to this exact scenario?
Thanks.
-Mat