diff options
Diffstat (limited to 'Source')
8 files changed, 32 insertions, 6 deletions
diff --git a/Source/Core/DSPCore/Src/DSPInterpreter.h b/Source/Core/DSPCore/Src/DSPInterpreter.h index 37d464ea4d..434f46bdde 100644 --- a/Source/Core/DSPCore/Src/DSPInterpreter.h +++ b/Source/Core/DSPCore/Src/DSPInterpreter.h @@ -126,6 +126,7 @@ void lsrn(const UDSPInstruction& opc); void asrn(const UDSPInstruction& opc); void dar(const UDSPInstruction& opc); void iar(const UDSPInstruction& opc); +void xar(const UDSPInstruction& opc); void sbclr(const UDSPInstruction& opc); void sbset(const UDSPInstruction& opc); void mov(const UDSPInstruction& opc); diff --git a/Source/Core/DSPCore/Src/DSPTables.cpp b/Source/Core/DSPCore/Src/DSPTables.cpp index 9eb13527c1..fdb5d9cb27 100644 --- a/Source/Core/DSPCore/Src/DSPTables.cpp +++ b/Source/Core/DSPCore/Src/DSPTables.cpp @@ -41,6 +41,7 @@ const DSPOPCTemplate opcodes[] = {"DAR", 0x0004, 0xfffc, DSPInterpreter::dar, nop, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false}, {"IAR", 0x0008, 0xfffc, DSPInterpreter::iar, nop, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false}, + {"XAR", 0x000c, 0xfffc, DSPInterpreter::xar, nop, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false}, {"ADDARN", 0x0010, 0xfff0, DSPInterpreter::addarn, nop, 1, 2, {{P_REG, 1, 0, 0, 0x0003}, {P_REG04, 1, 0, 2, 0x000c}}, false}, diff --git a/Source/Core/DSPCore/Src/DspIntMisc.cpp b/Source/Core/DSPCore/Src/DspIntMisc.cpp index 8e674f54c4..ce27fd085b 100644 --- a/Source/Core/DSPCore/Src/DspIntMisc.cpp +++ b/Source/Core/DSPCore/Src/DspIntMisc.cpp @@ -129,6 +129,16 @@ void iar(const UDSPInstruction& opc) g_dsp.r[opc.hex & 0x3] = dsp_increment_addr_reg(opc.hex & 0x3); } +// XAR $arD ? +// 0000 0000 0000 11dd +// $arD result somehow depends on $wrD +// unknown atm +// used in IPL ucode +void xar(const UDSPInstruction& opc) +{ +// u8 dreg = opc.hex & 0x3; +} + // SBCLR #I // 0001 0011 0000 0iii // bit of status register $sr. Bit number is calculated by adding 6 to diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index e98fd2a41b..649655aea5 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -404,7 +404,11 @@ void CUCode_AX::HandleMail(u32 _uMail) { m_rMailHandler.PushMail(0xDCD10001); } - else if ((_uMail & 0xFFFF0000) == 0xCDD10000) // Action 1/2/3 + else if (_uMail == 0xCDD10001) // Action 1 - new ucode upload + { + NOTICE_LOG(DSPHLE,"Game wanted to upload new ucode!"); + } + else if ((_uMail & 0xFFFF0000) == 0xCDD10000) // Action 2/3 { } else diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp index 1621f32dfe..5b1218b9d5 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AXWii.cpp @@ -73,7 +73,11 @@ void CUCode_AXWii::HandleMail(u32 _uMail) { m_rMailHandler.PushMail(0xDCD10001); } - else if ((_uMail & 0xFFFF0000) == 0xCDD10000) // Action 1/2/3 + else if (_uMail == 0xCDD10001) // Action 1 - new ucode upload + { + NOTICE_LOG(DSPHLE,"Game wanted to upload new ucode!"); + } + else if ((_uMail & 0xFFFF0000) == 0xCDD10000) // Action 2/3 { } else diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h index fc9a7ce0ba..e73f3d399b 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_InitAudioSystem.h @@ -36,7 +36,7 @@ private: u32 m_RAMAddress; u32 m_Length; u32 m_IMEMAddress; - u32 m_Unk; + u32 m_DMEMLength; u32 m_StartPC; }; diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp index 1ea008b61a..100c805e4e 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.cpp @@ -68,7 +68,10 @@ void CUCode_Rom::HandleMail(u32 _uMail) break; case 0x80F3B002: - m_CurrentUCode.m_Unk = _uMail; + m_CurrentUCode.m_DMEMLength = _uMail; + if (_uMail) { + NOTICE_LOG(DSPHLE,"Game wanted to DMA sth to DSP DRAM."); + } break; case 0x80F3D001: @@ -78,6 +81,9 @@ void CUCode_Rom::HandleMail(u32 _uMail) return; // Important! BootUCode indirectly does "delete this;". Must exit immediately. } break; + + default: + break; } // THE GODDAMN OVERWRITE WAS HERE. Without the return above, since BootUCode may delete "this", well ... @@ -100,7 +106,7 @@ void CUCode_Rom::BootUCode() 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); - DEBUG_LOG(DSPHLE, "CurrentUCode ???: 0x%08x", m_CurrentUCode.m_Unk); + DEBUG_LOG(DSPHLE, "CurrentUCode DMEM Length: 0x%08x", m_CurrentUCode.m_DMEMLength); DEBUG_LOG(DSPHLE, "CurrentUCode init_vector: 0x%08x", m_CurrentUCode.m_StartPC); DEBUG_LOG(DSPHLE, "CurrentUCode CRC: 0x%08x", crc); DEBUG_LOG(DSPHLE, "BootTask - done"); diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h index b3730c96db..aa0c592a5d 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_ROM.h @@ -35,7 +35,7 @@ private: u32 m_RAMAddress; u32 m_Length; u32 m_IMEMAddress; - u32 m_Unk; + u32 m_DMEMLength; u32 m_StartPC; }; |
