I'm developing a game in C (using Fusion-C) and trying to make sure that I understand how the MSX handles running a program from a disk versus from a cartridge ROM. This may be an obvious question but my experience with programming is a bit more high-level than C and I'm finding myself having to go back and re-learn some concepts, so I ask for your patience and understanding.
I know that when a program is loaded from a disk (or cassette, but I'm not using the cassette for this project), the program itself needs to be loaded into the system RAM before it can run-- the Z80's program counter can't address the disk or cassette directly. Does this also hold true for programs running on cartridge ROM, or can cartridge ROM be addressed by the program counter just like if it were system RAM but without consuming system RAM?
The reason I ask is because if the program doesn't need to be loaded into RAM when running from ROM, I believe that it frees up a considerable amount of memory for the program to use versus loading it from disk (which would be further undercut by MSX-DOS also needing to consume memory). This also leads me to wonder if most of the commercially-produced MSX software ran on cartridges for performance reasons rather than copyright protection.
I also have a question about loading a C program from disk in parts, but if running from cartridge frees up more memory, I would rather just use DSK2ROM and not have to worry about partitioning my game code.