Fix so that MockingboardCardMgr asserts IRQ based on the wired-OR sum of all MB card's 6522s. (Fixes #1173)

This commit is contained in:
tomcw
2023-01-29 13:32:55 +00:00
parent c56d341bdb
commit cf722ff0cc
5 changed files with 23 additions and 9 deletions
+16
View File
@@ -32,6 +32,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "MockingboardCardManager.h"
#include "Core.h"
#include "CardManager.h"
#include "CPU.h"
#include "Mockingboard.h"
#include "MockingboardDefs.h"
#include "Riff.h"
@@ -108,6 +109,21 @@ void MockingboardCardManager::UpdateCycles(ULONG executedCycles)
}
}
void MockingboardCardManager::UpdateIRQ(void)
{
bool irq = false;
for (UINT i = SLOT0; i < NUM_SLOTS; i++)
{
if (IsMockingboard(i))
irq |= dynamic_cast<MockingboardCard&>(GetCardMgr().GetRef(i)).Is6522IRQ();
}
if (irq)
CpuIrqAssert(IS_6522);
else
CpuIrqDeassert(IS_6522);
}
bool MockingboardCardManager::IsActive(void)
{
if (!m_mockingboardVoice.bActive)