[mupen64plus-rsp-hle] 162/167: Imported Upstream version 2.5

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:02:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

ecsv-guest pushed a commit to branch armhf_test
in repository mupen64plus-rsp-hle.

commit f5e37935be1597ccdc8c99b431ab89fc749133e2
Author: Sven Eckelmann <sven at narfation.org>
Date:   Tue Apr 28 22:23:43 2015 +0200

    Imported Upstream version 2.5
---
 LICENSES                                           |   3 +-
 RELEASE                                            |  11 +
 .../mupen64plus-rsp-hle.vcxproj                    |  12 +-
 projects/msvc8/mupen64plus-rsp-hle.vcproj          | 275 ---------------------
 projects/unix/Makefile                             |   6 +
 src/alist.c                                        |  64 ++++-
 src/alist.h                                        |  12 +-
 src/alist_audio.c                                  |   4 +-
 src/alist_naudio.c                                 |  29 ++-
 src/alist_nead.c                                   |   4 +-
 src/arithmetics.h                                  |   5 +
 src/hle.c                                          |  11 +-
 src/mp3.c                                          |   2 +-
 src/msvc-compat/stdbool.h                          |  37 ---
 src/musyx.c                                        |   5 +-
 src/plugin.c                                       |   5 +-
 16 files changed, 135 insertions(+), 350 deletions(-)

diff --git a/LICENSES b/LICENSES
index e1403bd..daea7fc 100644
--- a/LICENSES
+++ b/LICENSES
@@ -5,7 +5,8 @@ Mupen64Plus-rsp-hle is licensed under the GNU General Public License version 2.
 
 The authors of Mupen64Plus-rsp-hle are:
   * Richard Goedeken (Richard42)
-  * Bobby Smiles
+  * Bobby Smiles (bsmiles32)
+  * Sven Eckelmann (ecsv)
   * John Chadwick (NMN)
   * James Hood (Ebenblues)
   * Scott Gorman (okaygo)
diff --git a/RELEASE b/RELEASE
index 7a66111..0b19ad2 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,17 @@
 RSP High-Level Emulation plugin for Mupen64Plus
 -----------------------------------------------
 
+Mupen64Plus-rsp-hle v2.5 - April 26, 2015
+-------------------------------------------------
+ - Game-specific fixes: Bottom of the 9th, IndianaJones, BattleForNaboo, Conkers Bad Fur Day
+ - Support for MusyX microcodes
+ - Improve audio microcode identification
+ - Huge quantity of code cleanups and refactoring to improve organization
+ - Add support for additional audio commands: #16, POLEF, RESAMPLE_ZOH
+ - Multiple bugfixes in audio processing code
+ - Move global variables into a struct so code is re-entrant
+ - bugfix: microcode detection could sometimes fail after reset
+
 Mupen64Plus-rsp-hle v2.0 - July 4, 2013
 -------------------------------------------------
  - Add support for MusyX ucode detection
diff --git a/projects/msvc11/mupen64plus-rsp-hle.vcxproj b/projects/VisualStudio2013/mupen64plus-rsp-hle.vcxproj
similarity index 94%
rename from projects/msvc11/mupen64plus-rsp-hle.vcxproj
rename to projects/VisualStudio2013/mupen64plus-rsp-hle.vcxproj
index 7613a5e..426775c 100644
--- a/projects/msvc11/mupen64plus-rsp-hle.vcxproj
+++ b/projects/VisualStudio2013/mupen64plus-rsp-hle.vcxproj
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <ItemGroup Label="ProjectConfigurations">
     <ProjectConfiguration Include="Debug|Win32">
       <Configuration>Debug</Configuration>
@@ -20,12 +20,12 @@
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
     <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
     <ConfigurationType>DynamicLibrary</ConfigurationType>
     <CharacterSet>MultiByte</CharacterSet>
