EXB_RAM restore secondary slot(#75)
In case of COMMAND2.COM 2.4x, two or more Nextor kernels, primary memory mapper and secondary Nextor kernel are on same primary slot.
Example:
slot 1 MegaFlashROM SCC+SD 1-0 MFR Recovery 1-1 MFR SCC 1-2 MFR Secondary Memory Mapper 512KB 1-3 MFR Master Nextor kernel with MFR driver
slot 2 Carnivore2 2-0 C2 Menu 2-1 C2 Secondary Nextor kernel with Sunrise IDE driver 2-2 C2 Primary MMM Mapper 1MB 2-3 C2 FM-PAC
COMMAND2.COM initial slot state.
|Pg0|Pg1|Pg2|Pg3| |2-2|2-2|2-2|2-2|
COMMAND2.COM 2.4x calls EXTBIO to allocate mapper segment.
CALLF in page3 RAM changes slot of page1 to master kernel.
|Pg0|Pg1|Pg2|Pg3| |2-2|1-3|2-2|2-2|
Master kernel calls EXB_RAM.
EXB_RAM in page3 changes slot of page1 to secondary kernel.
|Pg0|Pg1|Pg2|Pg3| |2-2|2-1|2-2|2-2|
EXB_RAM in page3 changes slot of page1 to master kernel, and return.
|Pg0|Pg1|Pg2|Pg3| |2-2|1-3|2-2|2-2|
CALLF restore primary slot and secondary slot of slot1 , but not secondary slot of slot2.
|Pg0|Pg1|Pg2|Pg3| |2-2|2-1|2-2|2-2|
Return to page1, but page1 is not primary mapper RAM.
Closes #75.
Hi @uniabis, sorry for taking so long to take a look at this. Could you please provide some additional context in the description of the pull request? What's the exact problem you are fixing, how does it manifest, and what are the steps to reproduce it? Many thanks!
Problem: EXTBIO(0FFCAh) from RAM on page1 cannot return.
Condition: RAM and secondary kernel are extended slots on SAME primary slot.
slot A-? primary Nextor kernel slot B-X secondary Nextor kernel slot B-Y RAM(primary mapper)
Steps to reproduce:
- Set Nextor cartridge to slot1.
- Set another Nextor cartridge with LARGE mapper RAM to slot2.
- Load COMMAND2.COM 2.44.(It calls EXTBIO from page1 on boot) and stop on initializing COMMAND2.COM.
Issue #75 is same problem.
Amazing, I've been able to reproduce the issue and to verify that the fix works. Still need to confirm but I suspect that this is also the reason why the MegaFlashROM SCC+ SD doesn't work on the SX|2. Many thanks!