Skip to content

Commit

Permalink
Covox on PPU I/O Port A (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzeemin committed Feb 13, 2024
1 parent 9393e08 commit 6884201
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions emulator/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ BOOL InitInstance(HINSTANCE /*hInstance*/, int /*nCmdShow*/)
return FALSE;
Emulator_SetSound(Settings_GetSound() != 0);
Emulator_SetSoundAY(Settings_GetSoundAY() != 0);
Emulator_SetSoundCovox(Settings_GetSoundCovox() != 0);
Emulator_SetMouse(Settings_GetMouse() != 0);
Emulator_SetSpeed(Settings_GetRealSpeed());

Expand Down
8 changes: 4 additions & 4 deletions emulator/emubase/Board.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ CMotherboard::CMotherboard ()
m_NetworkInCallback = nullptr;
m_NetworkOutCallback = nullptr;
m_TerminalOutCallback = nullptr;
m_okSoundAY = false;
m_okSoundAY = m_okSoundCovox = false;

// Create devices
m_pCPU = new CProcessor(_T("CPU"));
Expand Down Expand Up @@ -1527,15 +1527,15 @@ void CMotherboard::DoSound(void)
valueay |= bufferay[1];
m_pSoundAY[2]->Callback(bufferay, sizeof(bufferay));
valueay |= bufferay[1];
value |= valueay << 7;
value ^= valueay << 7;
}

if (m_okSoundCovox)
{
// Get byte from printer port output register, inverted, and merge it with the channel data
CSecondMemoryController* pSecondMemCtl = dynamic_cast<CSecondMemoryController*>(m_pSecondMemCtl);
uint16_t valuecovox = (pSecondMemCtl->m_Port177100 ^ 0xff) << 7;
value ^= valuecovox;
uint8_t valuecovox = pSecondMemCtl->m_Port177100 ^ 0xff;
value ^= valuecovox << 7;
}

if (m_SoundGenCallback != nullptr)
Expand Down

0 comments on commit 6884201

Please sign in to comment.