diff --git a/source/Memory.cpp b/source/Memory.cpp index c0d79616..f69112ed 100644 --- a/source/Memory.cpp +++ b/source/Memory.cpp @@ -1326,6 +1326,13 @@ void MemInitializeIO(void) DiskLoadRom(pCxRomPeripheral, 6); // $C600 : Disk][ f/w HD_Load_Rom(pCxRomPeripheral, 7); // $C700 : HDD f/w + + // + + // Finally remove the cards' ROMs at $Csnn if internal ROM is enabled + // . required when restoring saved-state + if (!SW_SLOTCXROM) + IoHandlerCardsOut(); } inline DWORD getRandomTime() @@ -1685,14 +1692,6 @@ LPVOID MemGetSlotParameters(UINT uSlot) //=========================================================================== -void MemLoadSnapshot_SetSlotCxRom(void) -{ - if (!SW_SLOTCXROM) - IoHandlerCardsOut(); -} - -//=========================================================================== - // NB. Don't need to save 'modechanging', as this is just an optimisation to save calling UpdatePaging() twice. // . If we were to save the state when 'modechanging' is set, then on restoring the state, the 6502 code will immediately update the read memory mode. // . This will work correctly. diff --git a/source/Memory.h b/source/Memory.h index d0f12ea1..3a104755 100644 --- a/source/Memory.h +++ b/source/Memory.h @@ -54,7 +54,6 @@ void MemReset (); void MemResetPaging (); void MemUpdatePaging(BOOL initialize); LPVOID MemGetSlotParameters (UINT uSlot); -void MemLoadSnapshot_SetSlotCxRom(void); void MemSetSnapshot_v1(const DWORD MemMode, const BOOL LastWriteRam, const BYTE* const pMemMain, const BYTE* const pMemAux); std::string MemGetSnapshotUnitAuxSlotName(void); void MemSaveSnapshot(class YamlSaveHelper& yamlSaveHelper); diff --git a/source/SaveState.cpp b/source/SaveState.cpp index 39d51596..88254d6a 100644 --- a/source/SaveState.cpp +++ b/source/SaveState.cpp @@ -515,8 +515,6 @@ static void Snapshot_LoadState_v2(void) MemInitializeCustomF8ROM(); MemInitializeIO(); - MemLoadSnapshot_SetSlotCxRom(); // Remove the cards' ROMs at $Csnn if internal ROM is enabled - MemUpdatePaging(TRUE); // g_Apple2Type may've changed: so redraw frame (title, buttons, leds, etc)