mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
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("DumpAudio", m_DumpAudio);
|
||||
dsp->Set("DumpUCode", m_DumpUCode);
|
||||
dsp->Set("Backend", sBackend);
|
||||
dsp->Set("Volume", m_Volume);
|
||||
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
||||
@ -543,6 +544,7 @@ void SConfig::LoadDSPSettings(IniFile& ini)
|
||||
|
||||
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
||||
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
||||
dsp->Get("DumpUCode", &m_DumpUCode, false);
|
||||
#if defined __linux__ && HAVE_ALSA
|
||||
dsp->Get("Backend", &sBackend, BACKEND_ALSA);
|
||||
#elif defined __APPLE__
|
||||
|
@ -255,6 +255,7 @@ struct SConfig : NonCopyable
|
||||
bool m_DSPCaptureLog;
|
||||
bool m_DumpAudio;
|
||||
bool m_IsMuted;
|
||||
bool m_DumpUCode;
|
||||
int m_Volume;
|
||||
std::string sBackend;
|
||||
|
||||
|
@ -92,17 +92,18 @@ void ROMUCode::BootUCode()
|
||||
(u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||
m_current_ucode.m_length);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
std::string ucode_dump_path = StringFromFormat(
|
||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||
|
||||
File::IOFile fp(ucode_dump_path, "wb");
|
||||
if (fp)
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
{
|
||||
fp.WriteArray((u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||
m_current_ucode.m_length);
|
||||
std::string ucode_dump_path = StringFromFormat(
|
||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||
|
||||
File::IOFile fp(ucode_dump_path, "wb");
|
||||
if (fp)
|
||||
{
|
||||
fp.WriteArray((u8*)HLEMemory_Get_Pointer(m_current_ucode.m_ram_address),
|
||||
m_current_ucode.m_length);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
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);
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "Common/Hash.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HW/DSPHLE/UCodes/AX.h"
|
||||
#include "Core/HW/DSPHLE/UCodes/AXWii.h"
|
||||
#include "Core/HW/DSPHLE/UCodes/CARD.h"
|
||||
@ -142,17 +143,18 @@ void UCodeInterface::PrepareBootUCode(u32 mail)
|
||||
(u8*)HLEMemory_Get_Pointer(m_next_ucode.iram_mram_addr),
|
||||
m_next_ucode.iram_size);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
std::string ucode_dump_path = StringFromFormat(
|
||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||
|
||||
File::IOFile fp(ucode_dump_path, "wb");
|
||||
if (fp)
|
||||
if (SConfig::GetInstance().m_DumpUCode)
|
||||
{
|
||||
fp.WriteArray((u8*)Memory::GetPointer(m_next_ucode.iram_mram_addr),
|
||||
m_next_ucode.iram_size);
|
||||
std::string ucode_dump_path = StringFromFormat(
|
||||
"%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX).c_str(), ector_crc);
|
||||
|
||||
File::IOFile fp(ucode_dump_path, "wb");
|
||||
if (fp)
|
||||
{
|
||||
fp.WriteArray((u8*)Memory::GetPointer(m_next_ucode.iram_mram_addr),
|
||||
m_next_ucode.iram_size);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_LOG(DSPHLE, "PrepareBootUCode 0x%08x", ector_crc);
|
||||
DEBUG_LOG(DSPHLE, "DRAM -> MRAM: src %04x dst %08x size %04x",
|
||||
|
Loading…
Reference in New Issue
Block a user