mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-21 07:17:41 +00:00
Refactor Mockingboard into a class (#1171)
Mockingboard or Phasor cards can be inserted into any slot. Change Config->Sound to that slots 4+5 to be individually selected for the 3 soundcard types. Add MockingboardCardManager class to manage multiple cards and mix the sound buffers.
This commit is contained in:
+3
-3
@@ -441,7 +441,7 @@ static __forceinline bool IRQ(ULONG& uExecutedCycles, BOOL& flagc, BOOL& flagn,
|
||||
CYC(7);
|
||||
#if defined(_DEBUG) && LOG_IRQ_TAKEN_AND_RTI
|
||||
std::string irq6522;
|
||||
MB_Get6522IrqDescription(irq6522);
|
||||
GetCardMgr().GetMockingboardCardMgr().Get6522IrqDescription(irq6522);
|
||||
const char* pSrc = (g_bmIRQ & 1) ? irq6522.c_str() :
|
||||
(g_bmIRQ & 2) ? "SPEECH" :
|
||||
(g_bmIRQ & 4) ? "SSC" :
|
||||
@@ -614,7 +614,7 @@ DWORD CpuExecute(const DWORD uCycles, const bool bVideoUpdate)
|
||||
g_interruptInLastExecutionBatch = false;
|
||||
|
||||
#ifdef _DEBUG
|
||||
MB_CheckCumulativeCycles();
|
||||
GetCardMgr().GetMockingboardCardMgr().CheckCumulativeCycles();
|
||||
#endif
|
||||
|
||||
// uCycles:
|
||||
@@ -625,7 +625,7 @@ DWORD CpuExecute(const DWORD uCycles, const bool bVideoUpdate)
|
||||
// Update 6522s (NB. Do this before updating g_nCumulativeCycles below)
|
||||
// . Ensures that 6522 regs are up-to-date for any potential save-state
|
||||
// . SyncEvent will trigger the 6522 TIMER1/2 underflow on the correct cycle
|
||||
MB_UpdateCycles(uExecutedCycles);
|
||||
GetCardMgr().GetMockingboardCardMgr().UpdateCycles(uExecutedCycles);
|
||||
|
||||
const UINT nRemainingCycles = uExecutedCycles - g_nCyclesExecuted;
|
||||
g_nCumulativeCycles += nRemainingCycles;
|
||||
|
||||
Reference in New Issue
Block a user