From 6c7aadd5ab3ebd3fc1b3157ce31a957858473a1d Mon Sep 17 00:00:00 2001 From: luigi2us Date: Tue, 7 Jul 2009 20:40:19 +0000 Subject: [PATCH] Fixed LSR opcode (shift would always be a crazy value like 65479 instead of 7). Now SMG ucode jumps to the right command handlers. Unfortunately still no sound :( git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3705 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DspIntArithmetic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DSPCore/Src/DspIntArithmetic.cpp b/Source/Core/DSPCore/Src/DspIntArithmetic.cpp index 45b16ddf16..92fc2db343 100644 --- a/Source/Core/DSPCore/Src/DspIntArithmetic.cpp +++ b/Source/Core/DSPCore/Src/DspIntArithmetic.cpp @@ -609,7 +609,7 @@ void lsl(const UDSPInstruction& opc) // calculated by negating sign extended bits 0-6. void lsr(const UDSPInstruction& opc) { - u16 shift = -opc.ushift; + u16 shift = (u16) -(((s8)(opc.ushift << 2)) >> 2); u64 acc = dsp_get_long_acc(opc.areg); // Lop off the extraneous sign extension our 64-bit fake accum causes acc &= 0x000000FFFFFFFFFFULL;