Fix for: 21 1E 00 FF 00 (AY READ wasn't setting correct 6522's busState)

This commit is contained in:
tomcw 2024-01-30 07:32:23 +00:00
parent d84d94798e
commit 70d453a590
2 changed files with 7 additions and 6 deletions

View File

@ -282,6 +282,9 @@ void MockingboardCard::AY8913_Reset(BYTE subunit)
AY8910_reset(subunit, AY8913_DEVICE_B); // GH#1197: Reset both AYs regardless of Phasor mode & chip-select bits
m_MBSubUnit[subunit].Reset(QueryType());
if (QueryType() == CT_SDMusic)
m_MBSubUnit[0].SetBusState(false);
}
void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value)
@ -330,7 +333,10 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value)
}
}
pMB->SetBusState(busState, r6522); // NB. Need to pass SY6522 as card may only have one (eg. CT_SDMusic)
if (QueryType() != CT_SDMusic)
pMB->SetBusState(busState);
else
m_MBSubUnit[0].SetBusState(busState);
}
break;

View File

@ -111,11 +111,6 @@ private:
isBusDriven = state;
sy6522.SetBusBeingDriven(state);
}
void SetBusState(bool state, SY6522& r6522)
{
isBusDriven = state;
r6522.SetBusBeingDriven(state);
}
};
void WriteToORB(BYTE subunit, BYTE subunitForAY=0);