diff --git a/desmume/src/matrix.h b/desmume/src/matrix.h
index 13afc4da9..54b7143d9 100644
--- a/desmume/src/matrix.h
+++ b/desmume/src/matrix.h
@@ -41,11 +41,28 @@ void MatrixInit (float *matrix);
#define MATRIXFASTCALL
#endif
-void MATRIXFASTCALL MatrixMultVec3x3 (const float * matrix, float * vecPtr);
-void MATRIXFASTCALL MatrixMultVec4x4 (const float * matrix, float * vecPtr);
-void MATRIXFASTCALL MatrixMultiply (float * matrix, const float * rightMatrix);
-void MATRIXFASTCALL MatrixTranslate (float *matrix, const float *ptr);
-void MATRIXFASTCALL MatrixScale (float * matrix, const float * ptr);
+//In order to conditionally use these asm optimized functions in visual studio
+//without having to make new build types to exclude the assembly files.
+//a bit sloppy, but there aint much to it
+#ifdef SSE2
+#define SSE2_FUNC(X) _sse2_##X
+#define MatrixMultVec4x4 _sse2_MatrixMultVec4x4
+#define MatrixMultVec3x3 _sse2_MatrixMultVec3x3
+#define MatrixMultiply _sse2_MatrixMultiply
+#define MatrixTranslate _sse2_MatrixTranslate
+#define MatrixScale _sse2_MatrixScale
+#else
+#define SSE2_FUNC(X) X
+#endif
+
+void MATRIXFASTCALL SSE2_FUNC(MatrixMultVec3x3) (const float * matrix, float * vecPtr);
+void MATRIXFASTCALL SSE2_FUNC(MatrixMultVec4x4) (const float * matrix, float * vecPtr);
+void MATRIXFASTCALL SSE2_FUNC(MatrixMultiply) (float * matrix, const float * rightMatrix);
+void MATRIXFASTCALL SSE2_FUNC(MatrixTranslate) (float *matrix, const float *ptr);
+void MATRIXFASTCALL SSE2_FUNC(MatrixScale) (float * matrix, const float * ptr);
+
+
+
float MATRIXFASTCALL MatrixGetMultipliedIndex (int index, float *matrix, float *rightMatrix);
void MATRIXFASTCALL MatrixSet (float *matrix, int x, int y, float value);
void MATRIXFASTCALL MatrixCopy (float * matrixDST, const float * matrixSRC);
diff --git a/desmume/src/matrix_sse2-x86.asm b/desmume/src/matrix_sse2-x86.asm
index 067881592..668e488c1 100644
--- a/desmume/src/matrix_sse2-x86.asm
+++ b/desmume/src/matrix_sse2-x86.asm
@@ -24,7 +24,7 @@
.model flat
.code
-@MatrixMultVec4x4@8 PROC PUBLIC
+@_sse2_MatrixMultVec4x4@8 PROC PUBLIC
movaps xmm0, XMMWORD PTR [ecx]
movaps xmm1, XMMWORD PTR [ecx+16]
movaps xmm2, XMMWORD PTR [ecx+32]
@@ -46,9 +46,9 @@
addps xmm4, xmm7
movaps XMMWORD PTR [edx], xmm4
ret 0
-@MatrixMultVec4x4@8 ENDP
+@_sse2_MatrixMultVec4x4@8 ENDP
-@MatrixMultVec3x3@8 PROC PUBLIC
+@_sse2_MatrixMultVec3x3@8 PROC PUBLIC
movaps xmm0, XMMWORD PTR [ecx]
movaps xmm1, XMMWORD PTR [ecx+16]
movaps xmm2, XMMWORD PTR [ecx+32]
@@ -66,9 +66,9 @@
addps xmm4, xmm6
movaps XMMWORD PTR [edx], xmm4
ret 0
-@MatrixMultVec3x3@8 ENDP
+@_sse2_MatrixMultVec3x3@8 ENDP
-@MatrixMultiply@8 PROC PUBLIC
+@_sse2_MatrixMultiply@8 PROC PUBLIC
movaps xmm0, XMMWORD PTR [ecx]
movaps xmm1, XMMWORD PTR [ecx+16]
movaps xmm2, XMMWORD PTR [ecx+32]
@@ -138,9 +138,9 @@
addps xmm4,xmm7
movaps XMMWORD PTR [ecx+48],xmm4
ret 0
-@MatrixMultiply@8 ENDP
+@_sse2_MatrixMultiply@8 ENDP
-@MatrixTranslate@8 PROC PUBLIC
+@_sse2_MatrixTranslate@8 PROC PUBLIC
movaps xmm0, XMMWORD PTR [ecx]
movaps xmm1, XMMWORD PTR [ecx+16]
movaps xmm2, XMMWORD PTR [ecx+32]
@@ -160,9 +160,9 @@
addps xmm4, xmm3
movaps XMMWORD PTR [ecx+48], xmm4
ret 0
-@MatrixTranslate@8 ENDP
+@_sse2_MatrixTranslate@8 ENDP
-@MatrixScale@8 PROC PUBLIC
+@_sse2_MatrixScale@8 PROC PUBLIC
movaps xmm0, XMMWORD PTR [ecx]
movaps xmm1, XMMWORD PTR [ecx+16]
movaps xmm2, XMMWORD PTR [ecx+32]
@@ -179,7 +179,7 @@
movaps XMMWORD PTR [ecx+16],xmm5
movaps XMMWORD PTR [ecx+32],xmm6
ret 0
-@MatrixScale@8 ENDP
+@_sse2_MatrixScale@8 ENDP
end
diff --git a/desmume/src/types.h b/desmume/src/types.h
index ea9c82eeb..3f193ab30 100644
--- a/desmume/src/types.h
+++ b/desmume/src/types.h
@@ -20,10 +20,10 @@
#ifndef TYPES_HPP
#define TYPES_HPP
-//--------------
-//configuration
-#define DEVELOPER
-//--------------
+//todo - everyone will want to support this eventually, i suppose
+#ifdef _MSC_VER
+#include "config.h"
+#endif
#define DESMUME_NAME "DeSmuME"
@@ -43,20 +43,18 @@
#define DESMUME_CPUEXT_STRING ""
#endif
-//#ifdef DEVELOPER
-//#define DESMUME_FEATURE_STRING " dev+"
-//#else
+#ifdef DEVELOPER
+#define DESMUME_FEATURE_STRING " dev+"
+#else
#define DESMUME_FEATURE_STRING ""
-//#endif
+#endif
#ifdef DEBUG
#define DESMUME_SUBVERSION_STRING " debug"
-#else
-#ifdef RELEASE
+#elif defined(PUBLIC_RELEASE)
#define DESMUME_SUBVERSION_STRING ""
#else
-#define DESMUME_SUBVERSION_STRING " prerelease"
-#endif
+#define DESMUME_SUBVERSION_STRING " svn"
#endif
#ifdef __INTEL_COMPILER
@@ -76,7 +74,7 @@
#endif
#define DESMUME_VERSION_NUMERIC 90300
-#define DESMUME_VERSION_STRING " " "0.9.3 svn" DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_SUBVERSION_STRING DESMUME_COMPILER
+#define DESMUME_VERSION_STRING " " "0.9.3" DESMUME_SUBVERSION_STRING DESMUME_FEATURE_STRING DESMUME_PLATFORM_STRING DESMUME_CPUEXT_STRING DESMUME_COMPILER
#define DESMUME_NAME_AND_VERSION " " DESMUME_NAME DESMUME_VERSION_STRING
#ifdef _WIN32
diff --git a/desmume/src/windows/DeSmuME_2005.vcproj b/desmume/src/windows/DeSmuME_2005.vcproj
index 822cf0241..5491fa8c3 100644
--- a/desmume/src/windows/DeSmuME_2005.vcproj
+++ b/desmume/src/windows/DeSmuME_2005.vcproj
@@ -50,8 +50,8 @@
FavorSizeOrSpeed="0"
EnableFiberSafeOptimizations="false"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".;..;.\zlib123;.\zziplib;.\winpcap"
- PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;BETA_VERSION;SPU_INTERPOLATE;HAVE_LIBZ;HAVE_LIBZZIP;NOMINMAX;DEBUG;WANTPROGINFO;EXPERIMENTAL_WIFI"
+ AdditionalIncludeDirectories=".;..;.\zlib123;.\zziplib;.\winpcap;userconfig;defaultconfig"
+ PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;WIN32;SPU_INTERPOLATE;HAVE_LIBZ;HAVE_LIBZZIP;NOMINMAX;DEBUG;EXPERIMENTAL_WIFI"
ExceptionHandling="1"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
@@ -107,96 +107,7 @@
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -491,6 +241,10 @@
RelativePath=".\colorctrl.h"
>
+
+
@@ -586,14 +340,6 @@
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+