CP/M (and MP/M) is oriented around the OS residing in high memory, so the only scheme that makes sense is to have common memory up high.Just out of curiosity, could DR have done it the other way around? Could they have decided to make the top the bank and the bottom the common area?
Can a bank be switched out while code is running in it as long as it is done so that once the switch is done the next instruction is the right one?
Theoretically yes, practically no. CP/M programs are loaded at 0x0100, which would be in the common area - and the BDOS/BIOS are expected at the top of memory, which is switched out. It would be an inefficient and complex system, and incompatible with existing applications.Could they have decided to make the top the bank and the bottom the common area?
Yes, but it is tricky. You need to replicate the bank switching code in all banks, and make sure to continue execution somewhere. Some NES games can only switch the whole ROM area at once, so they do that. Others use some precious RAM to execute the switching routine from.Can a bank be switched out while code is running in it as long as it is done so that once the switch is done the next instruction is the right one?