MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / SetMemModeFromSnapshot

Method SetMemModeFromSnapshot

source/LanguageCard.cpp:677–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677void LanguageCardManager::SetMemModeFromSnapshot(void)
678{
679 // If multiple "Language Cards" (eg. LC+Saturn or 2xSaturn) then setup via the last card that selected the 16KB LC bank.
680 // NB. Skip if not Saturn card (ie. a LC), since LC's are only in slot0 and in the ctor it has called SetMainMemLanguageCard()
681 if (GetCardMgr().QuerySlot(m_lastSlotToSetMainMemLCFromSnapshot) == CT_Saturn128K)
682 {
683 Saturn128K& saturn = dynamic_cast<Saturn128K&>(GetCardMgr().GetRef(m_lastSlotToSetMainMemLCFromSnapshot));
684 saturn.SetMemMainLanguageCard();
685 }
686
687 if (GetCardMgr().QuerySlot(m_lastSlotToSetMainMemLCFromSnapshot) != CT_Empty)
688 {
689 // TODO: check this is still correct for GH#1495 issue
690 LanguageCardUnit& card = dynamic_cast<LanguageCardUnit&>(GetCardMgr().GetRef(m_lastSlotToSetMainMemLCFromSnapshot));
691 ::SetMemMode((GetMemMode() & ~MF_LANGCARD_MASK) | (card.GetLCMemMode() & MF_LANGCARD_MASK));
692 }
693}
694
695bool LanguageCardManager::SetLanguageCard(SS_CARDTYPE type)
696{

Callers 1

Calls 5

SetMemModeFunction · 0.85
GetMemModeFunction · 0.85
QuerySlotMethod · 0.80
GetLCMemModeMethod · 0.80

Tested by

no test coverage detected