AY8913: Fix regression at 2d086e87

- Phasor does support reading regs in MB mode & Phasor native mode (but not Echo+ mode).
This commit is contained in:
tomcw 2021-05-16 19:19:04 +01:00
parent 5f6a5361c0
commit 23c4f8414c
1 changed files with 2 additions and 2 deletions

View File

@ -341,8 +341,8 @@ static void AY8910_Write(BYTE nDevice, BYTE /*nReg*/, BYTE nValue, BYTE nAYDevic
break;
case AY_READ: // 5: READ FROM PSG (need to set DDRA to input)
if (g_bPhasorEnable)
pMB->sy6522.ORA = 0xff & (pMB->sy6522.DDRA ^ 0xff); // Phasor doesn't support reading AY8913s - it just reads 1's for the input bits
if (g_bPhasorEnable && g_phasorMode == PH_EchoPlus)
pMB->sy6522.ORA = 0xff & (pMB->sy6522.DDRA ^ 0xff); // Phasor (Echo+ mode) doesn't support reading AY8913s - it just reads 1's for the input bits
else
pMB->sy6522.ORA = AYReadReg(nDevice+2*nAYDevice, pMB->nAYCurrentRegister) & (pMB->sy6522.DDRA ^ 0xff);
break;