mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-02-04 10:30:34 +00:00
Fix: HDD wasn't booting ($C0Fx I/O wasn't registered)
This commit is contained in:
parent
637155954e
commit
f2aa8898fd
@ -223,6 +223,9 @@ bool HD_CardIsEnabled()
|
|||||||
return g_bHD_RomLoaded && g_bHD_Enabled;
|
return g_bHD_RomLoaded && g_bHD_Enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called by:
|
||||||
|
// . LoadConfiguration() - Done at each restart
|
||||||
|
// . DiskDlg_OK() - When HD is enabled/disabled on UI
|
||||||
void HD_SetEnabled(bool bEnabled)
|
void HD_SetEnabled(bool bEnabled)
|
||||||
{
|
{
|
||||||
if(g_bHD_Enabled == bEnabled)
|
if(g_bHD_Enabled == bEnabled)
|
||||||
@ -230,16 +233,18 @@ void HD_SetEnabled(bool bEnabled)
|
|||||||
|
|
||||||
g_bHD_Enabled = bEnabled;
|
g_bHD_Enabled = bEnabled;
|
||||||
|
|
||||||
|
RegisterIoHandler(g_uSlot, HD_IO_EMUL, HD_IO_EMUL, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
LPBYTE pCxRomPeripheral = MemGetCxRomPeripheral();
|
LPBYTE pCxRomPeripheral = MemGetCxRomPeripheral();
|
||||||
if(pCxRomPeripheral == NULL) // This will be NULL when called after loading value from Registry
|
if(pCxRomPeripheral == NULL) // This will be NULL when called after loading value from Registry
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
if(g_bHD_Enabled)
|
if(g_bHD_Enabled)
|
||||||
HD_Load_Rom(pCxRomPeripheral, g_uSlot);
|
HD_Load_Rom(pCxRomPeripheral, g_uSlot);
|
||||||
else
|
else
|
||||||
memset(pCxRomPeripheral + g_uSlot*256, 0, HDDRVR_SIZE);
|
memset(pCxRomPeripheral + g_uSlot*256, 0, HDDRVR_SIZE);
|
||||||
|
|
||||||
RegisterIoHandler(g_uSlot, HD_IO_EMUL, HD_IO_EMUL, NULL, NULL, NULL, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LPCTSTR HD_GetFullName (int nDrive)
|
LPCTSTR HD_GetFullName (int nDrive)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user