mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-28 02:32:08 +00:00
MegaAudio card: Reads of 6522 IRB & IRA always return 0x00
. generalise the implementation: move AY READ logic down to 6522 read
This commit is contained in:
parent
43daabec54
commit
56cc779351
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user