[mupen64plus-rsp-hle] 02/167: Imported Upstream version 1.99.2

Sven Eckelmann ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:02:14 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 2d8b6715b27dbec3969d8804903014e6bc1ee809
Author: Sven Eckelmann <sven.eckelmann at gmx.de>
Date:   Sat Feb 13 01:41:52 2010 +0100

    Imported Upstream version 1.99.2
---
 .hg_archival.txt                          |   2 +-
 .hgtags                                   |   1 +
 RELEASE                                   |   9 ++
 projects/msvc8/mupen64plus-rsp-hle.vcproj | 219 ++++++++++++++++++++++++++++++
 projects/unix/Makefile                    |  49 ++++---
 src/hle.h                                 |   2 +-
 src/ucode1.cpp                            |  44 +++---
 src/ucode2.cpp                            |  54 ++++----
 src/ucode3.cpp                            |  64 ++++-----
 9 files changed, 338 insertions(+), 106 deletions(-)

diff --git a/.hg_archival.txt b/.hg_archival.txt
index 8177866..131fe85 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,2 +1,2 @@
 repo: 3fe0288fa7047c7a29c217b2bf6f05f32f8627d5
-node: 052d3c41920efde9707aac6380782d216b4e68be
+node: c8e88b942fdfd9c1efd303e41edc6fca2deacd34
diff --git a/.hgtags b/.hgtags
new file mode 100644
index 0000000..d404148
--- /dev/null
+++ b/.hgtags
@@ -0,0 +1 @@
+052d3c41920efde9707aac6380782d216b4e68be 1.99.1
diff --git a/RELEASE b/RELEASE
index c8d6494..cdb811f 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,15 @@
 RSP High-Level Emulation plugin for Mupen64Plus
 -----------------------------------------------
 
+Mupen64Plus-rsp-hle v1.99.2 - January 6, 2010
+-------------------------------------------------
+ - new feature: added MSVC8 project file for RSP-HLE plugin, fixed a few minor incompatibilities
+ - Makefile improvements:
+   - throw error if OS/CPU not supported
+   - use DESTDIR in install/uninstall paths
+   - Allow user-specified CC/CXX/LD paths
+   - use C++ compiler to link instead of LD, because the compiler knows where the standard C++ libs are
+
 Mupen64Plus-rsp-hle v1.99.1 - December 14, 2009
 -------------------------------------------------
  - Converted to new Mupen64Plus 2.0 API
diff --git a/projects/msvc8/mupen64plus-rsp-hle.vcproj b/projects/msvc8/mupen64plus-rsp-hle.vcproj
new file mode 100644
index 0000000..c95b6d5
--- /dev/null
+++ b/projects/msvc8/mupen64plus-rsp-hle.vcproj
@@ -0,0 +1,219 @@
+<?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"
+				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"
+				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\jpeg.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\main.c"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\ucode1.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\ucode2.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\ucode3.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\ucode3mp3.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\hle.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
index 5b305a4..740b01c 100644
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -21,8 +21,9 @@
 # * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 # Makefile for Mupen64 HLE RSP plugin in Mupen64plus.
 
-# detect operation system
+# detect operating system
 UNAME = $(shell uname -s)
+OS := NONE
 ifeq ("$(UNAME)","Linux")
   OS = LINUX
   SO_EXTENSION = so
@@ -43,10 +44,14 @@ ifeq ("$(UNAME)","FreeBSD")
   SO_EXTENSION = so
   SHARED = -shared
 endif
