diff --git a/source/Mockingboard.cpp b/source/Mockingboard.cpp index 2178bd21..2466ee9a 100644 --- a/source/Mockingboard.cpp +++ b/source/Mockingboard.cpp @@ -74,7 +74,7 @@ MockingboardCard::MockingboardCard(UINT slot, SS_CARDTYPE type) : Card(type, slo m_regAccessedFlag = false; m_isActive = false; - m_phasorEnable = (QueryType() == CT_Phasor); + m_isPhasorCard = (QueryType() == CT_Phasor); SetPhasorMode(PH_Mockingboard); // + re-init's AY CLK m_lastMBUpdateCycle = 0; @@ -223,7 +223,7 @@ void MockingboardCard::WriteToORB(BYTE subunit, BYTE subunitForAY/*=0*/) if ((subunit & 1) == 1) AY8910_Write(subunit, 0, nValue); #else - if (m_phasorEnable) + if (m_isPhasorCard) { const int kAY1 = 2; // Phasor/Echo+ mode: bit4=0 (active low) selects the 1st AY8913, ie. the only AY8913 in Mockingboard mode (confirmed on real Phasor h/w) const int kAY2 = 1; // Phasor/Echo+ mode: bit3=0 (active low) selects the 2nd AY8913 attached to this 6522 (unavailable in Mockingboard mode) @@ -299,10 +299,10 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value) MockingboardUnitState_e& state = pMB->state[ay]; // GH#659 #if _DEBUG - if (!m_phasorEnable || m_phasorMode == PH_Mockingboard) + if (!m_isPhasorCard || m_phasorMode == PH_Mockingboard) _ASSERT(ay == AY8913_DEVICE_A); if (nAYFunc == AY_READ || nAYFunc == AY_WRITE || nAYFunc == AY_LATCH) - if ((nAYFunc != state) || (m_phasorEnable && m_phasorMode != PH_EchoPlus)) // Deater's Xmas2023 demo interleaves writes to both AY's (need this line to avoid ASSERT for Echo+) + if ((nAYFunc != state) || (m_isPhasorCard && m_phasorMode != PH_EchoPlus)) // Deater's Xmas2023 demo interleaves writes to both AY's (need this line to avoid ASSERT for Echo+) _ASSERT(state == AY_INACTIVE); #endif @@ -321,7 +321,7 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value) busState = true; } - if (m_phasorEnable && m_phasorMode == PH_Phasor) // GH#1192 + if (m_isPhasorCard && m_phasorMode == PH_Phasor) // GH#1192 { if (ay == AY8913_DEVICE_A) { @@ -337,7 +337,7 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value) _AYWriteReg(subunit, ay, pMB->nAYCurrentRegister[ay], r6522.GetReg(SY6522::rORA)); // else if invalid then just ignore - if (m_phasorEnable && m_phasorMode == PH_Phasor) // GH#1192 + if (m_isPhasorCard && m_phasorMode == PH_Phasor) // GH#1192 { if (ay == AY8913_DEVICE_A) { @@ -358,7 +358,7 @@ void MockingboardCard::AY8913_Write(BYTE subunit, BYTE ay, BYTE value) pMB->isChipSelected[ay] = true; pMB->isAYLatchedAddressValid[ay] = true; - if (m_phasorEnable && m_phasorMode == PH_Phasor) // GH#1192 + if (m_isPhasorCard && m_phasorMode == PH_Phasor) // GH#1192 { if (ay == AY8913_DEVICE_A) { @@ -517,7 +517,7 @@ UINT MockingboardCard::MB_Update(void) } // Echo+ right speaker is also output to left speaker - if (m_phasorEnable && m_phasorMode == PH_EchoPlus) + if (m_isPhasorCard && m_phasorMode == PH_EchoPlus) { for (UINT j = 0; j < NUM_VOICES_PER_AY8913; j++) { @@ -576,7 +576,7 @@ void MockingboardCard::Reset(const bool powerCycle) // CTRL+RESET or power-cycle AY8910_reset(subunit, ay); m_MBSubUnit[subunit].Reset(QueryType()); - m_MBSubUnit[subunit].ssi263.Reset(powerCycle, m_phasorEnable); + m_MBSubUnit[subunit].ssi263.Reset(powerCycle, m_isPhasorCard); } // Reset state @@ -596,7 +596,7 @@ void MockingboardCard::Reset(const bool powerCycle) // CTRL+RESET or power-cycle } // Not this, since no change on a CTRL+RESET or power-cycle: -// m_phasorEnable = false; +// m_isPhasorCard = false; } } @@ -623,7 +623,7 @@ BYTE MockingboardCard::IOReadInternal(WORD PC, WORD nAddr, BYTE bWrite, BYTE nVa } #endif - if (m_phasorEnable) + if (m_isPhasorCard) { int CS = 0; if (m_phasorMode == PH_Mockingboard) @@ -720,7 +720,7 @@ BYTE MockingboardCard::IOWriteInternal(WORD PC, WORD nAddr, BYTE bWrite, BYTE nV } } - if (m_phasorEnable) + if (m_isPhasorCard) { int CS = 0; if (m_phasorMode == PH_Mockingboard) @@ -820,7 +820,7 @@ BYTE __stdcall MockingboardCard::PhasorIO(WORD PC, WORD nAddr, BYTE bWrite, BYTE BYTE MockingboardCard::PhasorIOInternal(WORD PC, WORD nAddr, BYTE bWrite, BYTE nValue, ULONG nExecutedCycles) { - if (!m_phasorEnable) + if (!m_isPhasorCard) return MemReadFloatingBus(nExecutedCycles); UINT bits = (UINT) m_phasorMode; @@ -1322,7 +1322,7 @@ bool MockingboardCard::LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version AY8910_InitClock((int)Get6502BaseClock()); - // NB. m_phasorEnable setup in ctor + // NB. m_isPhasorCard setup in ctor return true; } @@ -1466,7 +1466,7 @@ bool MockingboardCard::Phasor_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT AY8910_InitClock((int)(Get6502BaseClock() * m_phasorClockScaleFactor)); - // NB. m_phasorEnable setup in ctor + // NB. m_isPhasorCard setup in ctor return true; } diff --git a/source/Mockingboard.h b/source/Mockingboard.h index 2b6093aa..609c99d8 100644 --- a/source/Mockingboard.h +++ b/source/Mockingboard.h @@ -175,7 +175,7 @@ private: // - bool m_phasorEnable; + bool m_isPhasorCard; PHASOR_MODE m_phasorMode; UINT m_phasorClockScaleFactor;