summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-04-18 21:35:21 +0000
committerhrydgard <hrydgard@gmail.com>2009-04-18 21:35:21 +0000
commitb4c22390ac1941dbf095eedd0aa81d59b7d8092a (patch)
tree1971ddb3febb3fc100e426620c665d7dbfc77f0d /Source/Core/DSPCore
parentd939afdcf20faa8c32eb542917d8e2e8711bb81f (diff)
More DSPSpy findings - nakee's "TSTAXL" isn't test. Not sure what it is though.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3003 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore')
-rw-r--r--Source/Core/DSPCore/Src/DSPInterpreter.cpp18
-rw-r--r--Source/Core/DSPCore/Src/DSPTables.cpp4
-rw-r--r--Source/Core/DSPCore/Src/gdsp_opcodes_helper.h2
3 files changed, 13 insertions, 11 deletions
diff --git a/Source/Core/DSPCore/Src/DSPInterpreter.cpp b/Source/Core/DSPCore/Src/DSPInterpreter.cpp
index 47993339be..b23e636593 100644
--- a/Source/Core/DSPCore/Src/DSPInterpreter.cpp
+++ b/Source/Core/DSPCore/Src/DSPInterpreter.cpp
@@ -510,7 +510,7 @@ void si(const UDSPInstruction& opc)
// TSTAXH $axR.h
// 1000 011r xxxx xxxx
-// Test hight part of secondary accumulator $axR.h.
+// Test high part of secondary accumulator $axR.h.
void tstaxh(const UDSPInstruction& opc)
{
u8 reg = (opc.hex >> 8) & 0x1;
@@ -519,15 +519,17 @@ void tstaxh(const UDSPInstruction& opc)
Update_SR_Register16(val);
}
-// TSTAXL $axR.h
-// 1000 011r xxxx xxxx
-// Test lower part of secondary accumulator $axR.h.
+// TSTAXL $acR
+// 1000 r001 xxxx xxxx
+// r specifies one of the main accumulators.
+// Definitely not a test instruction - it changes the accums.
+// Not affected by m0/m2. Not affected by s16/s40.
void tstaxl(const UDSPInstruction& opc)
{
- u8 reg = (opc.hex >> 8) & 0x1;
- s16 val = dsp_get_ax_l(reg);
-
- Update_SR_Register16(val);
+ // This is probably all wrong.
+ //u8 reg = (opc.hex >> 8) & 0x1;
+ //s16 val = dsp_get_ax_l(reg);
+ //Update_SR_Register16(val);
}
// CLR $acR
diff --git a/Source/Core/DSPCore/Src/DSPTables.cpp b/Source/Core/DSPCore/Src/DSPTables.cpp
index e57c886fe2..73d78ee658 100644
--- a/Source/Core/DSPCore/Src/DSPTables.cpp
+++ b/Source/Core/DSPCore/Src/DSPTables.cpp
@@ -240,8 +240,8 @@ const DSPOPCTemplate opcodes[] =
{"TST", 0xb100, 0xf7ff, DSPInterpreter::tst, nop, 1 | P_EXT, 1, {{P_ACC, 1, 0, 11, 0x0800}}, dsp_op_ext_ops_pro, dsp_op_ext_ops_epi},
- // GUESSING NOT SURE AT ALL!!!!
- {"TSTAXL", 0xa100, 0xffff, DSPInterpreter::tstaxl, nop, 1 | P_EXT, 1, {{P_REG1A, 1, 0, 8, 0x0100}}, dsp_op_ext_ops_pro, dsp_op_ext_ops_epi},
+ // Definitely not TSTAXL, it affects one of the accumulators. (a100 or a900, same op, one parameter).
+ {"TSTAXL", 0xa100, 0xffff, DSPInterpreter::tstaxl, nop, 1 | P_EXT, 1, {{P_ACC, 1, 0, 11, 0x0800}}, dsp_op_ext_ops_pro, dsp_op_ext_ops_epi},
{"TSTAXH", 0x8600, 0xfeff, DSPInterpreter::tstaxh, nop, 1 | P_EXT, 1, {{P_REG1A, 1, 0, 8, 0x0100}}, dsp_op_ext_ops_pro, dsp_op_ext_ops_epi},
diff --git a/Source/Core/DSPCore/Src/gdsp_opcodes_helper.h b/Source/Core/DSPCore/Src/gdsp_opcodes_helper.h
index ee6b02d552..36b0e9a4d5 100644
--- a/Source/Core/DSPCore/Src/gdsp_opcodes_helper.h
+++ b/Source/Core/DSPCore/Src/gdsp_opcodes_helper.h
@@ -167,7 +167,7 @@ inline void dsp_set_long_acc(int _reg, s64 val)
val >>= 16;
g_dsp.r[0x1e + _reg] = (u16)val;
val >>= 16;
- g_dsp.r[0x10 + _reg] = (u16)val;
+ g_dsp.r[0x10 + _reg] = (u16)(s16)(s8)(u8)val;
}