Another way to handle this is to save the current bank number in a known memory location in each ROM bank. Not really beneficial over using RAM though.GradualGames wrote:...rainwarrior wrote:Do you need current_bank at all? Why not just always switch to the requested bank?
But yeah, I think it's very important to be aware of all sorts of concurrency issues that can arise even in the seemingly simple scenario of two threads (with a special case where only one of them (vblank) can interrupt the other) on a uniprocessor system.