Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXB_RAM restore secondary slot(#75) #103

Merged
merged 4 commits into from Aug 31, 2022
Merged

EXB_RAM restore secondary slot(#75) #103

merged 4 commits into from Aug 31, 2022

Conversation

uniabis
Copy link
Contributor

@uniabis uniabis commented Apr 7, 2022

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.

@Konamiman
Copy link
Owner

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!

@uniabis
Copy link
Contributor Author

uniabis commented Jul 5, 2022

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.

@Konamiman Konamiman changed the base branch from v2.1 to v2.1.1 July 13, 2022 16:20
@Konamiman Konamiman added this to the v2.1.1 final milestone Jul 13, 2022
@Konamiman
Copy link
Owner

Konamiman commented Jul 13, 2022

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 Konamiman merged commit e4fc297 into Konamiman:v2.1.1 Aug 31, 2022
@Konamiman Konamiman mentioned this pull request Aug 31, 2022
@uniabis uniabis deleted the exb_ram_restore_secondary_slot branch September 8, 2022 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants