dsp stuff - the same ucode hash under lle and hle now (had to rename couple of dissasms), ucode dumping under hle (debug only), small dsp:read32 change (needed for some homebrew)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6059 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
1 parent
ca9c174450
commit
8dc01b685f
9 files changed
+60
-42
No files matched your search
@@ -62,23 +62,23 @@ void CUCode_Rom::HandleMail(u32 _uMail)
|
||||
break;
|
||||
|
||||
case 0x80F3A002:
|
||||
m_CurrentUCode.m_Length = _uMail;
|
||||
m_CurrentUCode.m_Length = _uMail & 0xffff;
|
||||
break;
|
||||
|
||||
case 0x80F3C002:
|
||||
m_CurrentUCode.m_IMEMAddress = _uMail;
|
||||
m_CurrentUCode.m_IMEMAddress = _uMail & 0xffff;
|
||||
break;
|
||||
|
||||
case 0x80F3B002:
|
||||
m_CurrentUCode.m_DMEMLength = _uMail;
|
||||
if (_uMail) {
|
||||
NOTICE_LOG(DSPHLE,"Game wanted to DMA sth to DSP DRAM.");
|
||||
m_CurrentUCode.m_DMEMLength = _uMail & 0xffff;
|
||||
if (m_CurrentUCode.m_DMEMLength) {
|
||||
NOTICE_LOG(DSPHLE,"m_CurrentUCode.m_DMEMLength = 0x%04x.", m_CurrentUCode.m_DMEMLength);
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x80F3D001:
|
||||
{
|
||||
m_CurrentUCode.m_StartPC = _uMail;
|
||||
m_CurrentUCode.m_StartPC = _uMail & 0xffff;
|
||||
BootUCode();
|
||||
return; // Important! BootUCode indirectly does "delete this;". Must exit immediately.
|
||||
}
|
||||
@@ -99,6 +99,18 @@ void CUCode_Rom::BootUCode()
|
||||
(u8*)Memory_Get_Pointer(m_CurrentUCode.m_RAMAddress),
|
||||
m_CurrentUCode.m_Length);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
char binFile[MAX_PATH];
|
||||
sprintf(binFile, "%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX), ector_crc);
|
||||
|
||||
FILE* pFile = fopen(binFile, "wb");
|
||||
if (pFile)
|
||||
{
|
||||
fwrite((u8*)Memory_Get_Pointer(m_CurrentUCode.m_RAMAddress), m_CurrentUCode.m_Length, 1, pFile);
|
||||
fclose(pFile);
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode SOURCE Addr: 0x%08x", m_CurrentUCode.m_RAMAddress);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode Length: 0x%08x", m_CurrentUCode.m_Length);
|
||||
DEBUG_LOG(DSPHLE, "CurrentUCode DEST Addr: 0x%08x", m_CurrentUCode.m_IMEMAddress);
|
||||
|
||||
@@ -147,6 +147,18 @@ void IUCode::PrepareBootUCode(u32 mail)
|
||||
(u8*)Memory_Get_Pointer(m_NextUCode.iram_mram_addr),
|
||||
m_NextUCode.iram_size);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
char binFile[MAX_PATH];
|
||||
sprintf(binFile, "%sDSP_UC_%08X.bin", File::GetUserPath(D_DUMPDSP_IDX), ector_crc);
|
||||
|
||||
FILE* pFile = fopen(binFile, "wb");
|
||||
if (pFile)
|
||||
{
|
||||
fwrite((u8*)Memory_Get_Pointer(m_NextUCode.iram_mram_addr), m_NextUCode.iram_size, 1, pFile);
|
||||
fclose(pFile);
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_LOG(DSPHLE, "PrepareBootUCode 0x%08x", ector_crc);
|
||||
DEBUG_LOG(DSPHLE, "DRAM -> MRAM: src %04x dst %08x size %04x",
|
||||
m_NextUCode.mram_dram_addr, m_NextUCode.mram_dest_addr,
|
||||
|
||||
Reference in new issue
Block a user