summaryrefslogtreecommitdiff
path: root/Source/Core/DSPCore/Src/DSPAccelerator.cpp
diff options
context:
space:
mode:
authorpierre <pierre@pirsoft.de>2010-11-27 23:40:09 +0000
committerpierre <pierre@pirsoft.de>2010-11-27 23:40:09 +0000
commit91eb729aafb4a8bb6503c7e29ad6582e590fe769 (patch)
treedc912220be34c537f822a7d926f28fffe2b9479e /Source/Core/DSPCore/Src/DSPAccelerator.cpp
parent762563a02673b10f8c448aec6240a95e6a3d3696 (diff)
Core/DSPCore: Implement jit emitters for lris and mrr.
Also add the mask for ADPCM predictor, like r6480 does. Tested 64 bit linux/windows. At least compiles for 32 bit windows, but with these binaries most of my guest software fails with DSPLLE(interpreted and jit) when it gets to do actual work. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6484 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/DSPCore/Src/DSPAccelerator.cpp')
-rw-r--r--Source/Core/DSPCore/Src/DSPAccelerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DSPCore/Src/DSPAccelerator.cpp b/Source/Core/DSPCore/Src/DSPAccelerator.cpp
index d4edcbbacf..29afe98b5f 100644
--- a/Source/Core/DSPCore/Src/DSPAccelerator.cpp
+++ b/Source/Core/DSPCore/Src/DSPAccelerator.cpp
@@ -23,7 +23,7 @@
#include "DSPInterpreter.h"
// The hardware adpcm decoder :)
-s16 ADPCM_Step(u32& _rSamplePos)
+static s16 ADPCM_Step(u32& _rSamplePos)
{
const s16 *pCoefTable = (const s16 *)&g_dsp.ifx_regs[DSP_COEF_A1_0];
@@ -34,7 +34,7 @@ s16 ADPCM_Step(u32& _rSamplePos)
}
int scale = 1 << (g_dsp.ifx_regs[DSP_PRED_SCALE] & 0xF);
- int coef_idx = g_dsp.ifx_regs[DSP_PRED_SCALE] >> 4;
+ int coef_idx = (g_dsp.ifx_regs[DSP_PRED_SCALE] >> 4) & 0x7;
s32 coef1 = pCoefTable[coef_idx * 2 + 0];
s32 coef2 = pCoefTable[coef_idx * 2 + 1];