DSPHLE: Add a config parameter to dump UCode to disk
This commit is contained in:
parent
c306095684
commit
a92727e862
|
@ -284,6 +284,7 @@ void SConfig::SaveDSPSettings(IniFile& ini)
|
||||||
|
|
||||||
dsp->Set("EnableJIT", m_DSPEnableJIT);
|
dsp->Set("EnableJIT", m_DSPEnableJIT);
|
||||||
dsp->Set("DumpAudio", m_DumpAudio);
|
dsp->Set("DumpAudio", m_DumpAudio);
|
||||||
|
dsp->Set("DumpUCode", m_DumpUCode);
|
||||||
dsp->Set("Backend", sBackend);
|
dsp->Set("Backend", sBackend);
|
||||||
dsp->Set("Volume", m_Volume);
|
dsp->Set("Volume", m_Volume);
|
||||||
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
||||||
|
@ -543,6 +544,7 @@ void SConfig::LoadDSPSettings(IniFile& ini)
|
||||||
|
|
||||||
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
||||||
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
||||||
|
dsp->Get("DumpUCode", &m_DumpUCode, false);
|
||||||
#if defined __linux__ && HAVE_ALSA
|
#if defined __linux__ && HAVE_ALSA
|
||||||
dsp->Get("Backend", &sBackend, BACKEND_ALSA);
|
dsp->Get("Backend", &sBackend, BACKEND_ALSA);
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
|
|
|
@ -255,6 +255,7 @@ struct SConfig : NonCopyable
|
||||||
bool m_DSPCaptureLog;
|
bool m_DSPCaptureLog;
|
||||||
bool m_DumpAudio;
|
bool m_DumpAudio;
|
||||||
bool m_IsMuted;
|
bool m_IsMuted;
|
||||||
|
bool m_DumpUCode;
|
||||||
int m_Volume;
|
int m_Volume;
|
||||||
std::string sBackend;
|
std::string sBackend;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,8 @@ void ROMUCode::BootUCode()
|
||||||
(u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
(u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||||
m_current_ucode.m_length);
|
m_current_ucode.m_length);
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
if (SConfig::GetInstance().m_DumpUCode)
|
||||||
|
{
|
||||||
std::string ucode_dump_path = StringFromFormat(
|
std::string ucode_dump_path = StringFromFormat(
|
||||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||||
|
|
||||||
|
@ -102,7 +103,7 @@ void ROMUCode::BootUCode()
|
||||||
fp.WriteArray((u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
fp.WriteArray((u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||||
m_current_ucode.m_length);
|
m_current_ucode.m_length);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
DEBUG_LOG(DSPHLE, "CurrentUCode SOURCE Addr: 0x%08x", m_current_ucode.m_ram_address);
|
DEBUG_LOG(DSPHLE, "CurrentUCode SOURCE Addr: 0x%08x", m_current_ucode.m_ram_address);
|
||||||
DEBUG_LOG(DSPHLE, "CurrentUCode Length: 0x%08x", m_current_ucode.m_length);
|
DEBUG_LOG(DSPHLE, "CurrentUCode Length: 0x%08x", m_current_ucode.m_length);
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "Common/Hash.h"
|
#include "Common/Hash.h"
|
||||||
#include "Common/StringUtil.h"
|
#include "Common/StringUtil.h"
|
||||||
|
|
||||||
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/HW/DSPHLE/UCodes/AX.h"
|
#include "Core/HW/DSPHLE/UCodes/AX.h"
|
||||||
#include "Core/HW/DSPHLE/UCodes/AXWii.h"
|
#include "Core/HW/DSPHLE/UCodes/AXWii.h"
|
||||||
#include "Core/HW/DSPHLE/UCodes/CARD.h"
|
#include "Core/HW/DSPHLE/UCodes/CARD.h"
|
||||||
|
@ -142,7 +143,8 @@ void UCodeInterface::PrepareBootUCode(u32 mail)
|
||||||
(u8*)HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr),
|
(u8*)HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr),
|
||||||
m_next_ucode.iram_size);
|
m_next_ucode.iram_size);
|
||||||
|
|
||||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
if (SConfig::GetInstance().m_DumpUCode)
|
||||||
|
{
|
||||||
std::string ucode_dump_path = StringFromFormat(
|
std::string ucode_dump_path = StringFromFormat(
|
||||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||||
|
|
||||||
|
@ -152,7 +154,7 @@ void UCodeInterface::PrepareBootUCode(u32 mail)
|
||||||
fp.WriteArray((u8*)Memory::GetPointer(m_next_ucode.iram_mram_addr),
|
fp.WriteArray((u8*)Memory::GetPointer(m_next_ucode.iram_mram_addr),
|
||||||
m_next_ucode.iram_size);
|
m_next_ucode.iram_size);
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
|
|
||||||
DEBUG_LOG(DSPHLE, "PrepareBootUCode 0x%08x", ector_crc);
|
DEBUG_LOG(DSPHLE, "PrepareBootUCode 0x%08x", ector_crc);
|
||||||
DEBUG_LOG(DSPHLE, "DRAM -> MRAM: src %04x dst %08x size %04x",
|
DEBUG_LOG(DSPHLE, "DRAM -> MRAM: src %04x dst %08x size %04x",
|
||||||
|
|
Loading…
Reference in New Issue