Add InitializeIO() to Card and CardManager (PR #999)

. Card::InitializeIO() is pure virtual
. CardManager::InitializeIO() initialises all cards
This commit is contained in:
Andrea
2021-11-11 21:45:55 +00:00
committed by GitHub
parent 25caffe7eb
commit 8662a99179
17 changed files with 100 additions and 96 deletions
+13 -2
View File
@@ -48,7 +48,7 @@ void CardManager::InsertInternal(UINT slot, SS_CARDTYPE type)
switch (type)
{
case CT_Empty:
m_slot[slot] = new EmptyCard;
m_slot[slot] = new EmptyCard(slot);
break;
case CT_Disk2:
m_slot[slot] = new Disk2InterfaceCard(slot);
@@ -150,7 +150,7 @@ void CardManager::InsertAuxInternal(SS_CARDTYPE type)
switch (type)
{
case CT_Empty:
m_aux = new EmptyCard;
m_aux = new EmptyCard(SLOT_AUX);
break;
case CT_80Col:
m_aux = new DummyCard(type, SLOT_AUX);
@@ -188,3 +188,14 @@ void CardManager::RemoveAux(void)
{
InsertAux(CT_Empty);
}
void CardManager::InitializeIO(LPBYTE pCxRomPeripheral)
{
for (UINT i = 0; i < NUM_SLOTS; ++i)
{
if (m_slot[i])
{
m_slot[i]->InitializeIO(pCxRomPeripheral);
}
}
}