bool DSPLLE::Initialize(void *hWnd, bool bWii, bool bDSPThread) { m_hWnd = hWnd; m_bWii = bWii; m_bDSPThread = bDSPThread; m_InitMixer = false; std::string irom_file = File::GetUserPath(D_GCUSER_IDX) + DSP_IROM; std::string coef_file = File::GetUserPath(D_GCUSER_IDX) + DSP_COEF; if (!File::Exists(irom_file)) irom_file = File::GetSysDirectory() + GC_SYS_DIR DIR_SEP DSP_IROM; if (!File::Exists(coef_file)) coef_file = File::GetSysDirectory() + GC_SYS_DIR DIR_SEP DSP_COEF; if (!DSPCore_Init(irom_file.c_str(), coef_file.c_str(), AudioCommon::UseJIT())) return false; g_dsp.cpu_ram = Memory::GetPointer(0); DSPCore_Reset(); m_bIsRunning = true; InitInstructionTable(); if (m_bDSPThread) m_hDSPThread = std::thread(dsp_thread, this); Host_RefreshDSPDebuggerWindow(); return true; }
bool DSPLLE::Initialize(bool bWii, bool bDSPThread) { requestDisableThread = false; DSPInitOptions opts; if (!FillDSPInitOptions(&opts)) return false; if (!DSPCore_Init(opts)) return false; // needs to be after DSPCore_Init for the dspjit ptr if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || Core::g_want_determinism || !g_dsp_jit) { bDSPThread = false; } m_bWii = bWii; m_bDSPThread = bDSPThread; // DSPLLE directly accesses the fastmem arena. // TODO: The fastmem arena is only supposed to be used by the JIT: // among other issues, its size is only 1GB on 32-bit targets. g_dsp.cpu_ram = Memory::physical_base; DSPCore_Reset(); InitInstructionTable(); if (bDSPThread) { m_bIsRunning.Set(true); m_hDSPThread = std::thread(DSPThread, this); } Host_RefreshDSPDebuggerWindow(); return true; }