Closed JMarlin closed 3 months ago
Important note: For some reason, it didn't occur to me that we still need to access the slot and switches when we're running the BIOS out of RAM. Figured out a hack wherein the high/low SRAM mapping is backwards from what it currently is between modes 0 and 2 and SRAM is selected in the ROM position in mode 2, but is otherwise the same. That way, when we start up in mode 0 we can copy the BIOS right into high physical SRAM and then switch into mode 2 running out of SRAM without really caring what physical portion of SRAM is mapped into the low cart area.
This is going to require some changes to both the PLD equations and the NES game loader code to work properly, which hasn't been implemented yet.
Fixed up and tested the PLD to match the aforementioned scheme
Note to myself about RAM availability: ostensibly, once we're in NOS, we can switch to one of the all-RAM modes and switch in and out of mode 2 when we need to do disk access. That should give us gobs of room for things like BASIC if we're going to end up wanting it.
Description
In order to waste as little space as possible in our limited memory, I would like to harness the flexible memory mapping in the NES II cartridge to allow me to effectively add more system code to the BIOS area after boot in the form of binary overlays
Acceptance criteria
BIOS uses a flag in the ROM area to check whether it's already running out of RAM or not and not swap if it is