summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-07-11 10:18:25 +0000
committerhrydgard <hrydgard@gmail.com>2009-07-11 10:18:25 +0000
commitccebd7512e920138105c5378740cb31f9e31cc0b (patch)
tree788349c98f946b0836a483a71c11ac3ca8d2f821 /Source/Core/DSPCore
parentaa10f4d2e0be60459637e53e5cba6a56d1847775 (diff)
Fix a DSP disasm problem, misc minor stuff .. not much to see here
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3745 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore')
-rw-r--r--Source/Core/DSPCore/Src/DSPIntExtOps.cpp8
-rw-r--r--Source/Core/DSPCore/Src/DSPTables.h2
-rw-r--r--Source/Core/DSPCore/Src/DspIntBranch.cpp2
-rw-r--r--Source/Core/DSPCore/Src/DspIntMultiplier.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/DSPCore/Src/DSPIntExtOps.cpp b/Source/Core/DSPCore/Src/DSPIntExtOps.cpp
index c9671e139b..e04739d628 100644
--- a/Source/Core/DSPCore/Src/DSPIntExtOps.cpp
+++ b/Source/Core/DSPCore/Src/DSPIntExtOps.cpp
@@ -317,7 +317,6 @@ void dsp_op_ext_ls_epi(const UDSPInstruction& opc)
}
}
-
void dsp_op_ext_sl_pro(const UDSPInstruction& opc)
{
u8 areg = (opc.hex & 0x1) + 0x1e;
@@ -334,13 +333,12 @@ void dsp_op_ext_sl_pro(const UDSPInstruction& opc)
}
}
-
void dsp_op_ext_sl_epi(const UDSPInstruction& opc)
{
u8 dreg = ((opc.hex >> 4) & 0x3) + 0x18;
- u16 val = dsp_dmem_read(g_dsp.r[0x03]);
+ const u8 sreg = 0x03;
+ u16 val = dsp_dmem_read(g_dsp.r[sreg]);
dsp_op_write_reg(dreg, val);
- u8 sreg = 0x03;
if (opc.hex & 0x8) // SLM/SLMN
{
@@ -379,6 +377,8 @@ void dsp_op_ext_ld(const UDSPInstruction& opc)
}
else
{
+ // Hmm
+ // if (sreg != 0x3)
dsp_increment_addr_reg(0x03);
}
}
diff --git a/Source/Core/DSPCore/Src/DSPTables.h b/Source/Core/DSPCore/Src/DSPTables.h
index a56a112b72..c0fd6b6310 100644
--- a/Source/Core/DSPCore/Src/DSPTables.h
+++ b/Source/Core/DSPCore/Src/DSPTables.h
@@ -48,12 +48,12 @@ enum partype_t
P_REG1A = P_REG | 0x1a80,
P_REG1C = P_REG | 0x1c00,
// P_ACC = P_REG | 0x1c10, // used for global accum (gcdsptool's value)
- P_ACC_D = P_REG | 0x1c80,
P_ACCL = P_REG | 0x1c00, // used for low part of accum
P_ACCM = P_REG | 0x1e00, // used for mid part of accum
// The following are not in gcdsptool
P_ACCM_D = P_REG | 0x1e80,
P_ACC = P_REG | 0x2000, // used for full accum.
+ P_ACC_D = P_REG | 0x2080,
P_AX = P_REG | 0x2200,
P_REGS_MASK = 0x03f80, // gcdsptool's value = 0x01f80
P_REF = P_REG | 0x4000,
diff --git a/Source/Core/DSPCore/Src/DspIntBranch.cpp b/Source/Core/DSPCore/Src/DspIntBranch.cpp
index 3d4becc61d..d5d1eace25 100644
--- a/Source/Core/DSPCore/Src/DspIntBranch.cpp
+++ b/Source/Core/DSPCore/Src/DspIntBranch.cpp
@@ -154,7 +154,7 @@ void HandleLoop()
if (rLoopAddress > 0 && rLoopCounter > 0)
{
- // FIXME: why -1?
+ // FIXME: why -1? because we just read past it.
if (g_dsp.pc - 1 == rLoopAddress)
{
rLoopCounter--;
diff --git a/Source/Core/DSPCore/Src/DspIntMultiplier.cpp b/Source/Core/DSPCore/Src/DspIntMultiplier.cpp
index 13167e6fae..7cf71e7f9b 100644
--- a/Source/Core/DSPCore/Src/DspIntMultiplier.cpp
+++ b/Source/Core/DSPCore/Src/DspIntMultiplier.cpp
@@ -32,7 +32,7 @@ namespace DSPInterpreter {
s64 dsp_multiply_conditional_unsigned(u16 a, u16 b)
{
s64 prod;
-#if 0 // Makes games sound horrible. TODO: activate and figure out why - it's been verified through DSPSpy :/
+#if 0 // Makes AX games sound horrible. TODO: activate and figure out why - it's been verified through DSPSpy :/
if (g_dsp.r[DSP_REG_SR] & SR_MUL_UNSIGNED)
prod = (u64)a * (u64)b; // won't overflow 32-bits
else