diff --git a/source/6522.cpp b/source/6522.cpp index 9678e484..e4101a3a 100644 --- a/source/6522.cpp +++ b/source/6522.cpp @@ -345,9 +345,11 @@ BYTE SY6522::Read(BYTE nReg) { case 0x00: // IRB nValue = m_regs.ORB | (m_regs.DDRB ^ 0xff); // Input bits read back as 1's (GH#1260) + if (m_isMegaAudio) nValue = 0x00; // MegaAudio: IRB just reads as $00 break; case 0x01: // IRA nValue = m_regs.ORA | (m_isBusDriven ? 0x00 : (m_regs.DDRA ^ 0xff)); // NB. Inputs bits driven by AY8913 if in PSG READ mode + if (m_isMegaAudio) nValue = 0x00; // MegaAudio: IRA just reads as $00 break; case 0x02: // DDRB nValue = m_regs.DDRB; diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp index 15092fb0..068e8dbe 100644 --- a/source/Mockingboard.cpp +++ b/source/Mockingboard.cpp @@ -313,18 +313,10 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value) { bool busState = true; // Initially default to true - if (QueryType() != CT_MegaAudio) - { - if (pMB->isChipSelected[ay] && pMB->isAYLatchedAddressValid[ay]) - r6522.SetRegIRA(AYReadReg(subunit, ay, pMB->nAYCurrentRegister[ay]) & (r6522.GetReg(SY6522::rDDRA) ^ 0xff)); - else - busState = false; - } + if (pMB->isChipSelected[ay] && pMB->isAYLatchedAddressValid[ay]) + r6522.SetRegIRA(AYReadReg(subunit, ay, pMB->nAYCurrentRegister[ay]) & (r6522.GetReg(SY6522::rDDRA) ^ 0xff)); else - { - r6522.SetRegIRA(0x00); // Reads not supported - always return 0x00. - busState = true; - } + busState = false; if (m_phasorEnable && m_phasorMode == PH_Phasor) // GH#1192 {