+ifeq ("$(OS)","NONE")
+  $(error OS type "$(UNAME)" not supported.  Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
+endif
 
 # detect system architecture
 HOST_CPU ?= $(shell uname -m)
 NO_ASM ?= 1
+CPU := NONE
 ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
   CPU := X86
   ifeq ("$(BITS)", "32")
@@ -59,13 +64,17 @@ ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
   CPU := X86
   ARCH_DETECTED := 32BITS
 endif
-ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
-  CPU := PPC
-  ARCH_DETECTED := 32BITS
-endif
-ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
-  CPU := PPC
-  ARCH_DETECTED := 64BITS
+# PPC doesn't work yet
+#ifneq ("$(filter ppc powerpc,$(HOST_CPU))","")
+#  CPU := PPC
+#  ARCH_DETECTED := 32BITS
+#endif
+#ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
+#  CPU := PPC
+#  ARCH_DETECTED := 64BITS
+#endif
+ifeq ("$(CPU)","NONE")
+  $(error CPU type "$(HOST_CPU)" not supported.  Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
 endif
 
 # base CFLAGS, LIBS, and LDFLAGS
@@ -134,15 +143,14 @@ else
 endif
 
 # set shell function names
-CC      = gcc
-CXX     = g++
-LD      = g++
-INSTALL = install
-ifeq ($(OS),LINUX)
-  STRIP	= strip -s
-endif
+CC      ?= gcc
+CXX     ?= g++
+LD      ?= g++
+INSTALL ?= install
 ifeq ($(OS),OSX)
-  STRIP	= strip -x 
+  STRIP	?= strip -x 
+else
+  STRIP	?= strip -s
 endif
 
 # set special flags for given Makefile parameters
@@ -194,17 +202,18 @@ targets:
 	@echo "  Install Options:"
 	@echo "    PREFIX=path   == install/uninstall prefix (default: /usr/local)"
 	@echo "    LIBDIR=path   == path to install plugin libraries (default: PREFIX/lib/mupen64plus)"
+	@echo "    DESTDIR=path  == path to prepend to all installation paths (only for packagers)"
 	@echo "  Debugging Options:"
 	@echo "    DEBUG=1       == add debugging symbols"
 
 all: $(TARGET)
 
 install: $(TARGET)
-	$(INSTALL) -d -v "$(LIBDIR)"
-	$(INSTALL) -m 0644 $(TARGET) "$(LIBDIR)"
+	$(INSTALL) -d -v "$(DESTDIR)$(LIBDIR)"
+	$(INSTALL) -m 0644 $(TARGET) "$(DESTDIR)$(LIBDIR)"
 
 uninstall:
-	rm -f "$(LIBDIR)/$(TARGET)"
+	rm -f "$(DESTDIR)$(LIBDIR)/$(TARGET)"
 
 clean:
 	rm -rf ./_obj/* $(TARGET)
@@ -214,7 +223,7 @@ rebuild: clean all
 # build rules
 
 $(TARGET): $(OBJECTS)
-	$(LD) $(SHARED) $^ $(LDFLAGS) -o $@
+	$(CXX) $(SHARED) $^ $(LDFLAGS) -o $@
 	$(STRIP) $@
 
 $(OBJDIR)/%.o: $(SRCDIR)/%.c
diff --git a/src/hle.h b/src/hle.h
index be12833..cded3aa 100644
--- a/src/hle.h
+++ b/src/hle.h
@@ -24,7 +24,7 @@
 
 #include "m64p_plugin.h"
 
-#define RSP_HLE_VERSION 0x016301
+#define RSP_HLE_VERSION 0x016302
 
 #ifdef _BIG_ENDIAN
 #define S 0
diff --git a/src/ucode1.cpp b/src/ucode1.cpp
index a5622b0..d7368af 100644
--- a/src/ucode1.cpp
+++ b/src/ucode1.cpp
@@ -26,6 +26,8 @@ extern "C" {
   #include "hle.h"
 }
 
+extern "C" void (*ABI1[])(void);
+
 //#include "rsp.h"
 //#define SAFE_MEMORY
 /*
@@ -88,7 +90,7 @@ Address/Range       Description
 0xF80..0xFFF        <Unknown>
 ***************************************************/
 
-static void SPNOOP () {
+static void SPNOOP (void) {
     //MessageBox (NULL, "Unknown Audio Command in ABI 1", "Audio HLE Error", MB_OK);
 }
 
@@ -152,7 +154,7 @@ u16 ResampleLUT [0x200] = {
     0xFFD8, 0x0E5F, 0x6696, 0x0B39, 0xFFDF, 0x0D46, 0x66AD, 0x0C39
 };
 
-static void CLEARBUFF () {
+static void CLEARBUFF (void) {
     u32 addr = (u32)(inst1 & 0xffff);
     u32 count = (u32)(inst2 & 0xffff);
     addr &= 0xFFFC;
@@ -161,7 +163,7 @@ static void CLEARBUFF () {
 
 //FILE *dfile = fopen ("d:\\envmix.txt", "wt");
 
-static void ENVMIXER () {
+static void ENVMIXER (void) {
     //static int envmixcnt = 0;
     u8 flags = (u8)((inst1 >> 16) & 0xff);
     u32 addy = (inst2 & 0xFFFFFF);// + SEGMENTS[(inst2>>24)&0xf];
@@ -238,8 +240,8 @@ static void ENVMIXER () {
         if (LAdderStart != LTrg) {
             LAcc = LAdderStart;
             LVol = (LAdderEnd - LAdderStart) >> 3;
-            LAdderEnd   = ((s64)LAdderEnd * (s64)LRamp) >> 16;
-            LAdderStart = ((s64)LAcc * (s64)LRamp) >> 16;
+            LAdderEnd   = (s32) (((s64)LAdderEnd * (s64)LRamp) >> 16);
+            LAdderStart = (s32) (((s64)LAcc * (s64)LRamp) >> 16);
         } else {
             LAcc = LTrg;
             LVol = 0;
@@ -248,8 +250,8 @@ static void ENVMIXER () {
         if (RAdderStart != RTrg) {
             RAcc = RAdderStart;
             RVol = (RAdderEnd - RAdderStart) >> 3;
-            RAdderEnd   = ((s64)RAdderEnd * (s64)RRamp) >> 16;
-            RAdderStart = ((s64)RAcc * (s64)RRamp) >> 16;
+            RAdderEnd   = (s32) (((s64)RAdderEnd * (s64)RRamp) >> 16);
+            RAdderStart = (s32) (((s64)RAcc * (s64)RRamp) >> 16);
         } else {
             RAcc = RTrg;
             RVol = 0;
@@ -386,7 +388,7 @@ static void ENVMIXER () {
     memcpy(rsp.RDRAM+addy, (u8 *)hleMixerWorkArea,80);
 }
 
-static void RESAMPLE () {
+static void RESAMPLE (void) {
     unsigned char Flags=(u8)((inst1>>16)&0xff);
     unsigned int Pitch=((inst1&0xffff))<<1;
     u32 addy = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
@@ -461,7 +463,7 @@ static void RESAMPLE () {
     *(u16 *)(rsp.RDRAM+addy+10) = Accum;
 }
 
-static void SETVOL () {
+static void SETVOL (void) {
 // Might be better to unpack these depending on the flags...
     u8 flags = (u8)((inst1 >> 16) & 0xff);
     u16 vol = (s16)(inst1 & 0xffff);
@@ -506,15 +508,15 @@ static void SETVOL () {
     }
 }
 
-static void UNKNOWN () {}
+static void UNKNOWN (void) {}
 
-static void SETLOOP () {
+static void SETLOOP (void) {
     loopval = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
     //VolTrg_Left  = (s16)(loopval>>16);        // m_LeftVol
     //VolRamp_Left = (s16)(loopval);    // m_LeftVolTarget
 }
 
-static void ADPCM () { // Work in progress! :)
+static void ADPCM (void) { // Work in progress! :)
     unsigned char Flags=(u8)(inst1>>16)&0xff;
     //unsigned short Gain=(u16)(inst1&0xffff);
     unsigned int Address=(inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
@@ -759,7 +761,7 @@ static void ADPCM () { // Work in progress! :)
     memcpy(&rsp.RDRAM[Address],out,32);
 }
 
-static void LOADBUFF () { // memcpy causes static... endianess issue :(
+static void LOADBUFF (void) { // memcpy causes static... endianess issue :(
     u32 v0;
     //u32 cnt;
     if (AudioCount == 0)
@@ -768,7 +770,7 @@ static void LOADBUFF () { // memcpy causes static... endianess issue :(
     memcpy (BufferSpace+(AudioInBuffer&0xFFFC), rsp.RDRAM+v0, (AudioCount+3)&0xFFFC);
 }
 
-static void SAVEBUFF () { // memcpy causes static... endianess issue :(
+static void SAVEBUFF (void) { // memcpy causes static... endianess issue :(
     u32 v0;
     //u32 cnt;
     if (AudioCount == 0)
@@ -777,7 +779,7 @@ static void SAVEBUFF () { // memcpy causes static... endianess issue :(
     memcpy (rsp.RDRAM+v0, BufferSpace+(AudioOutBuffer&0xFFFC), (AudioCount+3)&0xFFFC);
 }
 
-static void SETBUFF () { // Should work ;-)
+static void SETBUFF (void) { // Should work ;-)
     if ((inst1 >> 0x10) & 0x8) { // A_AUX - Auxillary Sound Buffer Settings
         AudioAuxA       = u16(inst1);
         AudioAuxC       = u16((inst2 >> 0x10));
@@ -789,7 +791,7 @@ static void SETBUFF () { // Should work ;-)
     }
 }
 
-static void DMEMMOVE () { // Doesn't sound just right?... will fix when HLE is ready - 03-11-01
+static void DMEMMOVE (void) { // Doesn't sound just right?... will fix when HLE is ready - 03-11-01
     u32 v0, v1;
     u32 cnt;
     if ((inst2 & 0xffff)==0)
@@ -808,7 +810,7 @@ static void DMEMMOVE () { // Doesn't sound just right?... will fix when HLE is r
     }
 }
 
-static void LOADADPCM () { // Loads an ADPCM table - Works 100% Now 03-13-01
+static void LOADADPCM (void) { // Loads an ADPCM table - Works 100% Now 03-13-01
     u32 v0;
     v0 = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
 /*  if (v0 > (1024*1024*8))
@@ -833,7 +835,7 @@ static void LOADADPCM () { // Loads an ADPCM table - Works 100% Now 03-13-01
 }
 
 
-static void INTERLEAVE () { // Works... - 3-11-01
+static void INTERLEAVE (void) { // Works... - 3-11-01
     u32 inL, inR;
     u16 *outbuff = (u16 *)(AudioOutBuffer+BufferSpace);
     u16 *inSrcR;
@@ -858,7 +860,7 @@ static void INTERLEAVE () { // Works... - 3-11-01
 }
 
 
-static void MIXER () { // Fixed a sign issue... 03-14-01
+static void MIXER (void) { // Fixed a sign issue... 03-14-01
     u32 dmemin  = (u16)(inst2 >> 0x10);
     u32 dmemout = (u16)(inst2 & 0xFFFF);
     //u8  flags   = (u8)((inst1 >> 16) & 0xff);
@@ -893,7 +895,7 @@ static void MIXER () { // Fixed a sign issue... 03-14-01
 //Command: RESAMPLE - Calls:  48 - Total Time: 276354 - Avg Time:  5757.38 - Percent: 22.95%
 
 
-void (*ABI1[0x20])() = { // TOP Performace Hogs: MIXER, RESAMPLE, ENVMIXER
+void (*ABI1[0x20])(void) = { // TOP Performace Hogs: MIXER, RESAMPLE, ENVMIXER
     SPNOOP , ADPCM , CLEARBUFF, ENVMIXER  , LOADBUFF, RESAMPLE  , SAVEBUFF, UNKNOWN,
     SETBUFF, SETVOL, DMEMMOVE , LOADADPCM , MIXER   , INTERLEAVE, UNKNOWN , SETLOOP,
     SPNOOP , SPNOOP, SPNOOP   , SPNOOP    , SPNOOP  , SPNOOP    , SPNOOP  , SPNOOP,
@@ -901,7 +903,7 @@ void (*ABI1[0x20])() = { // TOP Performace Hogs: MIXER, RESAMPLE, ENVMIXER
 };
 
 /*  BACKUPS
-void MIXER () { // Fixed a sign issue... 03-14-01
+void MIXER (void) { // Fixed a sign issue... 03-14-01
     u16 dmemin  = (u16)(inst2 >> 0x10);
     u16 dmemout = (u16)(inst2 & 0xFFFF);
     u16 gain    = (u16)(inst1 & 0xFFFF);
diff --git a/src/ucode2.cpp b/src/ucode2.cpp
index 0e5d2eb..edc8ba4 100644
--- a/src/ucode2.cpp
+++ b/src/ucode2.cpp
@@ -28,9 +28,11 @@ extern "C" {
   #include "hle.h"
 }
 
+extern "C" void (*ABI2[])(void);
+
 extern u8 BufferSpace[0x10000];
 
-static void SPNOOP () {
+static void SPNOOP (void) {
     DebugMessage(M64MSG_ERROR, "Unknown/Unimplemented Audio Command %i in ABI 2", (int)(inst1 >> 24));
 }
 extern u16 AudioInBuffer;       // 0x0000(T8)
@@ -46,7 +48,7 @@ extern u16 ResampleLUT [0x200];
 bool isMKABI = false;
 bool isZeldaABI = false;
 
-static void LOADADPCM2 () { // Loads an ADPCM table - Works 100% Now 03-13-01
+static void LOADADPCM2 (void) { // Loads an ADPCM table - Works 100% Now 03-13-01
     u32 v0;
     v0 = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
     u16 *table = (u16 *)(rsp.RDRAM+v0); // Zelda2 Specific...
@@ -67,17 +69,17 @@ static void LOADADPCM2 () { // Loads an ADPCM table - Works 100% Now 03-13-01
     }
 }
 
-static void SETLOOP2 () {
+static void SETLOOP2 (void) {
     loopval = inst2 & 0xffffff; // No segment?
 }
 
-static void SETBUFF2 () {
+static void SETBUFF2 (void) {
     AudioInBuffer   = u16(inst1);            // 0x00
     AudioOutBuffer  = u16((inst2 >> 0x10)); // 0x02
     AudioCount      = u16(inst2);            // 0x04
 }
 
-static void ADPCM2 () { // Verified to be 100% Accurate...
+static void ADPCM2 (void) { // Verified to be 100% Accurate...
     unsigned char Flags=(u8)(inst1>>16)&0xff;
     //unsigned short Gain=(u16)(inst1&0xffff);
     unsigned int Address=(inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
@@ -356,21 +358,21 @@ static void ADPCM2 () { // Verified to be 100% Accurate...
     memcpy(&rsp.RDRAM[Address],out,32);
 }
 
-static void CLEARBUFF2 () {
+static void CLEARBUFF2 (void) {
     u16 addr = (u16)(inst1 & 0xffff);
     u16 count = (u16)(inst2 & 0xffff);
     if (count > 0)
         memset(BufferSpace+addr, 0, count);
 }
 
-static void LOADBUFF2 () { // Needs accuracy verification...
+static void LOADBUFF2 (void) { // Needs accuracy verification...
     u32 v0;
     u32 cnt = (((inst1 >> 0xC)+3)&0xFFC);
     v0 = (inst2 & 0xfffffc);// + SEGMENTS[(inst2>>24)&0xf];
     memcpy (BufferSpace+(inst1&0xfffc), rsp.RDRAM+v0, (cnt+3)&0xFFFC);
 }
 
-static void SAVEBUFF2 () { // Needs accuracy verification...
+static void SAVEBUFF2 (void) { // Needs accuracy verification...
     u32 v0;
     u32 cnt = (((inst1 >> 0xC)+3)&0xFFC);
     v0 = (inst2 & 0xfffffc);// + SEGMENTS[(inst2>>24)&0xf];
@@ -378,7 +380,7 @@ static void SAVEBUFF2 () { // Needs accuracy verification...
 }
 
 
-static void MIXER2 () { // Needs accuracy verification...
+static void MIXER2 (void) { // Needs accuracy verification...
     u16 dmemin  = (u16)(inst2 >> 0x10);
     u16 dmemout = (u16)(inst2 & 0xFFFF);
     u32 count   = ((inst1 >> 12) & 0xFF0);
@@ -400,7 +402,7 @@ static void MIXER2 () { // Needs accuracy verification...
 }
 
 
-static void RESAMPLE2 () {
+static void RESAMPLE2 (void) {
     unsigned char Flags=(u8)((inst1>>16)&0xff);
     unsigned int Pitch=((inst1&0xffff))<<1;
     u32 addy = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
@@ -462,7 +464,7 @@ static void RESAMPLE2 () {
     //memcpy (RSWORK, src+srcPtr, 0x8);
 }
 
-static void DMEMMOVE2 () { // Needs accuracy verification...
+static void DMEMMOVE2 (void) { // Needs accuracy verification...
     u32 v0, v1;
     u32 cnt;
     if ((inst2 & 0xffff)==0)
@@ -484,7 +486,7 @@ static void DMEMMOVE2 () { // Needs accuracy verification...
 u32 t3, s5, s6;
 u16 env[8];
 
-static void ENVSETUP1 () {
+static void ENVSETUP1 (void) {
     u32 tmp;
 
     //fprintf (dfile, "ENVSETUP1: inst1 = %08X, inst2 = %08X\n", inst1, inst2);
@@ -498,7 +500,7 @@ static void ENVSETUP1 () {
     //fprintf (dfile, " t3 = %X / s5 = %X / s6 = %X / env[4] = %X / env[5] = %X\n", t3, s5, s6, env[4], env[5]);
 }
 
-static void ENVSETUP2 () {
+static void ENVSETUP2 (void) {
     u32 tmp;
 
     //fprintf (dfile, "ENVSETUP2: inst1 = %08X, inst2 = %08X\n", inst1, inst2);
@@ -513,7 +515,7 @@ static void ENVSETUP2 () {
     //fprintf (dfile, " env[0] = %X / env[1] = %X / env[2] = %X / env[3] = %X\n", env[0], env[1], env[2], env[3]);
 }
 
-static void ENVMIXER2 () {
+static void ENVMIXER2 (void) {
     //fprintf (dfile, "ENVMIXER: inst1 = %08X, inst2 = %08X\n", inst1, inst2);
 
     s16 *bufft6, *bufft7, *buffs0, *buffs1;
@@ -616,7 +618,7 @@ static void ENVMIXER2 () {
     }
 }
 
-static void DUPLICATE2() {
+static void DUPLICATE2(void) {
     unsigned short Count = (inst1 >> 16) & 0xff;
     unsigned short In  = inst1&0xffff;
     unsigned short Out = (inst2>>16);
@@ -632,7 +634,7 @@ static void DUPLICATE2() {
     }
 }
 /*
-static void INTERL2 () { // Make your own...
+static void INTERL2 (void) { // Make your own...
     short Count = inst1 & 0xffff;
     unsigned short  Out   = inst2 & 0xffff;
     unsigned short In     = (inst2 >> 16);
@@ -663,7 +665,7 @@ static void INTERL2 () { // Make your own...
 }
 */
 
-static void INTERL2 () {
+static void INTERL2 (void) {
     short Count = inst1 & 0xffff;
     unsigned short  Out   = inst2 & 0xffff;
     unsigned short In     = (inst2 >> 16);
@@ -679,7 +681,7 @@ static void INTERL2 () {
     }
 }
 
-static void INTERLEAVE2 () { // Needs accuracy verification...
+static void INTERLEAVE2 (void) { // Needs accuracy verification...
     u32 inL, inR;
     u16 *outbuff;
     u16 *inSrcR;
@@ -711,7 +713,7 @@ static void INTERLEAVE2 () { // Needs accuracy verification...
     }
 }
 
-static void ADDMIXER () {
+static void ADDMIXER (void) {
     short Count   = (inst1 >> 12) & 0x00ff0;
     u16 InBuffer  = (inst2 >> 16);
     u16 OutBuffer = inst2 & 0xffff;
@@ -727,7 +729,7 @@ static void ADDMIXER () {
     }
 }
 
-static void HILOGAIN () {
+static void HILOGAIN (void) {
     u16 cnt = inst1 & 0xffff;
     u16 out = (inst2 >> 16) & 0xffff;
     s16 hi  = (s16)((inst1 >> 4) & 0xf000);
@@ -749,7 +751,7 @@ static void HILOGAIN () {
     }
 }
 
-static void FILTER2 () {
+static void FILTER2 (void) {
             static int cnt = 0;
             static s16 *lutt6;
             static s16 *lutt5;
@@ -874,7 +876,7 @@ static void FILTER2 () {
             memcpy (BufferSpace+(inst1&0xffff), outbuff, cnt);
 }
 
-static void SEGMENT2 () {
+static void SEGMENT2 (void) {
     if (isZeldaABI) {
         FILTER2 ();
         return;
@@ -889,24 +891,24 @@ static void SEGMENT2 () {
     }
 }
 
-static void UNKNOWN () {
+static void UNKNOWN (void) {
 }
 /*
-void (*ABI2[0x20])() = {
+void (*ABI2[0x20])(void) = {
     SPNOOP, ADPCM2, CLEARBUFF2, SPNOOP, SPNOOP, RESAMPLE2, SPNOOP, SEGMENT2,
     SETBUFF2, SPNOOP, DMEMMOVE2, LOADADPCM2, MIXER2, INTERLEAVE2, HILOGAIN, SETLOOP2,
     SPNOOP, INTERL2, ENVSETUP1, ENVMIXER2, LOADBUFF2, SAVEBUFF2, ENVSETUP2, SPNOOP,
     SPNOOP, SPNOOP, SPNOOP, SPNOOP, SPNOOP, SPNOOP, SPNOOP, SPNOOP
 };*/
 
-void (*ABI2[0x20])() = {
+void (*ABI2[0x20])(void) = {
     SPNOOP , ADPCM2, CLEARBUFF2, UNKNOWN, ADDMIXER, RESAMPLE2, UNKNOWN, SEGMENT2,
     SETBUFF2 , DUPLICATE2, DMEMMOVE2, LOADADPCM2, MIXER2, INTERLEAVE2, HILOGAIN, SETLOOP2,
     SPNOOP, INTERL2 , ENVSETUP1, ENVMIXER2, LOADBUFF2, SAVEBUFF2, ENVSETUP2, SPNOOP,
     HILOGAIN , SPNOOP, DUPLICATE2 , UNKNOWN    , SPNOOP  , SPNOOP    , SPNOOP  , SPNOOP
 };
 /*
-void (*ABI2[0x20])() = {
+void (*ABI2[0x20])(void) = {
     SPNOOP , ADPCM2, CLEARBUFF2, SPNOOP, SPNOOP, RESAMPLE2  , SPNOOP  , SEGMENT2,
     SETBUFF2 , DUPLICATE2, DMEMMOVE2, LOADADPCM2, MIXER2, INTERLEAVE2, SPNOOP, SETLOOP2,
     SPNOOP, INTERL2 , ENVSETUP1, ENVMIXER2, LOADBUFF2, SAVEBUFF2, ENVSETUP2, SPNOOP,
diff --git a/src/ucode3.cpp b/src/ucode3.cpp
index 9ff4ae9..302e75b 100644
--- a/src/ucode3.cpp
+++ b/src/ucode3.cpp
@@ -28,7 +28,9 @@ extern "C" {
   #include "hle.h"
 }
 
-static void SPNOOP () {
+extern "C" void (*ABI3[])(void);
+
+static void SPNOOP (void) {
     DebugMessage(M64MSG_ERROR, "Unknown/Unimplemented Audio Command %i in ABI 3", (int)(inst1 >> 24));
 }
 
@@ -54,7 +56,7 @@ extern u16 adpcmtable[0x88];
 extern u8 BufferSpace[0x10000];
 
 /*
-static void SETVOL3 () { // Swapped Rate_Left and Vol
+static void SETVOL3 (void) { // Swapped Rate_Left and Vol
     u8 Flags = (u8)(inst1 >> 0x10);
     if (Flags & 0x4) { // 288
         if (Flags & 0x2) { // 290
@@ -71,7 +73,7 @@ static void SETVOL3 () { // Swapped Rate_Left and Vol
     }
 }
 */
-static void SETVOL3 () {
+static void SETVOL3 (void) {
     u8 Flags = (u8)(inst1 >> 0x10);
     if (Flags & 0x4) { // 288
         if (Flags & 0x2) { // 290
@@ -89,7 +91,7 @@ static void SETVOL3 () {
     }
 }
 
-static void ENVMIXER3 () {
+static void ENVMIXER3 (void) {
     u8 flags = (u8)((inst1 >> 16) & 0xff);
     u32 addy = (inst2 & 0xFFFFFF);
 
@@ -247,7 +249,7 @@ static void ENVMIXER3 () {
     memcpy(rsp.RDRAM+addy, (u8 *)hleMixerWorkArea,80);
 }
 //*/
-static void ENVMIXER3o () {
+static void ENVMIXER3o (void) {
     u8 flags = (u8)((inst1 >> 16) & 0xff);
     u32 addy = (inst2 & 0xFFFFFF);// + SEGMENTS[(inst2>>24)&0xf];
     //static FILE *dfile = fopen ("d:\\envmix.txt", "wt");
@@ -404,7 +406,7 @@ static void ENVMIXER3o () {
     memcpy(rsp.RDRAM+addy, (u8 *)hleMixerWorkArea,80);
 }
 /*
-static void ENVMIXER3 () { // Borrowed from RCP...
+static void ENVMIXER3 (void) { // Borrowed from RCP...
     u8  flags = (u8)((inst1 >> 16) & 0xff);
     u32 addy = (inst2 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
 
@@ -483,13 +485,13 @@ static void ENVMIXER3 () { // Borrowed from RCP...
 }*/
 
 
-static void CLEARBUFF3 () {
+static void CLEARBUFF3 (void) {
     u16 addr = (u16)(inst1 & 0xffff);
     u16 count = (u16)(inst2 & 0xffff);
     memset(BufferSpace+addr+0x4f0, 0, count);
 }
 
-static void MIXER3 () { // Needs accuracy verification...
+static void MIXER3 (void) { // Needs accuracy verification...
     u16 dmemin  = (u16)(inst2 >> 0x10)  + 0x4f0;
     u16 dmemout = (u16)(inst2 & 0xFFFF) + 0x4f0;
     //u8  flags   = (u8)((inst1 >> 16) & 0xff);
@@ -509,7 +511,7 @@ static void MIXER3 () { // Needs accuracy verification...
     }
 }
 
-static void LOADBUFF3 () {
+static void LOADBUFF3 (void) {
     u32 v0;
     u32 cnt = (((inst1 >> 0xC)+3)&0xFFC);
     v0 = (inst2 & 0xfffffc);
@@ -517,7 +519,7 @@ static void LOADBUFF3 () {
     memcpy (BufferSpace+src, rsp.RDRAM+v0, cnt);
 }
 
-static void SAVEBUFF3 () {
+static void SAVEBUFF3 (void) {
     u32 v0;
     u32 cnt = (((inst1 >> 0xC)+3)&0xFFC);
     v0 = (inst2 & 0xfffffc);
@@ -525,7 +527,7 @@ static void SAVEBUFF3 () {
     memcpy (rsp.RDRAM+v0, BufferSpace+src, cnt);
 }
 
-static void LOADADPCM3 () { // Loads an ADPCM table - Works 100% Now 03-13-01
+static void LOADADPCM3 (void) { // Loads an ADPCM table - Works 100% Now 03-13-01
     u32 v0;
     v0 = (inst2 & 0xffffff);
     //memcpy (dmem+0x3f0, rsp.RDRAM+v0, inst1&0xffff); 
@@ -547,7 +549,7 @@ static void LOADADPCM3 () { // Loads an ADPCM table - Works 100% Now 03-13-01
     }
 }
 
-static void DMEMMOVE3 () { // Needs accuracy verification...
+static void DMEMMOVE3 (void) { // Needs accuracy verification...
     u32 v0, v1;
     u32 cnt;
     v0 = (inst1 & 0xFFFF) + 0x4f0;
@@ -560,11 +562,11 @@ static void DMEMMOVE3 () { // Needs accuracy verification...
     }
 }
 
-static void SETLOOP3 () {
+static void SETLOOP3 (void) {
     loopval = (inst2 & 0xffffff);
 }
 
-static void ADPCM3 () { // Verified to be 100% Accurate...
+static void ADPCM3 (void) { // Verified to be 100% Accurate...
     unsigned char Flags=(u8)(inst2>>0x1c)&0xff;
     //unsigned short Gain=(u16)(inst1&0xffff);
     unsigned int Address=(inst1 & 0xffffff);// + SEGMENTS[(inst2>>24)&0xf];
@@ -820,7 +822,7 @@ static void ADPCM3 () { // Verified to be 100% Accurate...
     memcpy(&rsp.RDRAM[Address],out,32);
 }
 
-static void RESAMPLE3 () {
+static void RESAMPLE3 (void) {
     unsigned char Flags=(u8)((inst2>>0x1e));
     unsigned int Pitch=((inst2>>0xe)&0xffff)<<1;
     u32 addy = (inst1 & 0xffffff);
@@ -918,7 +920,7 @@ static void RESAMPLE3 () {
     *(u16 *)(rsp.RDRAM+addy+10) = Accum;
 }
 
-static void INTERLEAVE3 () { // Needs accuracy verification...
+static void INTERLEAVE3 (void) { // Needs accuracy verification...
     //u32 inL, inR;
     u16 *outbuff = (u16 *)(BufferSpace + 0x4f0);//(u16 *)(AudioOutBuffer+dmem);
     u16 *inSrcR;
@@ -951,7 +953,7 @@ static void INTERLEAVE3 () { // Needs accuracy verification...
     }
 }
 
-//static void UNKNOWN ();
+//static void UNKNOWN (void);
 /*
 typedef struct {
     unsigned char sync;
@@ -977,17 +979,17 @@ mp3struct mp3;
 FILE *mp3dat;
 */
 
-static void WHATISTHIS () {
+static void WHATISTHIS (void) {
 }
 
 //static FILE *fp = fopen ("d:\\mp3info.txt", "wt");
 u32 setaddr;
-static void MP3ADDY () {
+static void MP3ADDY (void) {
     setaddr = (inst2 & 0xffffff);
 }
 
 extern "C" {
-    void rsp_run();
+    void rsp_run(void);
     void mp3setup (unsigned int inst1, unsigned int inst2, unsigned int t8);
 }
 
@@ -995,7 +997,7 @@ extern u32 base, dmembase;
 extern "C" {
     extern char *pDMEM;
 }
-void MP3 ();
+void MP3 (void);
 /*
  {
 //  return;
@@ -1013,7 +1015,7 @@ void MP3 ();
     memcpy (imem+0x238, rsp.RDRAM+((u32*)BufferSpace)[0x008/4], 0x9C0);
     ((u32*)BufferSpace)[0xFF4/4] = setaddr;
     pDMEM = (char *)BufferSpace;
-    rsp_run ();
+    rsp_run (void);
     dmembase = ((u32*)BufferSpace)[0xFF8/4];
     loopval  = ((u32*)BufferSpace)[0xFFC/4];
 //0x1A98  SW       S1, 0x0FF4 (R0)
@@ -1044,29 +1046,17 @@ achieve near-CD quality, an important specification to enable dual-channel ISDN
 (integrated-services-digital-network) to be the future high-bandwidth pipe to the home. 
 
 */
-static void DISABLE () {
+static void DISABLE (void) {
     //MessageBox (NULL, "Help", "ABI 3 Command 0", MB_OK);
     //ChangeABI (5);
 }
 
 
-void (*ABI3[0x20])() = {
+void (*ABI3[0x20])(void) = {
     DISABLE , ADPCM3 , CLEARBUFF3,  ENVMIXER3  , LOADBUFF3, RESAMPLE3  , SAVEBUFF3, MP3,
     MP3ADDY, SETVOL3, DMEMMOVE3 , LOADADPCM3 , MIXER3   , INTERLEAVE3, WHATISTHIS   , SETLOOP3,
     SPNOOP , SPNOOP, SPNOOP   , SPNOOP    , SPNOOP  , SPNOOP    , SPNOOP  , SPNOOP,
     SPNOOP , SPNOOP, SPNOOP   , SPNOOP    , SPNOOP  , SPNOOP    , SPNOOP  , SPNOOP
 };
-#if 0
-void (*ABI3[32])(void) =
-{
-   SPNOOP  , ADPCM3    , CLEARBUFF3, SPNOOP   ,
-   MIXER3   , RESAMPLE3  , SPNOOP   , MP3   ,
-   MP3ADDY , SETVOL3   , DMEMMOVE3 , LOADADPCM3,
-   MIXER3   , INTERLEAVE3, WHATISTHIS    , SETLOOP3  ,
-   SPNOOP  , /*MEMHALVE  , ENVSET1*/ SPNOOP, SPNOOP  , ENVMIXER3 ,
-   LOADBUFF3, SAVEBUFF3  , /*ENVSET2*/SPNOOP  , SPNOOP   ,
-   SPNOOP  , SPNOOP    , SPNOOP   , SPNOOP   ,
-   SPNOOP  , SPNOOP    , SPNOOP   , SPNOOP
-};
-#endif
+
 

-- 
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