From 1cb10791c0bf006fa80fa630ed1236bc79a1376e Mon Sep 17 00:00:00 2001 From: "sl1nk3.s" Date: Wed, 12 Aug 2009 23:31:57 +0000 Subject: [PATCH] Little fix for platforms not moving in Wind Waker on Dolphin 32bits, see issue 1139 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3973 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/VideoInterface.cpp | 3 +-- .../Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp | 6 +++--- .../Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Source/Core/Core/Src/HW/VideoInterface.cpp b/Source/Core/Core/Src/HW/VideoInterface.cpp index 29972629a6..99d918e91a 100644 --- a/Source/Core/Core/Src/HW/VideoInterface.cpp +++ b/Source/Core/Core/Src/HW/VideoInterface.cpp @@ -1084,7 +1084,7 @@ static void EndField() // Purpose 1: Send VI interrupt for every screen refresh // Purpose 2: Execute XFB copy in homebrew games -// Run when: This is run 7200 times per second on full speed +// Run when: This is run 15700 times per second on full speed void Update() { // Update the target refresh rate @@ -1104,7 +1104,6 @@ void Update() // Multipled by two because of the way TicksPerFrame is calculated (divided by 25 and 30 // rather than 50 and 60) - // TODO : Feed the FPS estimate into Iulius' framelimiter. ActualRefreshRate = ((double)SyncTicksProgress / (double)TicksPerFrame) * 2.0; LastTick = CoreTiming::GetTicks(); SyncTicksProgress = 0; diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp index 772a755958..c5fa330cab 100644 --- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_FloatingPoint.cpp @@ -287,9 +287,9 @@ void fdivx(UGeckoInstruction _inst) } void fdivsx(UGeckoInstruction _inst) { - float a = (float)rPS0(_inst.FA); - float b = (float)rPS0(_inst.FB); - rPS0(_inst.FD) = rPS1(_inst.FD) = a / b; + double a = rPS0(_inst.FA); + double b = rPS0(_inst.FB); + rPS0(_inst.FD) = rPS1(_inst.FD) = (float)(a / b); if (b == 0.0) { if (!FPSCR.ZX) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp index 78c56fde3c..6a35a66166 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_Zelda_ADPCM.cpp @@ -42,9 +42,10 @@ void CUCode_Zelda::AFCdecodebuffer(const s16 *coef, const char *src, signed shor } else { - // In Pikmin, Dolphin's engine sound is using AFC 5bits, even though such a sound is hard + // In Pikmin, Dolphin's engine sound is using AFC type 5, even though such a sound is hard // to compare, it seems like to sound exactly like a real GC - DEBUG_LOG(DSPHLE, "5 bits AFC sample"); + // In Super Mario Sunshine, you can get such a sound by talking to anyone + DEBUG_LOG(DSPHLE, "5 bytes AFC sample"); for (int i = 0; i < 16; i += 4) { nibbles[i + 0] = (*src >> 6) & 0x02; @@ -53,6 +54,7 @@ void CUCode_Zelda::AFCdecodebuffer(const s16 *coef, const char *src, signed shor nibbles[i + 3] = (*src >> 0) & 0x02; src++; } + for (int i = 0; i < 16; i++) { if (nibbles[i] >= 2)