mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Make harddisk a class (#995)
. Add user-protection when unchecking HDD controller (as images aren't restored on a 'cancel') . Fix possible crash when removing (via Config->Disk) either Disk2 card(s5) or HDD card(s7), then cancelling during emulation . Fix m_buf[] size
This commit is contained in:
+9
-3
@@ -1012,6 +1012,12 @@ void RegisterIoHandler(UINT uSlot, iofunction IOReadC0, iofunction IOWriteC0, io
|
||||
ExpansionRom[uSlot] = pExpansionRom;
|
||||
}
|
||||
|
||||
void UnregisterIoHandler(UINT uSlot)
|
||||
{
|
||||
RegisterIoHandler(uSlot, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
g_SlotInfo[uSlot].bHasCard = false;
|
||||
}
|
||||
|
||||
// From UTAIIe:5-28: Since INTCXROM==1 then state of SLOTC3ROM is not important
|
||||
static void IoHandlerCardsOut(void)
|
||||
{
|
||||
@@ -1784,14 +1790,14 @@ void MemInitializeIO(void)
|
||||
}
|
||||
else if (GetCardMgr().QuerySlot(SLOT5) == CT_Disk2)
|
||||
{
|
||||
dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT5)).Initialize(pCxRomPeripheral, SLOT5); // $C500 : Disk][ card
|
||||
dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT5)).Initialize(pCxRomPeripheral); // $C500 : Disk][ card
|
||||
}
|
||||
|
||||
if (GetCardMgr().QuerySlot(SLOT6) == CT_Disk2)
|
||||
dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6)).Initialize(pCxRomPeripheral, SLOT6); // $C600 : Disk][ card
|
||||
dynamic_cast<Disk2InterfaceCard&>(GetCardMgr().GetRef(SLOT6)).Initialize(pCxRomPeripheral); // $C600 : Disk][ card
|
||||
|
||||
if (GetCardMgr().QuerySlot(SLOT7) == CT_GenericHDD)
|
||||
HD_Load_Rom(pCxRomPeripheral, SLOT7); // $C700 : HDD f/w
|
||||
dynamic_cast<HarddiskInterfaceCard&>(GetCardMgr().GetRef(SLOT7)).Initialize(pCxRomPeripheral);
|
||||
}
|
||||
|
||||
// Called by:
|
||||
|
||||
Reference in New Issue
Block a user