From 42726a757634106eef2da1bef329ccfb981f2548 Mon Sep 17 00:00:00 2001
From: nakeee <nakeee@gmail.com>
Date: Thu, 16 Apr 2009 21:46:55 +0000
Subject: [PATCH] Trying clr15/set15, this is an educated guess after looking
 at ucodes. Please test it and tell me if you see any real difference in sound
 beside on hermes' demo

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2985 8ced0084-cf51-0410-be5f-012b33b47a6e
---
 Source/Core/DSPCore/Src/DSPInterpreter.cpp   | 6 ++++++
 Source/Core/DSPCore/Src/gdsp_interpreter.cpp | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Source/Core/DSPCore/Src/DSPInterpreter.cpp b/Source/Core/DSPCore/Src/DSPInterpreter.cpp
index e9499c23a2..9392d555f1 100644
--- a/Source/Core/DSPCore/Src/DSPInterpreter.cpp
+++ b/Source/Core/DSPCore/Src/DSPInterpreter.cpp
@@ -840,6 +840,9 @@ void orf(const UDSPInstruction& opc)
 
 //-------------------------------------------------------------
 
+// NX
+// 1000 -000 xxxx xxxx
+// No operation, but can be extended with extended opcode.
 void nx(const UDSPInstruction& opc)
 {
 	// This opcode is supposed to do nothing - it's used if you want to use
@@ -1461,10 +1464,13 @@ void srbith(const UDSPInstruction& opc)
 
 	// 15-bit precision? clamping? no idea :(
 	// CLR15 seems to be the default.
+    // nakee: It seems to come around mul operation, and it explains what sets the mul bit. But if so why not set/clr14?
 	case 0xc: // CLR15
+		g_dsp.r[DSP_REG_SR] |= SR_MUL_MODIFY;
 		//ERROR_LOG(DSPLLE, "CLR15");
 		break;
 	case 0xd: // SET15
+		g_dsp.r[DSP_REG_SR] &= ~SR_MUL_MODIFY;
 		//ERROR_LOG(DSPLLE, "SET15");
 		break;
 
diff --git a/Source/Core/DSPCore/Src/gdsp_interpreter.cpp b/Source/Core/DSPCore/Src/gdsp_interpreter.cpp
index 3e71eba2a0..6dcfa019c9 100644
--- a/Source/Core/DSPCore/Src/gdsp_interpreter.cpp
+++ b/Source/Core/DSPCore/Src/gdsp_interpreter.cpp
@@ -306,7 +306,6 @@ void gdsp_step()
 
 	u16 opc = dsp_fetch_code();
 	ExecuteInstruction(UDSPInstruction(opc));
-
 	gdsp_handle_loop();
 }