mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-09 20:34:50 +00:00
HDD: Fixed not being able to enable HDDs - regression introduced at 506a52f3598a628d47ca5cb5fb0370abf79446fb
This commit is contained in:
parent
826dc6625e
commit
31b78aa09a
@ -676,7 +676,7 @@ void LoadConfiguration(void)
|
|||||||
g_bPrinterAppend = dwTmp ? true : false;
|
g_bPrinterAppend = dwTmp ? true : false;
|
||||||
|
|
||||||
|
|
||||||
if(REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp))
|
if(REGLOAD(TEXT(REGVALUE_HDD_ENABLED), &dwTmp)) // TODO: Change to REGVALUE_SLOT7
|
||||||
HD_SetEnabled(dwTmp ? true : false);
|
HD_SetEnabled(dwTmp ? true : false);
|
||||||
|
|
||||||
if(REGLOAD(TEXT(REGVALUE_PDL_XTRIM), &dwTmp))
|
if(REGLOAD(TEXT(REGVALUE_PDL_XTRIM), &dwTmp))
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
m_SlotAux = CT_Empty;
|
m_SlotAux = CT_Empty;
|
||||||
m_Slot[4] = g_Slot[4];
|
m_Slot[4] = g_Slot[4];
|
||||||
m_Slot[5] = g_Slot[5];
|
m_Slot[5] = g_Slot[5];
|
||||||
|
m_Slot[7] = g_Slot[7];
|
||||||
}
|
}
|
||||||
|
|
||||||
const CConfigNeedingRestart& operator= (const CConfigNeedingRestart& other)
|
const CConfigNeedingRestart& operator= (const CConfigNeedingRestart& other)
|
||||||
|
@ -118,16 +118,28 @@ void CPropertySheetHelper::SaveCpuType(eCpuType NewCpuType)
|
|||||||
REGSAVE(TEXT(REGVALUE_CPU_TYPE), NewCpuType);
|
REGSAVE(TEXT(REGVALUE_CPU_TYPE), NewCpuType);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPropertySheetHelper::SetSlot4(SS_CARDTYPE NewCardType)
|
void CPropertySheetHelper::SetSlot(UINT slot, SS_CARDTYPE newCardType)
|
||||||
{
|
{
|
||||||
g_Slot[4] = NewCardType;
|
_ASSERT(slot < NUM_SLOTS);
|
||||||
REGSAVE(TEXT(REGVALUE_SLOT4), (DWORD)g_Slot[4]);
|
if (slot >= NUM_SLOTS)
|
||||||
}
|
return;
|
||||||
|
|
||||||
void CPropertySheetHelper::SetSlot5(SS_CARDTYPE NewCardType)
|
g_Slot[slot] = newCardType;
|
||||||
{
|
|
||||||
g_Slot[5] = NewCardType;
|
std::string slotText;
|
||||||
REGSAVE(TEXT(REGVALUE_SLOT5), (DWORD)g_Slot[5]);
|
switch (slot)
|
||||||
|
{
|
||||||
|
case 0: slotText = REGVALUE_SLOT0; break;
|
||||||
|
case 1: slotText = REGVALUE_SLOT1; break;
|
||||||
|
case 2: slotText = REGVALUE_SLOT2; break;
|
||||||
|
case 3: slotText = REGVALUE_SLOT3; break;
|
||||||
|
case 4: slotText = REGVALUE_SLOT4; break;
|
||||||
|
case 5: slotText = REGVALUE_SLOT5; break;
|
||||||
|
case 6: slotText = REGVALUE_SLOT6; break;
|
||||||
|
case 7: slotText = REGVALUE_SLOT7; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
REGSAVE(slotText.c_str(), (DWORD)g_Slot[slot]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Looks like a (bad) C&P from SaveStateSelectImage()
|
// Looks like a (bad) C&P from SaveStateSelectImage()
|
||||||
@ -395,15 +407,21 @@ void CPropertySheetHelper::ApplyNewConfig(const CConfigNeedingRestart& ConfigNew
|
|||||||
SaveCpuType(ConfigNew.m_CpuType);
|
SaveCpuType(ConfigNew.m_CpuType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CONFIG_CHANGED_LOCAL(m_Slot[4]))
|
UINT slot = 4;
|
||||||
SetSlot4(ConfigNew.m_Slot[4]);
|
if (CONFIG_CHANGED_LOCAL(m_Slot[slot]))
|
||||||
|
SetSlot(slot, ConfigNew.m_Slot[slot]);
|
||||||
|
|
||||||
if (CONFIG_CHANGED_LOCAL(m_Slot[5]))
|
slot = 5;
|
||||||
SetSlot5(ConfigNew.m_Slot[5]);
|
if (CONFIG_CHANGED_LOCAL(m_Slot[slot]))
|
||||||
|
SetSlot(slot, ConfigNew.m_Slot[slot]);
|
||||||
|
|
||||||
|
// slot = 7;
|
||||||
|
// if (CONFIG_CHANGED_LOCAL(m_Slot[slot]))
|
||||||
|
// SetSlot(slot, ConfigNew.m_Slot[slot]);
|
||||||
|
|
||||||
if (CONFIG_CHANGED_LOCAL(m_bEnableHDD))
|
if (CONFIG_CHANGED_LOCAL(m_bEnableHDD))
|
||||||
{
|
{
|
||||||
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), ConfigNew.m_bEnableHDD ? 1 : 0);
|
REGSAVE(TEXT(REGVALUE_HDD_ENABLED), ConfigNew.m_bEnableHDD ? 1 : 0); // TODO: Change to REGVALUE_SLOT7
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CONFIG_CHANGED_LOCAL(m_bEnableTheFreezesF8Rom))
|
if (CONFIG_CHANGED_LOCAL(m_bEnableTheFreezesF8Rom))
|
||||||
|
@ -14,8 +14,7 @@ public:
|
|||||||
virtual ~CPropertySheetHelper(){}
|
virtual ~CPropertySheetHelper(){}
|
||||||
|
|
||||||
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
|
void FillComboBox(HWND window, int controlid, LPCTSTR choices, int currentchoice);
|
||||||
void SetSlot4(SS_CARDTYPE NewCardType);
|
void SetSlot(UINT slot, SS_CARDTYPE newCardType);
|
||||||
void SetSlot5(SS_CARDTYPE NewCardType);
|
|
||||||
std::string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS);
|
std::string BrowseToFile(HWND hWindow, TCHAR* pszTitle, TCHAR* REGVALUE,TCHAR* FILEMASKS);
|
||||||
void SaveStateUpdate();
|
void SaveStateUpdate();
|
||||||
int SaveStateSelectImage(HWND hWindow, TCHAR* pszTitle, bool bSave);
|
int SaveStateSelectImage(HWND hWindow, TCHAR* pszTitle, bool bSave);
|
||||||
|
@ -147,7 +147,7 @@ struct HDD
|
|||||||
ImageInfo* imagehandle; // Init'd by HD_Insert() -> ImageOpen()
|
ImageInfo* imagehandle; // Init'd by HD_Insert() -> ImageOpen()
|
||||||
bool bWriteProtected; // Needed for ImageOpen() [otherwise not used]
|
bool bWriteProtected; // Needed for ImageOpen() [otherwise not used]
|
||||||
//
|
//
|
||||||
BYTE hd_error;
|
BYTE hd_error; // NB. Firmware requires that b0=0 (OK) or b0=1 (Error)
|
||||||
WORD hd_memblock;
|
WORD hd_memblock;
|
||||||
UINT hd_diskblock;
|
UINT hd_diskblock;
|
||||||
WORD hd_buf_ptr;
|
WORD hd_buf_ptr;
|
||||||
@ -275,6 +275,7 @@ void HD_SetEnabled(const bool bEnabled)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
g_bHD_Enabled = bEnabled;
|
g_bHD_Enabled = bEnabled;
|
||||||
|
g_Slot[7] = bEnabled ? CT_GenericHDD : CT_Empty;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// FIXME: For LoadConfiguration(), g_uSlot=7 (see definition at start of file)
|
// FIXME: For LoadConfiguration(), g_uSlot=7 (see definition at start of file)
|
||||||
@ -595,6 +596,12 @@ static BYTE __stdcall HD_IO_EMUL(WORD pc, WORD addr, BYTE bWrite, BYTE d, ULONG
|
|||||||
#if HD_LED
|
#if HD_LED
|
||||||
pHDD->hd_status_next = DISK_STATUS_OFF; // TODO: FIXME: ??? YELLOW ??? WARNING
|
pHDD->hd_status_next = DISK_STATUS_OFF; // TODO: FIXME: ??? YELLOW ??? WARNING
|
||||||
#endif
|
#endif
|
||||||
|
if (pHDD->hd_error)
|
||||||
|
{
|
||||||
|
_ASSERT(pHDD->hd_error & 1);
|
||||||
|
pHDD->hd_error |= 1; // Firmware requires that b0=1 for an error
|
||||||
|
}
|
||||||
|
|
||||||
r = pHDD->hd_error;
|
r = pHDD->hd_error;
|
||||||
break;
|
break;
|
||||||
case 0xF2:
|
case 0xF2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user