Properly catch the use of multiple Z80 cards. (PR #1184)

This commit is contained in:
ThorstenB 2023-02-20 20:57:25 +01:00 committed by GitHub
parent cc07dc7f7b
commit e3863d47de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -87,7 +87,7 @@ void CardManager::InsertInternal(UINT slot, SS_CARDTYPE type)
case CT_Z80:
_ASSERT(m_pZ80Card == NULL);
if (m_pZ80Card) break; // Only support one Z80 card
m_slot[slot] = new Z80Card(slot);
m_slot[slot] = m_pZ80Card = new Z80Card(slot);
break;
case CT_Phasor:
m_slot[slot] = new MockingboardCard(slot, type);
@ -167,6 +167,9 @@ void CardManager::RemoveInternal(UINT slot)
case CT_LanguageCardIIe:
m_pLanguageCard = NULL;
break;
case CT_Z80:
m_pZ80Card = NULL;
break;
}
UnregisterIoHandler(slot);

View File

@ -83,5 +83,5 @@ private:
class CSuperSerialCard* m_pSSC;
class LanguageCardUnit* m_pLanguageCard;
class ParallelPrinterCard* m_pParallelPrinterCard;
class m_pZ80Card* m_pZ80Card;
class Z80Card* m_pZ80Card;
};