-    <PlatformToolset>v110</PlatformToolset>
+    <PlatformToolset>v120</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -55,7 +55,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\src\msvc-compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -74,7 +74,7 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
-      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;..\..\src\msvc-compat;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>..\..\..\mupen64plus-core\src\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;inline=__inline;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
@@ -119,4 +119,4 @@
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/projects/msvc8/mupen64plus-rsp-hle.vcproj b/projects/msvc8/mupen64plus-rsp-hle.vcproj
deleted file mode 100644
index 592cc08..0000000
--- a/projects/msvc8/mupen64plus-rsp-hle.vcproj
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="mupen64plus-rsp-hle"
-	ProjectGUID="{2EC7CEE3-C7A7-4F2E-B2C8-4DF6AFEC3E9A}"
-	RootNamespace="mupen64plusrsphle"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Win32"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\src\msvc-compat"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
-				MinimalRebuild="true"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="3"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="4"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="2"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(ConfigurationName)"
-			ConfigurationType="2"
-			CharacterSet="2"
-			WholeProgramOptimization="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\src\msvc-compat"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
-				RuntimeLibrary="2"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="false"
-				DebugInformationFormat="3"
-				CompileAs="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				LinkIncremental="1"
-				GenerateDebugInformation="true"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCManifestTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCFxCopTool"
-			/>
-			<Tool
-				Name="VCAppVerifierTool"
-			/>
-			<Tool
-				Name="VCWebDeploymentTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\src\alist.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\alist_audio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\alist_naudio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\alist_nead.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\audio.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\cicx105.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\hle.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\jpeg.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\memory.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\mp3.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\musyx.c"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\plugin.c"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\src\alist.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\audio.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\arithmetics.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\common.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\hle.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\hle_external.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\hle_internal.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\memory.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\src\ucodes.h"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
old mode 100644
new mode 100755
index fc2a103..a0d9b4e
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -111,6 +111,12 @@ ifneq ("$(filter arm%,$(HOST_CPU))","")
     $(warning Architecture "$(HOST_CPU)" not officially supported.')
   endif
 endif
+ifneq ("$(filter mips,$(HOST_CPU))","")
+  CPU := MIPS
+  ARCH_DETECTED := 32BITS
+  PIC ?= 1
+  $(warning Architecture "$(HOST_CPU)" not officially supported.')
+endif
 ifeq ("$(CPU)","NONE")
   $(error CPU type "$(HOST_CPU)" not supported.  Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
 endif
diff --git a/src/alist.c b/src/alist.c
index da42f68..f6c87f0 100644
--- a/src/alist.c
+++ b/src/alist.c
@@ -21,6 +21,7 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
+#include <assert.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <string.h>
@@ -119,7 +120,7 @@ void alist_process(struct hle_t* hle, const acmd_callback_t abi[], unsigned int
 
 uint32_t alist_get_address(struct hle_t* hle, uint32_t so, const uint32_t *segments, size_t n)
 {
-    uint8_t  segment = (so >> 24);
+    uint8_t  segment = (so >> 24) & 0x3f;
     uint32_t offset  = (so & 0xffffff);
 
     if (segment >= n) {
@@ -132,7 +133,7 @@ uint32_t alist_get_address(struct hle_t* hle, uint32_t so, const uint32_t *segme
 
 void alist_set_address(struct hle_t* hle, uint32_t so, uint32_t *segments, size_t n)
 {
-    uint8_t  segment = (so >> 24);
+    uint8_t  segment = (so >> 24) & 0x3f;
     uint32_t offset  = (so & 0xffffff);
 
     if (segment >= n) {
@@ -962,3 +963,62 @@ void alist_polef(
 
     dram_store_u16(hle, (uint16_t*)(dst - 4), address, 4);
 }
+
+void alist_iirf(
+        struct hle_t* hle,
+        bool init,
+        uint16_t dmemo,
+        uint16_t dmemi,
+        uint16_t count,
+        int16_t* table,
+        uint32_t address)
+{
+    int16_t *dst = (int16_t*)(hle->alist_buffer + dmemo);
+    int32_t i, prev;
+    int16_t frame[8];
+    int16_t ibuf[4];
+    uint16_t index = 7;
+
+
+    count = align(count, 16);
+
+    if(init)
+    {
+        for(i = 0; i < 8; ++i)
+            frame[i] = 0;
+        ibuf[1] = 0;
+        ibuf[2] = 0;
+    }
+    else
+    {
+        frame[6] = *dram_u16(hle, address + 4);
+        frame[7] = *dram_u16(hle, address + 6);
+        ibuf[1] = (int16_t)*dram_u16(hle, address + 8);
+        ibuf[2] = (int16_t)*dram_u16(hle, address + 10);
+    }
+
+    prev = vmulf(table[9], frame[6]) * 2;
+    do
+    {
+        for(i = 0; i < 8; ++i)
+        {
+            int32_t accu;
+            ibuf[index&3] = *alist_s16(hle, dmemi);
+
+            accu = prev + vmulf(table[0], ibuf[index&3]) + vmulf(table[1], ibuf[(index-1)&3]) + vmulf(table[0], ibuf[(index-2)&3]);
+            accu += vmulf(table[8], frame[index]) * 2;
+            prev = vmulf(table[9], frame[index]) * 2;
+            dst[i^S] = frame[i] = accu;
+
+            index=(index+1)&7;
+            dmemi += 2;
+        }
+        dst += 8;
+        count -= 0x10;
+    } while (count > 0);
+
+    dram_store_u16(hle, (uint16_t*)&frame[6], address + 4, 4);
+    dram_store_u16(hle, (uint16_t*)&ibuf[(index-2)&3], address+8, 2);
+    dram_store_u16(hle, (uint16_t*)&ibuf[(index-1)&3], address+10, 2);
+}
+
diff --git a/src/alist.h b/src/alist.h
index d1ebdab..6e61043 100644
--- a/src/alist.h
+++ b/src/alist.h
@@ -23,8 +23,8 @@
 #define ALIST_INTERNAL_H
 
 #include <stdbool.h>
-#include <stdint.h>
 #include <stddef.h>
+#include <stdint.h>
 
 struct hle_t;
 
@@ -140,6 +140,16 @@ void alist_polef(
         uint16_t gain,
         int16_t* table,
         uint32_t address);
+
+void alist_iirf(
+        struct hle_t* hle,
+        bool init,
+        uint16_t dmemo,
+        uint16_t dmemi,
+        uint16_t count,
+        int16_t* table,
+        uint32_t address);
+
 /*
  * Audio flags
  */
diff --git a/src/alist_audio.c b/src/alist_audio.c
index 0a1db6e..ac54714 100644
--- a/src/alist_audio.c
+++ b/src/alist_audio.c
@@ -25,11 +25,11 @@
 #include <stdint.h>
 #include <string.h>
 
-#include "common.h"
-
 #include "alist.h"
+#include "common.h"
 #include "hle_internal.h"
 #include "memory.h"
+#include "ucodes.h"
 
 enum { DMEM_BASE = 0x5c0 };
 
diff --git a/src/alist_naudio.c b/src/alist_naudio.c
index ee86edb..4cff9f7 100644
--- a/src/alist_naudio.c
+++ b/src/alist_naudio.c
@@ -24,9 +24,8 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include "common.h"
-
 #include "alist.h"
+#include "common.h"
 #include "hle_external.h"
 #include "hle_internal.h"
 #include "memory.h"
@@ -73,15 +72,14 @@ static void NAUDIO_02B0(struct hle_t* hle, uint32_t UNUSED(w1), uint32_t w2)
 
 static void NAUDIO_14(struct hle_t* hle, uint32_t w1, uint32_t w2)
 {
-    if (hle->alist_naudio.table[0] == 0 && hle->alist_naudio.table[1] == 0) {
+    uint8_t  flags       = (w1 >> 16);
+    uint16_t gain        = w1;
+    uint8_t  select_main = (w2 >> 24);
+    uint32_t address     = (w2 & 0xffffff);
 
-        uint8_t  flags       = (w1 >> 16);
-        uint16_t gain        = w1;
-        uint8_t  select_main = (w2 >> 24);
-        uint32_t address     = (w2 & 0xffffff);
-
-        uint16_t dmem = (select_main == 0) ? NAUDIO_MAIN : NAUDIO_MAIN2;
+    uint16_t dmem = (select_main == 0) ? NAUDIO_MAIN : NAUDIO_MAIN2;
 
+    if (hle->alist_naudio.table[0] == 0 && hle->alist_naudio.table[1] == 0) {
         alist_polef(
                 hle,
                 flags & A_INIT,
@@ -93,8 +91,17 @@ static void NAUDIO_14(struct hle_t* hle, uint32_t w1, uint32_t w2)
                 address);
     }
     else
-        HleWarnMessage(hle->user_defined,
-                       "NAUDIO_14: non null codebook[0-3] case not implemented.");
+    {
+        alist_iirf(
+                hle,
+                flags & A_INIT,
+                dmem,
+                dmem,
+                NAUDIO_COUNT,
+                hle->alist_naudio.table,
+                address);
+    }
+
 }
 
 static void SETVOL(struct hle_t* hle, uint32_t w1, uint32_t w2)
diff --git a/src/alist_nead.c b/src/alist_nead.c
index 35fd580..b8ce3c9 100644
--- a/src/alist_nead.c
+++ b/src/alist_nead.c
@@ -24,12 +24,12 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include "common.h"
-
 #include "alist.h"
+#include "common.h"
 #include "hle_external.h"
 #include "hle_internal.h"
 #include "memory.h"
+#include "ucodes.h"
 
 /* remove windows define to 0x06 */
 #ifdef DUPLICATE
diff --git a/src/arithmetics.h b/src/arithmetics.h
index 9ffba7a..529293d 100644
--- a/src/arithmetics.h
+++ b/src/arithmetics.h
@@ -34,5 +34,10 @@ static inline int16_t clamp_s16(int_fast32_t x)
     return x;
 }
 
+static inline int32_t vmulf(int16_t x, int16_t y)
+{
+    return (((int32_t)(x))*((int32_t)(y))+0x4000)>>15;
+}
+
 #endif
 
diff --git a/src/hle.c b/src/hle.c
index 51286b9..ea0e1b7 100644
--- a/src/hle.c
+++ b/src/hle.c
@@ -31,7 +31,6 @@
 #include "hle_external.h"
 #include "hle_internal.h"
 #include "memory.h"
-
 #include "ucodes.h"
 
 #define min(a,b) (((a) < (b)) ? (a) : (b))
@@ -171,7 +170,6 @@ static void rsp_break(struct hle_t* hle, unsigned int setbits)
 static void forward_gfx_task(struct hle_t* hle)
 {
     HleProcessDlistList(hle->user_defined);
-    *hle->dpc_status &= ~DP_STATUS_FREEZE;
 }
 
 static bool try_fast_audio_dispatching(struct hle_t* hle)
@@ -326,12 +324,11 @@ static void normal_task_dispatching(struct hle_t* hle)
 
 static void non_task_dispatching(struct hle_t* hle)
 {
-    const unsigned int sum = sum_bytes(hle->imem, 0x1000 >> 1);
+    const unsigned int sum = sum_bytes(hle->imem, 44);
 
-    switch (sum) {
-    /* CIC x105 ucode (used during boot of CIC x105 games) */
-    case 0x9e2: /* CIC 6105 */
-    case 0x9f2: /* CIC 7105 */
+    if (sum == 0x9e2)
+    {
+        /* CIC x105 ucode (used during boot of CIC x105 games) */
         cicx105_ucode(hle);
         return;
     }
diff --git a/src/mp3.c b/src/mp3.c
index 2659efb..06c77a0 100644
--- a/src/mp3.c
+++ b/src/mp3.c
@@ -21,8 +21,8 @@
  *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
-#include <string.h>
 #include <stdint.h>
+#include <string.h>
 
 #include "arithmetics.h"
 #include "hle_internal.h"
diff --git a/src/msvc-compat/stdbool.h b/src/msvc-compat/stdbool.h
deleted file mode 100644
index 07fe83e..0000000
--- a/src/msvc-compat/stdbool.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- *   Mupen64plus-rsp-hle - stdbool.h                                       *
- *   Mupen64Plus homepage: http://code.google.com/p/mupen64plus/           *
- *   Copyright (C) 2014 Bobby Smiles                                       *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program; if not, write to the                         *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.          *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* This header is only intended to be used with msvc compilers */
-
-#pragma once
-
-typedef int _Bool;
-
-/**
- * The standard states that "an application may undefine and then possibly redefine the macro
- * bool, true and false". However, such feature might be withdrawn in a future version.
- **/
-#define bool _Bool
-#define true 1
-#define false 0
-
-#define __bool_true_false_are_defined 1
-
diff --git a/src/musyx.c b/src/musyx.c
index 36b7b7c..5a44917 100644
--- a/src/musyx.c
+++ b/src/musyx.c
@@ -20,14 +20,13 @@
  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdbool.h>
+#include <stddef.h>
 #include <stdint.h>
 #include <string.h>
-#include <stddef.h>
-
-#include "common.h"
 
 #include "arithmetics.h"
 #include "audio.h"
+#include "common.h"
 #include "hle_external.h"
 #include "hle_internal.h"
 #include "memory.h"
diff --git a/src/plugin.c b/src/plugin.c
index 7ae85f6..64f8164 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -26,13 +26,14 @@
 
 #include "common.h"
 #include "hle.h"
+#include "hle_internal.h"
 
 #define M64P_PLUGIN_PROTOTYPES 1
-#include "m64p_types.h"
 #include "m64p_common.h"
 #include "m64p_plugin.h"
+#include "m64p_types.h"
 
-#define RSP_HLE_VERSION        0x020000
+#define RSP_HLE_VERSION        0x020500
 #define RSP_PLUGIN_API_VERSION 0x020000
 
 /* local variables */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-rsp-hle.git



More information about the Pkg-games-commits mailing list