Nextor icon indicating copy to clipboard operation
Nextor copied to clipboard

EXB_RAM restore secondary slot(#75)

Open uniabis opened this issue 3 years ago • 3 comments

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.

uniabis avatar Apr 07 '22 03:04 uniabis

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!

Konamiman avatar Jul 04 '22 09:07 Konamiman

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:

  1. Set Nextor cartridge to slot1.
  2. Set another Nextor cartridge with LARGE mapper RAM to slot2.
  3. Load COMMAND2.COM 2.44.(It calls EXTBIO from page1 on boot) and stop on initializing COMMAND2.COM.

Issue #75 is same problem.

uniabis avatar Jul 05 '22 00:07 uniabis

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!

Konamiman avatar Jul 13 '22 16:07 Konamiman