So in other words, the main thread assumes the function select register is a constant, and all of the "threaded" routines will automatically reset it to that constant when finished? That makes sense, that's probably how most games use the mapper anyway; I'm not sure why I thought it was going to be a big hairy deal.tepples wrote:MMC3 is easy to make thread-safe: during the main thread, leave the switchable bank at set at 7 (PRG ROM bank at CPU $A000-$BFFF). Switch bank 6 (PRG ROM bank at $C000-$DFFF) only in the DPCM playback routine, and switch banks 0-5 (CHR ROM) only in the NMI and scanline IRQ handlers.
I still think you guys should try your hand at assembly. From the looks of it, you're already moving closer and closer to a low-level language anyway. As long as you comment your assembly really thoroughly, it's pretty workable (if you look at any of my source code, I write comments like I'm re-teaching myself how my code works and what I was thinking). The bonus is that you get to use whatever mapper you want.