Welp, back with another newb question.
I assume that with my mapper #0, 32k PRG-ROM, that it is loaded into the NES' CPU memory to run. So that means I can use self modifying code.... right?
Well, I tried to assuming it would work (speeding up my code some more.). Basically it's like this....
However, stepping through it in Nintendulator and NESten several times, I see that the "sta store_new_byte+2" does not actually change the hi byte of the sta map_buffer,x 's address ("label"+2). It's odd to me. The addresses are compiled right, everything is in order until it gets there, and executes the sta instruction just mentioned, but does not change the memory address in the labeled sta ##,x.
I'm not sure why this is not happening so I've come to ask if there's something I'm missing here. I thought I could use SMC since the program data that is running is in CPU RAM.
I tried not to ask another dumb question, but I couldn't find any information regarding this.
I assume that with my mapper #0, 32k PRG-ROM, that it is loaded into the NES' CPU memory to run. So that means I can use self modifying code.... right?
Well, I tried to assuming it would work (speeding up my code some more.). Basically it's like this....
Code:
lda map_pointer_hi
sta store_new_byte+2
.
.
.
.
store_new_byte:
sta map_buffer,x
sta store_new_byte+2
.
.
.
.
store_new_byte:
sta map_buffer,x
However, stepping through it in Nintendulator and NESten several times, I see that the "sta store_new_byte+2" does not actually change the hi byte of the sta map_buffer,x 's address ("label"+2). It's odd to me. The addresses are compiled right, everything is in order until it gets there, and executes the sta instruction just mentioned, but does not change the memory address in the labeled sta ##,x.
I'm not sure why this is not happening so I've come to ask if there's something I'm missing here. I thought I could use SMC since the program data that is running is in CPU RAM.
I tried not to ask another dumb question, but I couldn't find any information regarding this.