I like my code to remain in the fixed bank because I think switching the bank is too risky and too much of a hazzle. That's why I attempt to use the switchable banks only for data.
But now that my game uses MMC1 with battery save, I thought of a way to extend the available room for code should it ever become too small:
Would it be possible to use the otherwise unused space in WRAM for code?
You store the code that doesn't fit into the fixed bank anymore somewhere into another bank. And at program startup, you copy that code from the other bank into WRAM. Now you have up to 8 KB (minus the stuff you need for savestates) as additional always available program code.
Would this be possible?
The only problem that I see is: The WRAM has different addresses than the switchable bank. How do you organize your source code, so that you can still call these functions normally?
But now that my game uses MMC1 with battery save, I thought of a way to extend the available room for code should it ever become too small:
Would it be possible to use the otherwise unused space in WRAM for code?
You store the code that doesn't fit into the fixed bank anymore somewhere into another bank. And at program startup, you copy that code from the other bank into WRAM. Now you have up to 8 KB (minus the stuff you need for savestates) as additional always available program code.
Would this be possible?
The only problem that I see is: The WRAM has different addresses than the switchable bank. How do you organize your source code, so that you can still call these functions normally?