Major Build System changes:

* Changed w32pthreads library into a DLL so that it can be used from plugins correctly. (NOTE: you will need to make sure to build and copy w32pthreads.dll into your pcsx2 folder).
 * Switched pcsx2 from static CRT to shared CRT linking (needed to ensure correct exception handling behavior in multithreaded DLL environments).
 * Switched all standard plugins in the Suite to the shared CRT, to match pcsx2's new style. :)
 * Renamed _DEBUG (depreciated) to PCSX2_DEBUG (excluding Gabest projects since the ATL still uses it).
 * Added intrin.h to Pcsx2Defs.h (so that it is included universally), and added intrin_x86.h for GCC compatibility.

Notes:
 * Current plugin version compatibility status should be unaffected.  The new shared-CRT plugins work fine with older versions of Pcsx2, and the older plugins should work fine with the new shared-CRT version of pcsx2; so long as the necessary CRT DLLs are available on the user's system.
 * All future packagings of pcsx2 will include w32pthreads.dll and the Common Runtimes (CRTs).
 * Existing users who do not have MSVC installed can obtain the CRTs by downloading the Microsoft Visual C++ 2008 Redistributable Package (anyone with msvc installed should already have all they need).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1388 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-06-18 08:20:19 +00:00
parent 186403a789
commit b974b815ff
82 changed files with 2946 additions and 2358 deletions

View File

@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -38,9 +38,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
/>
<Tool
@ -74,7 +71,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -95,12 +92,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -133,7 +125,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -154,12 +146,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -38,11 +38,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -75,7 +70,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -96,17 +91,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -139,7 +123,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -160,17 +144,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -2,14 +2,19 @@
-- Air's Notes on Using PThreads --
-----------------------------------
We use pthreads as a static link because it allows for inlined calls of several methods,
most notably the InterlockedExchange implementations. These would be DLL invocations
otherwise, and would be roughly twice to three times the total overhead.
The official name of the DLL is "w32pthreads.dll" -- I use the prefix to indicate with
some vaugeness that the pthreads dll is a modified non-standard implementation (see below
for details); just in case pthreads-win32 dlls in another universe were to be conflicting
interests.
I created a subfolder for pthreads' publicall exposed header files, since "config.h" was
I created a subfolder for pthreads' publically exposed header files, since "config.h" was
rather brutal include file namespace pollution. >_<
Important: pthread_cond is an inherently flawed concept, and is quite incredibly slow
on top of it. It's primarily meant for inter-process thread regulation, of which we
do none. Therefore it has been excluded from the library builds. Don't use it!
I've also disabled rwlocks, since they use pthread_cond internally. Again, there should
be little or no reason to have to use those within the context of a high performance app
like Pcsx2.

View File

@ -1077,6 +1077,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_condattr_setpshared (pthread_condattr_t *
/*
* Condition Variable Functions
*/
#ifdef PCSX2_ALLOW_COND
PTW32_DLLPORT int PTW32_CDECL pthread_cond_init (pthread_cond_t * cond,
const pthread_condattr_t * attr);
@ -1092,6 +1093,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_cond_timedwait (pthread_cond_t * cond,
PTW32_DLLPORT int PTW32_CDECL pthread_cond_signal (pthread_cond_t * cond);
PTW32_DLLPORT int PTW32_CDECL pthread_cond_broadcast (pthread_cond_t * cond);
#endif
/*
* Scheduling

View File

@ -2,7 +2,7 @@
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="pthreads"
Name="w32pthreads"
ProjectGUID="{26511268-2902-4997-8421-ECD7055F9E28}"
RootNamespace="pthreads"
Keyword="Win32Proj"
@ -18,8 +18,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
ConfigurationType="2"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -39,15 +39,11 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\include&quot;"
PreprocessorDefinitions="PTW32_STATIC_LIB;__CLEANUP_SEH;WIN32;_DEBUG;_LIB"
PreprocessorDefinitions="PTW32_BUILD;__CLEANUP_SEH;_DEBUG;_LIB"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
@ -60,11 +56,17 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
Name="VCLinkerTool"
AdditionalDependencies="ws2_32.lib"
OutputFile="$(SolutionDir)\bin\$(ProjectName).dll"
ImportLibrary="$(OutDir)\$(ProjectName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
@ -74,14 +76,17 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops"
ConfigurationType="2"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -102,23 +107,11 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\include&quot;"
PreprocessorDefinitions="PTW32_STATIC_LIB;PTW32_BUILD_INLINED;__CLEANUP_SEH;WIN32;NDEBUG;_LIB"
StringPooling="true"
PreprocessorDefinitions="PTW32_BUILD;__CLEANUP_SEH;NDEBUG;_LIB"
ExceptionHandling="2"
RuntimeLibrary="0"
StructMemberAlignment="5"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="false"
UsePrecompiledHeader="0"
BrowseInformation="1"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
@ -131,11 +124,17 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
Name="VCLinkerTool"
AdditionalDependencies="ws2_32.lib"
OutputFile="$(SolutionDir)\bin\$(ProjectName).dll"
ImportLibrary="$(OutDir)\$(ProjectName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
@ -145,14 +144,17 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
ConfigurationType="2"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -173,22 +175,11 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)\include&quot;"
PreprocessorDefinitions="PTW32_STATIC_LIB;PTW32_BUILD_INLINED;__CLEANUP_SEH;WIN32;NDEBUG;_LIB"
StringPooling="true"
PreprocessorDefinitions="PTW32_BUILD;__CLEANUP_SEH;NDEBUG;_LIB"
ExceptionHandling="2"
RuntimeLibrary="0"
StructMemberAlignment="5"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
@ -201,11 +192,17 @@
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
Name="VCLinkerTool"
AdditionalDependencies="ws2_32.lib"
OutputFile="$(SolutionDir)\bin\$(ProjectName).dll"
ImportLibrary="$(OutDir)\$(ProjectName).lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
@ -215,6 +212,9 @@
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
@ -439,6 +439,10 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=".\dll.c"
>
</File>
<File
RelativePath=".\errno.c"
>
@ -754,6 +758,7 @@
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -764,6 +769,7 @@
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
@ -774,6 +780,7 @@
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"

View File

@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -38,11 +38,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -75,7 +71,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -96,15 +92,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
StringPooling="true"
RuntimeLibrary="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -137,7 +125,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -158,17 +146,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -77,10 +77,18 @@
#define PS2E_SIO_VERSION 0x0001
#ifdef COMMONdefs
#ifdef __cplusplus
extern "C" {
#endif
u32 CALLBACK PS2EgetLibType(void);
u32 CALLBACK PS2EgetLibVersion2(u32 type);
char* CALLBACK PS2EgetLibName(void);
#ifdef __cplusplus
}
#endif
#endif
// key values:

View File

@ -27,6 +27,12 @@
#define __LINUX__
#endif
#ifdef _MSC_VER
# include <intrin.h>
#else
# include <intrin_x86.h>
#endif
#include "Pcsx2Types.h"
// Renamed ARRAYSIZE to ArraySize -- looks nice and gets rid of Windows.h conflicts (air)
@ -51,7 +57,7 @@
# endif
# else
# ifdef _MSC_VER
# define jBREAKPOINT() do { __asm int 3 } while(0);
# define jBREAKPOINT() __debugbreak();
# else
# define jBREAKPOINT() ((void) *(volatile char *) 0)
# endif

View File

@ -101,6 +101,7 @@ typedef s32 sptr;
//////////////////////////////////////////////////////////////////////////////////////////
// A rough-and-ready cross platform 128-bit datatype, Non-SSE style.
//
#ifdef __cplusplus
struct u128
{

948
common/include/intrin_x86.h Normal file
View File

@ -0,0 +1,948 @@
/*
Compatibility <intrin_x86.h> header for GCC -- GCC equivalents of intrinsic
Microsoft Visual C++ functions. Originally developed for the ReactOS
(<http://www.reactos.org/>) and TinyKrnl (<http://www.tinykrnl.org/>)
projects.
Copyright (c) 2006 KJK::Hyperion <hackbunny@reactos.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
*/
#ifndef KJK_INTRIN_X86_H_
#define KJK_INTRIN_X86_H_
/*
FIXME: review all "memory" clobbers, add/remove to match Visual C++
behavior: some "obvious" memory barriers are not present in the Visual C++
implementation - e.g. __stosX; on the other hand, some memory barriers that
*are* present could have been missed
*/
/*
NOTE: this is a *compatibility* header. Some functions may look wrong at
first, but they're only "as wrong" as they would be on Visual C++. Our
priority is compatibility
NOTE: unlike most people who write inline asm for GCC, I didn't pull the
constraints and the uses of __volatile__ out of my... hat. Do not touch
them. I hate cargo cult programming
NOTE: be very careful with declaring "memory" clobbers. Some "obvious"
barriers aren't there in Visual C++ (e.g. __stosX)
NOTE: review all intrinsics with a return value, add/remove __volatile__
where necessary. If an intrinsic whose value is ignored generates a no-op
under Visual C++, __volatile__ must be omitted; if it always generates code
(for example, if it has side effects), __volatile__ must be specified. GCC
will only optimize out non-volatile asm blocks with outputs, so input-only
blocks are safe. Oddities such as the non-volatile 'rdmsr' are intentional
and follow Visual C++ behavior
NOTE: on GCC 4.1.0, please use the __sync_* built-ins for barriers and
atomic operations. Test the version like this:
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
...
Pay attention to the type of barrier. Make it match with what Visual C++
would use in the same case
*/
/*** Stack frame juggling ***/
#define _ReturnAddress() (__builtin_return_address(0))
#define _AddressOfReturnAddress() (&(((void **)(__builtin_frame_address(0)))[1]))
/* TODO: __getcallerseflags but how??? */
/*** Atomic operations ***/
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
#define _ReadWriteBarrier() __sync_synchronize()
#else
static void __inline__ __attribute__((always_inline)) _MemoryBarrier(void)
{
__asm__ __volatile__("" : : : "memory");
}
#define _ReadWriteBarrier() _MemoryBarrier()
#endif
/* BUGBUG: GCC only supports full barriers */
#define _ReadBarrier _ReadWriteBarrier
#define _WriteBarrier _ReadWriteBarrier
#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40100
static __inline__ __attribute__((always_inline)) char _InterlockedCompareExchange8(volatile char * const Destination, const char Exchange, const char Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
static __inline__ __attribute__((always_inline)) short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
static __inline__ __attribute__((always_inline)) long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
static __inline__ __attribute__((always_inline)) long long _InterlockedCompareExchange64(volatile long long * const Destination, const long long Exchange, const long long Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
static __inline__ __attribute__((always_inline)) void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand)
{
return __sync_val_compare_and_swap(Destination, Comperand, Exchange);
}
static __inline__ __attribute__((always_inline)) long _InterlockedExchange(volatile long * const Target, const long Value)
{
/* NOTE: __sync_lock_test_and_set would be an acquire barrier, so we force a full barrier */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}
static __inline__ __attribute__((always_inline)) void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
{
/* NOTE: ditto */
__sync_synchronize();
return __sync_lock_test_and_set(Target, Value);
}
static __inline__ __attribute__((always_inline)) long _InterlockedExchangeAdd(volatile long * const Addend, const long Value)
{
return __sync_fetch_and_add(Addend, Value);
}
static __inline__ __attribute__((always_inline)) char _InterlockedAnd8(volatile char * const value, const char mask)
{
return __sync_fetch_and_and(value, mask);
}
static __inline__ __attribute__((always_inline)) short _InterlockedAnd16(volatile short * const value, const short mask)
{
return __sync_fetch_and_and(value, mask);
}
static __inline__ __attribute__((always_inline)) long _InterlockedAnd(volatile long * const value, const long mask)
{
return __sync_fetch_and_and(value, mask);
}
static __inline__ __attribute__((always_inline)) char _InterlockedOr8(volatile char * const value, const char mask)
{
return __sync_fetch_and_or(value, mask);
}
static __inline__ __attribute__((always_inline)) short _InterlockedOr16(volatile short * const value, const short mask)
{
return __sync_fetch_and_or(value, mask);
}
static __inline__ __attribute__((always_inline)) long _InterlockedOr(volatile long * const value, const long mask)
{
return __sync_fetch_and_or(value, mask);
}
static __inline__ __attribute__((always_inline)) char _InterlockedXor8(volatile char * const value, const char mask)
{
return __sync_fetch_and_xor(value, mask);
}
static __inline__ __attribute__((always_inline)) short _InterlockedXor16(volatile short * const value, const short mask)
{
return __sync_fetch_and_xor(value, mask);
}
static __inline__ __attribute__((always_inline)) long _InterlockedXor(volatile long * const value, const long mask)
{
return __sync_fetch_and_xor(value, mask);
}
#else
static __inline__ __attribute__((always_inline)) char _InterlockedCompareExchange8(volatile char * const Destination, const char Exchange, const char Comperand)
{
char retval = Comperand;
__asm__("lock; cmpxchgb %b[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) short _InterlockedCompareExchange16(volatile short * const Destination, const short Exchange, const short Comperand)
{
short retval = Comperand;
__asm__("lock; cmpxchgw %w[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange): "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) long _InterlockedCompareExchange(volatile long * const Destination, const long Exchange, const long Comperand)
{
long retval = Comperand;
__asm__("lock; cmpxchgl %k[Exchange], %[Destination]" : [retval] "+a" (retval) : [Destination] "m" (*Destination), [Exchange] "q" (Exchange): "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) long long _InterlockedCompareExchange64(volatile long long * const Destination, const long long Exchange, const long long Comperand)
{
long long retval = Comperand;
__asm__
(
"cmpxchg8b %[Destination]" :
[retval] "+A" (retval) :
[Destination] "m" (*Destination),
"b" ((unsigned long)((Exchange >> 0) & 0xFFFFFFFF)),
"c" ((unsigned long)((Exchange >> 32) & 0xFFFFFFFF)) :
"memory"
);
return retval;
}
static __inline__ __attribute__((always_inline)) void * _InterlockedCompareExchangePointer(void * volatile * const Destination, void * const Exchange, void * const Comperand)
{
void * retval = (void *)Comperand;
__asm__("lock; cmpxchgl %k[Exchange], %[Destination]" : [retval] "=a" (retval) : "[retval]" (retval), [Destination] "m" (*Destination), [Exchange] "q" (Exchange) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) long _InterlockedExchange(volatile long * const Target, const long Value)
{
long retval = Value;
__asm__("xchgl %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) void * _InterlockedExchangePointer(void * volatile * const Target, void * const Value)
{
void * retval = Value;
__asm__("xchgl %[retval], %[Target]" : [retval] "+r" (retval) : [Target] "m" (*Target) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) long _InterlockedExchangeAdd(volatile long * const Addend, const long Value)
{
long retval = Value;
__asm__("lock; xaddl %[retval], %[Addend]" : [retval] "+r" (retval) : [Addend] "m" (*Addend) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) char _InterlockedAnd8(volatile char * const value, const char mask)
{
char x;
char y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange8(value, x & mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) short _InterlockedAnd16(volatile short * const value, const short mask)
{
short x;
short y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange16(value, x & mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) long _InterlockedAnd(volatile long * const value, const long mask)
{
long x;
long y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange(value, x & mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) char _InterlockedOr8(volatile char * const value, const char mask)
{
char x;
char y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange8(value, x | mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) short _InterlockedOr16(volatile short * const value, const short mask)
{
short x;
short y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange16(value, x | mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) long _InterlockedOr(volatile long * const value, const long mask)
{
long x;
long y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange(value, x | mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) char _InterlockedXor8(volatile char * const value, const char mask)
{
char x;
char y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange8(value, x ^ mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) short _InterlockedXor16(volatile short * const value, const short mask)
{
short x;
short y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange16(value, x ^ mask, x);
}
while(y != x);
return y;
}
static __inline__ __attribute__((always_inline)) long _InterlockedXor(volatile long * const value, const long mask)
{
long x;
long y;
y = *value;
do
{
x = y;
y = _InterlockedCompareExchange(value, x ^ mask, x);
}
while(y != x);
return y;
}
#endif
static __inline__ __attribute__((always_inline)) long _InterlockedAddLargeStatistic(volatile long long * const Addend, const long Value)
{
__asm__
(
"lock; add %[Value], %[Lo32];"
"jae LABEL%=;"
"lock; adc $0, %[Hi32];"
"LABEL%=:;" :
[Lo32] "=m" (*((volatile long *)(Addend) + 0)), [Hi32] "=m" (*((volatile long *)(Addend) + 1)) :
[Value] "ir" (Value)
);
return Value;
}
static __inline__ __attribute__((always_inline)) long _InterlockedDecrement(volatile long * const lpAddend)
{
return _InterlockedExchangeAdd(lpAddend, -1) - 1;
}
static __inline__ __attribute__((always_inline)) long _InterlockedIncrement(volatile long * const lpAddend)
{
return _InterlockedExchangeAdd(lpAddend, 1) + 1;
}
static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandreset(volatile long * a, const long b)
{
unsigned char retval;
__asm__("lock; btrl %[b], %[a]; setb %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory");
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _interlockedbittestandset(volatile long * a, const long b)
{
unsigned char retval;
__asm__("lock; btsl %[b], %[a]; setc %b[retval]" : [retval] "=r" (retval), [a] "=m" (a) : [b] "Ir" (b) : "memory");
return retval;
}
/*** String operations ***/
/* NOTE: we don't set a memory clobber in the __stosX functions because Visual C++ doesn't */
static __inline__ __attribute__((always_inline)) void __stosb(unsigned char * Dest, const unsigned char Data, size_t Count)
{
__asm__ __volatile__
(
"rep; stosb" :
[Dest] "=D" (Dest), [Count] "=c" (Count) :
"[Dest]" (Dest), "a" (Data), "[Count]" (Count)
);
}
static __inline__ __attribute__((always_inline)) void __stosw(unsigned short * Dest, const unsigned short Data, size_t Count)
{
__asm__ __volatile__
(
"rep; stosw" :
[Dest] "=D" (Dest), [Count] "=c" (Count) :
"[Dest]" (Dest), "a" (Data), "[Count]" (Count)
);
}
static __inline__ __attribute__((always_inline)) void __stosd(unsigned long * Dest, const unsigned long Data, size_t Count)
{
__asm__ __volatile__
(
"rep; stosl" :
[Dest] "=D" (Dest), [Count] "=c" (Count) :
"[Dest]" (Dest), "a" (Data), "[Count]" (Count)
);
}
static __inline__ __attribute__((always_inline)) void __movsb(unsigned char * Destination, const unsigned char * Source, size_t Count)
{
__asm__ __volatile__
(
"rep; movsb" :
[Destination] "=D" (Destination), [Source] "=S" (Source), [Count] "=c" (Count) :
"[Destination]" (Destination), "[Source]" (Source), "[Count]" (Count)
);
}
static __inline__ __attribute__((always_inline)) void __movsw(unsigned short * Destination, const unsigned short * Source, size_t Count)
{
__asm__ __volatile__
(
"rep; movsw" :
[Destination] "=D" (Destination), [Source] "=S" (Source), [Count] "=c" (Count) :
"[Destination]" (Destination), "[Source]" (Source), "[Count]" (Count)
);
}
static __inline__ __attribute__((always_inline)) void __movsd(unsigned long * Destination, const unsigned long * Source, size_t Count)
{
__asm__ __volatile__
(
"rep; movsd" :
[Destination] "=D" (Destination), [Source] "=S" (Source), [Count] "=c" (Count) :
"[Destination]" (Destination), "[Source]" (Source), "[Count]" (Count)
);
}
/*** FS segment addressing ***/
static __inline__ __attribute__((always_inline)) void __writefsbyte(const unsigned long Offset, const unsigned char Data)
{
__asm__("movb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
static __inline__ __attribute__((always_inline)) void __writefsword(const unsigned long Offset, const unsigned short Data)
{
__asm__("movw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
static __inline__ __attribute__((always_inline)) void __writefsdword(const unsigned long Offset, const unsigned long Data)
{
__asm__("movl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
static __inline__ __attribute__((always_inline)) unsigned char __readfsbyte(const unsigned long Offset)
{
unsigned char value;
__asm__("movb %%fs:%a[Offset], %b[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
return value;
}
static __inline__ __attribute__((always_inline)) unsigned short __readfsword(const unsigned long Offset)
{
unsigned short value;
__asm__("movw %%fs:%a[Offset], %w[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
return value;
}
static __inline__ __attribute__((always_inline)) unsigned long __readfsdword(const unsigned long Offset)
{
unsigned long value;
__asm__("movl %%fs:%a[Offset], %k[value]" : [value] "=q" (value) : [Offset] "irm" (Offset));
return value;
}
static __inline__ __attribute__((always_inline)) void __incfsbyte(const unsigned long Offset)
{
__asm__("incb %%fs:%a[Offset]" : : [Offset] "ir" (Offset));
}
static __inline__ __attribute__((always_inline)) void __incfsword(const unsigned long Offset)
{
__asm__("incw %%fs:%a[Offset]" : : [Offset] "ir" (Offset));
}
static __inline__ __attribute__((always_inline)) void __incfsdword(const unsigned long Offset)
{
__asm__("incl %%fs:%a[Offset]" : : [Offset] "ir" (Offset));
}
/* NOTE: the bizarre implementation of __addfsxxx mimics the broken Visual C++ behavior */
static __inline__ __attribute__((always_inline)) void __addfsbyte(const unsigned long Offset, const unsigned char Data)
{
if(!__builtin_constant_p(Offset))
__asm__("addb %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset));
else
__asm__("addb %b[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
static __inline__ __attribute__((always_inline)) void __addfsword(const unsigned long Offset, const unsigned short Data)
{
if(!__builtin_constant_p(Offset))
__asm__("addw %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset));
else
__asm__("addw %w[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
static __inline__ __attribute__((always_inline)) void __addfsdword(const unsigned long Offset, const unsigned int Data)
{
if(!__builtin_constant_p(Offset))
__asm__("addl %k[Offset], %%fs:%a[Offset]" : : [Offset] "r" (Offset));
else
__asm__("addl %k[Data], %%fs:%a[Offset]" : : [Offset] "ir" (Offset), [Data] "iq" (Data));
}
/*** Bit manipulation ***/
static __inline__ __attribute__((always_inline)) unsigned char _BitScanForward(unsigned long * const Index, const unsigned long Mask)
{
__asm__("bsfl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
return Mask ? 1 : 0;
}
static __inline__ __attribute__((always_inline)) unsigned char _BitScanReverse(unsigned long * const Index, const unsigned long Mask)
{
__asm__("bsrl %[Mask], %[Index]" : [Index] "=r" (*Index) : [Mask] "mr" (Mask));
return Mask ? 1 : 0;
}
/* NOTE: again, the bizarre implementation follows Visual C++ */
static __inline__ __attribute__((always_inline)) unsigned char _bittest(const long * const a, const long b)
{
unsigned char retval;
if(__builtin_constant_p(b))
__asm__("bt %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*(a + (b / 32))), [b] "Ir" (b % 32));
else
__asm__("bt %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*a), [b] "r" (b));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _bittestandcomplement(long * const a, const long b)
{
unsigned char retval;
if(__builtin_constant_p(b))
__asm__("btc %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*(a + (b / 32))), [b] "Ir" (b % 32));
else
__asm__("btc %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*a), [b] "r" (b));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _bittestandreset(long * const a, const long b)
{
unsigned char retval;
if(__builtin_constant_p(b))
__asm__("btr %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*(a + (b / 32))), [b] "Ir" (b % 32));
else
__asm__("btr %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*a), [b] "r" (b));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _bittestandset(long * const a, const long b)
{
unsigned char retval;
if(__builtin_constant_p(b))
__asm__("bts %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*(a + (b / 32))), [b] "Ir" (b % 32));
else
__asm__("bts %[b], %[a]; setb %b[retval]" : [retval] "=q" (retval) : [a] "mr" (*a), [b] "r" (b));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _rotl8(const unsigned char value, const unsigned char shift)
{
unsigned char retval;
__asm__("rolb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned short _rotl16(const unsigned short value, const unsigned char shift)
{
unsigned short retval;
__asm__("rolw %b[shift], %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char value, const unsigned char shift)
{
unsigned char retval;
__asm__("rorb %b[shift], %b[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned short _rotr16(const unsigned short value, const unsigned char shift)
{
unsigned short retval;
__asm__("rorw %b[shift], %w[retval]" : [retval] "=rm" (retval) : "[retval]" (value), [shift] "Nc" (shift));
return retval;
}
/*
NOTE: in __ll_lshift, __ll_rshift and __ull_rshift we use the "A"
constraint (edx:eax) for the Mask argument, because it's the only way GCC
can pass 64-bit operands around - passing the two 32 bit parts separately
just confuses it. Also we declare Bit as an int and then truncate it to
match Visual C++ behavior
*/
static __inline__ __attribute__((always_inline)) unsigned long long __ll_lshift(const unsigned long long Mask, const int Bit)
{
unsigned long long retval = Mask;
__asm__
(
"shldl %b[Bit], %%eax, %%edx; sall %b[Bit], %%eax" :
"+A" (retval) :
[Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF)
);
return retval;
}
static __inline__ __attribute__((always_inline)) long long __ll_rshift(const long long Mask, const int Bit)
{
unsigned long long retval = Mask;
__asm__
(
"shldl %b[Bit], %%eax, %%edx; sarl %b[Bit], %%eax" :
"+A" (retval) :
[Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF)
);
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned long long __ull_rshift(const unsigned long long Mask, int Bit)
{
unsigned long long retval = Mask;
__asm__
(
"shrdl %b[Bit], %%eax, %%edx; shrl %b[Bit], %%eax" :
"+A" (retval) :
[Bit] "Nc" ((unsigned char)((unsigned long)Bit) & 0xFF)
);
return retval;
}
/*** 64-bit math ***/
static __inline__ __attribute__((always_inline)) long long __emul(const int a, const int b)
{
long long retval;
__asm__("imull %[b]" : "=A" (retval) : [a] "a" (a), [b] "rm" (b));
return retval;
}
static __inline__ __attribute__((always_inline)) unsigned long long __emulu(const unsigned int a, const unsigned int b)
{
unsigned long long retval;
__asm__("mull %[b]" : "=A" (retval) : [a] "a" (a), [b] "rm" (b));
return retval;
}
/*** Port I/O ***/
static __inline__ __attribute__((always_inline)) unsigned char __inbyte(const unsigned short Port)
{
unsigned char byte;
__asm__ __volatile__("inb %w[Port], %b[byte]" : [byte] "=a" (byte) : [Port] "Nd" (Port));
return byte;
}
static __inline__ __attribute__((always_inline)) unsigned short __inword(const unsigned short Port)
{
unsigned short word;
__asm__ __volatile__("inw %w[Port], %w[word]" : [word] "=a" (word) : [Port] "Nd" (Port));
return word;
}
static __inline__ __attribute__((always_inline)) unsigned long __indword(const unsigned short Port)
{
unsigned long dword;
__asm__ __volatile__("inl %w[Port], %k[dword]" : [dword] "=a" (dword) : [Port] "Nd" (Port));
return dword;
}
static __inline__ __attribute__((always_inline)) void __inbytestring(unsigned short Port, unsigned char * Buffer, unsigned long Count)
{
__asm__ __volatile__
(
"rep; insb" :
[Buffer] "=D" (Buffer), [Count] "=c" (Count) :
"d" (Port), "[Buffer]" (Buffer), "[Count]" (Count) :
"memory"
);
}
static __inline__ __attribute__((always_inline)) void __inwordstring(unsigned short Port, unsigned short * Buffer, unsigned long Count)
{
__asm__ __volatile__
(
"rep; insw" :
[Buffer] "=D" (Buffer), [Count] "=c" (Count) :
"d" (Port), "[Buffer]" (Buffer), "[Count]" (Count) :
"memory"
);
}
static __inline__ __attribute__((always_inline)) void __indwordstring(unsigned short Port, unsigned long * Buffer, unsigned long Count)
{
__asm__ __volatile__
(
"rep; insl" :
[Buffer] "=D" (Buffer), [Count] "=c" (Count) :
"d" (Port), "[Buffer]" (Buffer), "[Count]" (Count) :
"memory"
);
}
static __inline__ __attribute__((always_inline)) void __outbyte(unsigned short const Port, const unsigned char Data)
{
__asm__ __volatile__("outb %b[Data], %w[Port]" : : [Port] "Nd" (Port), [Data] "a" (Data));
}
static __inline__ __attribute__((always_inline)) void __outword(unsigned short const Port, const unsigned short Data)
{
__asm__ __volatile__("outw %w[Data], %w[Port]" : : [Port] "Nd" (Port), [Data] "a" (Data));
}
static __inline__ __attribute__((always_inline)) void __outdword(unsigned short const Port, const unsigned long Data)
{
__asm__ __volatile__("outl %k[Data], %w[Port]" : : [Port] "Nd" (Port), [Data] "a" (Data));
}
static __inline__ __attribute__((always_inline)) void __outbytestring(unsigned short const Port, const unsigned char * const Buffer, const unsigned long Count)
{
__asm__ __volatile__("rep; outsb" : : [Port] "d" (Port), [Buffer] "S" (Buffer), "c" (Count));
}
static __inline__ __attribute__((always_inline)) void __outwordstring(unsigned short const Port, const unsigned short * const Buffer, const unsigned long Count)
{
__asm__ __volatile__("rep; outsw" : : [Port] "d" (Port), [Buffer] "S" (Buffer), "c" (Count));
}
static __inline__ __attribute__((always_inline)) void __outdwordstring(unsigned short const Port, const unsigned long * const Buffer, const unsigned long Count)
{
__asm__ __volatile__("rep; outsl" : : [Port] "d" (Port), [Buffer] "S" (Buffer), "c" (Count));
}
/*** System information ***/
static __inline__ __attribute__((always_inline)) void __cpuid(int CPUInfo[], const int InfoType)
{
__asm__ __volatile__("cpuid" : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3]) : "a" (InfoType));
}
static __inline__ __attribute__((always_inline)) unsigned long long __rdtsc(void)
{
unsigned long long retval;
__asm__ __volatile__("rdtsc" : "=A"(retval));
return retval;
}
/*** Interrupts ***/
static __inline__ __attribute__((always_inline)) void __debugbreak(void)
{
__asm__("int $3");
}
static __inline__ __attribute__((always_inline)) void __int2c(void)
{
__asm__("int $0x2c");
}
static __inline__ __attribute__((always_inline)) void _disable(void)
{
__asm__("cli");
}
static __inline__ __attribute__((always_inline)) void _enable(void)
{
__asm__("sti");
}
/*** Protected memory management ***/
static __inline__ __attribute__((always_inline)) unsigned long __readcr0(void)
{
unsigned long value;
__asm__ __volatile__("mov %%cr0, %[value]" : [value] "=q" (value));
return value;
}
static __inline__ __attribute__((always_inline)) unsigned long __readcr2(void)
{
unsigned long value;
__asm__ __volatile__("mov %%cr2, %[value]" : [value] "=q" (value));
return value;
}
static __inline__ __attribute__((always_inline)) unsigned long __readcr3(void)
{
unsigned long value;
__asm__ __volatile__("mov %%cr3, %[value]" : [value] "=q" (value));
return value;
}
static __inline__ __attribute__((always_inline)) unsigned long __readcr4(void)
{
unsigned long value;
__asm__ __volatile__("mov %%cr4, %[value]" : [value] "=q" (value));
return value;
}
static __inline__ __attribute__((always_inline)) void __writecr0(const unsigned long long Data)
{
__asm__("mov %[Data], %%cr0" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory");
}
static __inline__ __attribute__((always_inline)) void __writecr3(const unsigned long long Data)
{
__asm__("mov %[Data], %%cr3" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory");
}
static __inline__ __attribute__((always_inline)) void __writecr4(const unsigned long long Data)
{
__asm__("mov %[Data], %%cr4" : : [Data] "q" ((const unsigned long)(Data & 0xFFFFFFFF)) : "memory");
}
static __inline__ __attribute__((always_inline)) void __invlpg(void * const Address)
{
__asm__("invlpg %[Address]" : : [Address] "m" (*((unsigned char *)(Address))));
}
/*** System operations ***/
static __inline__ __attribute__((always_inline)) unsigned long long __readmsr(const int reg)
{
unsigned long long retval;
__asm__ __volatile__("rdmsr" : "=A" (retval) : "c" (reg));
return retval;
}
static __inline__ __attribute__((always_inline)) void __writemsr(const unsigned long Register, const unsigned long long Value)
{
__asm__ __volatile__("wrmsr" : : "A" (Value), "c" (Register));
}
static __inline__ __attribute__((always_inline)) unsigned long long __readpmc(const int counter)
{
unsigned long long retval;
__asm__ __volatile__("rdpmc" : "=A" (retval) : "c" (counter));
return retval;
}
/* NOTE: an immediate value for 'a' will raise an ICE in Visual C++ */
static __inline__ __attribute__((always_inline)) unsigned long __segmentlimit(const unsigned long a)
{
unsigned long retval;
__asm__ __volatile__("lsl %[a], %[retval]" : [retval] "=r" (retval) : [a] "rm" (a));
return retval;
}
static __inline__ __attribute__((always_inline)) void __wbinvd(void)
{
__asm__ __volatile__("wbinvd");
}
#endif /* KJK_INTRIN_X86_H_ */
/* EOF */

View File

@ -2,17 +2,13 @@
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="debug"
Name="CodeGen_Debug"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
PreprocessorDefinitions="PCSX2_DEBUG"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
RuntimeLibrary="3"
/>
</VisualStudioPropertySheet>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="CodeGen_Devel"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="PCSX2_DEVEL"
RuntimeLibrary="2"
BufferSecurityCheck="false"
/>
</VisualStudioPropertySheet>

View File

@ -2,7 +2,7 @@
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="GlobalOptimizations"
Name="CodeGen_Release"
>
<Tool
Name="VCCLCompilerTool"
@ -11,9 +11,11 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
StringPooling="true"
MinimalRebuild="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
/>
<Tool

View File

@ -5,16 +5,12 @@
Name="w32pthreads"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SvnRootDir)\3rdparty&quot;"
PreprocessorDefinitions="PTW32_STATIC_LIB;WIN32_PTHREADS;__CLEANUP_SEH"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(SvnRootDir)\3rdparty\w32pthreads\include&quot;"
PreprocessorDefinitions="WIN32_PTHREADS;__CLEANUP_SEH"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="pthreads.lib Ws2_32.lib"
AdditionalDependencies="w32pthreads.lib"
/>
</VisualStudioPropertySheet>

View File

@ -467,11 +467,7 @@ static __forceinline BOOL ipuIDEC(u32 val)
return s_RoutineDone;
}
#ifdef _DEBUG
static int s_bdec = 0;
#else
#define s_bdec 0
#endif
static __forceinline BOOL ipuBDEC(u32 val)
{
@ -497,9 +493,8 @@ static __forceinline BOOL ipuBDEC(u32 val)
IPU_LOG(" Quantizer step=0x%X", bdec.QSC);
#ifdef _DEBUG
s_bdec++;
#endif
if( IsDebugBuild )
s_bdec++;
g_BP.BP += bdec.FB;//skip FB bits
g_decoder.coding_type = I_TYPE;

View File

@ -32,10 +32,6 @@
// Uncomment this to enable profiling of the GS RingBufferCopy function.
//#define PCSX2_GSRING_SAMPLING_STATS
#ifdef PCSX2_GSRING_TX_STATS
#include <intrin.h>
#endif
using namespace Threading;
using namespace std;
@ -178,7 +174,7 @@ mtgsThreadObject* mtgsThread = NULL;
std::list<uint> ringposStack;
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// debug variable used to check for bad code bits where copies are started
// but never closed, or closed without having been started. (GSRingBufCopy calls
// should always be followed by a call to GSRINGBUF_DONECOPY)
@ -756,24 +752,25 @@ void mtgsThreadObject::SendDataPacket()
jASSUME( temp <= m_RingBufferSize );
temp &= m_RingBufferMask;
#ifdef _DEBUG
if( m_packet_ringpos + m_packet_size < m_RingBufferSize )
if( IsDebugBuild )
{
uint readpos = volatize(m_RingPos);
if( readpos != m_WritePos )
if( m_packet_ringpos + m_packet_size < m_RingBufferSize )
{
// The writepos should never leapfrog the readpos
// since that indicates a bad write.
if( m_packet_ringpos < readpos )
assert( temp < readpos );
}
uint readpos = volatize(m_RingPos);
if( readpos != m_WritePos )
{
// The writepos should never leapfrog the readpos
// since that indicates a bad write.
if( m_packet_ringpos < readpos )
assert( temp < readpos );
}
// Updating the writepos should never make it equal the readpos, since
// that would stop the buffer prematurely (and indicates bad code in the
// ringbuffer manager)
assert( readpos != temp );
// Updating the writepos should never make it equal the readpos, since
// that would stop the buffer prematurely (and indicates bad code in the
// ringbuffer manager)
assert( readpos != temp );
}
}
#endif
AtomicExchange( m_WritePos, temp );

View File

@ -172,7 +172,7 @@ static const bool IsDevBuild = true;
static const bool IsDevBuild = false;
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static const bool IsDebugBuild = true;
#else
static const bool IsDebugBuild = false;

View File

@ -465,11 +465,6 @@ static void intExecute() {
for (;;) execI();
}
#ifdef _DEBUG
extern u32 psxdump;
extern void iDumpPsxRegisters(u32,u32);
#endif
static s32 intExecuteBlock( s32 eeCycles )
{
psxBreak = 0;

View File

@ -43,7 +43,7 @@ struct _VARG_PARAM
uint someval;
};
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
#define params va_arg_dummy,
#define varg_assert() // jASSUME( dummy == &va_arg_dummy );

View File

@ -224,7 +224,7 @@ using Console::Color_White;
# define DevMsg
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
# define DbgCon Console
#else
# define DbgCon 0&&Console

View File

@ -220,18 +220,11 @@ namespace VU0micro
{
int i;
#ifdef _DEBUG
int prevbranch;
#endif
for (i = 128; i--;) {
if ((VU0.VI[REG_VPU_STAT].UL & 0x1) == 0)
break;
#ifdef _DEBUG
prevbranch = vu0branch;
#endif
vu0Exec(&VU0);
}

View File

@ -32,7 +32,7 @@
VURegs* g_pVU1;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
u32 vudump = 0;
#endif

View File

@ -205,17 +205,11 @@ namespace VU1micro
static void intExecuteBlock()
{
int i;
#ifdef _DEBUG
int prevbranch;
#endif
for (i = 128; i--;) {
if ((VU0.VI[REG_VPU_STAT].UL & 0x100) == 0)
break;
#ifdef _DEBUG
prevbranch = vu1branch;
#endif
vu1Exec(&VU1);
}

View File

@ -340,7 +340,7 @@ static int VIFalign(u32 *data, vifCode *v, unsigned int size, const unsigned int
VURegs * VU;
u8 *cdata = (u8*)data;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
u32 memsize = VIFdmanum ? 0x4000 : 0x1000;
#endif
@ -375,7 +375,7 @@ static int VIFalign(u32 *data, vifCode *v, unsigned int size, const unsigned int
size <<= 2;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
memsize = size;
#endif
@ -455,7 +455,7 @@ static int VIFalign(u32 *data, vifCode *v, unsigned int size, const unsigned int
if (vif->cl != 0 || (size & 0xf)) //Check alignment for SSE unpacks
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static int s_count = 0;
#endif
@ -552,7 +552,7 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
u32 tempsize = 0;
const u32 memlimit = (VIFdmanum ? 0x4000 : 0x1000);
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
u32 memsize = memlimit;
#endif
@ -595,14 +595,14 @@ static void VIFunpack(u32 *data, vifCode *v, unsigned int size, const unsigned i
size <<= 2;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
memsize = size;
#endif
if (vifRegs->cycle.cl >= vifRegs->cycle.wl) // skipping write
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static int s_count = 0;
#endif
if (v->addr >= memlimit)

View File

@ -39,7 +39,7 @@ distribution.
#include <assert.h>
// Help out windows:
#if defined( _DEBUG ) && !defined( DEBUG )
#if defined( PCSX2_DEBUG ) && !defined( DEBUG )
#define DEBUG
#endif

View File

@ -22,7 +22,7 @@
Name="Debug|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;.\vsprops\debug.vsprops;.\vsprops\devbuild.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;.\vsprops\devbuild.vsprops;..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@ -54,7 +54,6 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""
ExceptionHandling="2"
SmallerTypeCheck="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="PrecompiledHeader.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
@ -99,8 +98,9 @@
</Configuration>
<Configuration
Name="Devel|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;.\vsprops\devbuild.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;.\vsprops\devbuild.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@ -131,19 +131,13 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG"
ExceptionHandling="2"
SmallerTypeCheck="false"
BufferSecurityCheck="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="PrecompiledHeader.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="2"
/>
<Tool
@ -185,8 +179,9 @@
</Configuration>
<Configuration
Name="Release|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets=".\vsprops\common.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@ -217,12 +212,9 @@
/>
<Tool
Name="VCCLCompilerTool"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="NDEBUG"
ExceptionHandling="2"
SmallerTypeCheck="false"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="0"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="PrecompiledHeader.h"
@ -1748,7 +1740,6 @@
>
<Tool
Name="VCCLCompilerTool"
RuntimeLibrary="0"
AssemblerOutput="4"
/>
</FileConfiguration>

View File

@ -171,7 +171,7 @@ void WinClose()
ReleasePlugins();
Console::Close();
pthread_win32_process_detach_np();
//pthread_win32_process_detach_np();
SysShutdownDynarecs();
SysShutdownMem();
@ -254,7 +254,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
pInstance=hInstance;
FirstShow=true; // this is used by cheats.cpp to search for stuff (broken?)
pthread_win32_process_attach_np();
//pthread_win32_process_attach_np();
gApp.hInstance = hInstance;
gApp.hMenu = NULL;

View File

@ -52,7 +52,7 @@ namespace Threading
LogicalCoresPerPhysicalCPU = CPUs;
cpuinfo.PhysicalCores = ( CPUs / LogicalCoresPerPhysicalCPU ) * PhysicalCoresPerPhysicalCPU;
ptw32_smp_system = ( cpuinfo.LogicalCores > 1 ) ? TRUE : FALSE;
//ptw32_smp_system = ( cpuinfo.LogicalCores > 1 ) ? TRUE : FALSE;
}
__forceinline void Timeslice()
@ -76,13 +76,13 @@ namespace Threading
{
jASSUME( itsme != NULL );
pthread_win32_thread_attach_np();
//pthread_win32_thread_attach_np();
Thread& owner = *((Thread*)itsme);
owner.m_returncode = owner.Callback();
owner.m_terminated = true;
pthread_win32_thread_detach_np();
//pthread_win32_thread_detach_np();
return NULL;
}
@ -97,14 +97,13 @@ namespace Threading
__forceinline long pcsx2_InterlockedExchange( volatile long* target, long srcval )
{
// Use the pthreads-win32 implementation...
return ptw32_InterlockedExchange( target, srcval );
return _InterlockedExchange( target, srcval );
}
__forceinline long pcsx2_InterlockedCompareExchange( volatile long* target, long srcval, long comp )
{
// Use the pthreads-win32 implementation...
return ptw32_InterlockedCompareExchange( target, srcval, comp );
return _InterlockedCompareExchange( target, srcval, comp );
}
__forceinline long pcsx2_InterlockedExchangeAdd( volatile long* target, long srcval )

View File

@ -26,7 +26,7 @@ SuperVUExecuteProgram:
mov s_vu1esi, esi
mov s_vuedi, edi
mov s_vuebx, ebx
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
mov s_vu1esp, esp
#endif
@ -44,7 +44,7 @@ SuperVUEndProgram:
mov edi, s_vuedi
mov ebx, s_vuebx
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
sub s_vu1esp, esp
#endif

View File

@ -78,7 +78,7 @@ MEMCPY_AMD.CPP
#if defined(_MSC_VER)
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
extern u8 g_globalMMXSaved;
void checkregs()

View File

@ -36,10 +36,6 @@ u32 g_cpuRegHasSignExt = 0, g_cpuPrevRegHasSignExt = 0; // set if upper 32 bits
// use FreezeMMXRegs, FreezeXMMRegs
u32 g_recWriteback = 0;
#ifdef _DEBUG
char g_globalXMMLocked = 0;
#endif
_xmmregs xmmregs[iREGCNT_XMM], s_saveXMMregs[iREGCNT_XMM];
// X86 caching

View File

@ -292,10 +292,6 @@ extern _xmmregs xmmregs[iREGCNT_XMM], s_saveXMMregs[iREGCNT_XMM];
extern u16 g_x86AllocCounter;
extern u16 g_xmmAllocCounter;
#ifdef _DEBUG
extern char g_globalXMMLocked;
#endif
// allocates only if later insts use XMM, otherwise checks
int _allocCheckGPRtoXMM(EEINST* pinst, int gprreg, int mode);
int _allocCheckFPUtoXMM(EEINST* pinst, int fpureg, int mode);

View File

@ -133,11 +133,7 @@ void rpsxpropBSC(EEINST* prev, EEINST* pinst);
static void iopClearRecLUT(BASEBLOCK* base, int count);
#ifdef _DEBUG
u32 psxdump = 0;
#else
#define psxdump 0
#endif
static u32 psxdump = 0;
#define PSX_GETBLOCK(x) PC_GETBLOCK_(x, psxRecLUT)
@ -146,10 +142,11 @@ u32 psxdump = 0;
psxRecClearMem(mem) : 4)
////////////////////////////////////////////////////
#ifdef _DEBUG
using namespace R3000A;
static void iIopDumpBlock( int startpc, u8 * ptr )
{
#ifdef PCSX2_DEBUG
FILE *f;
#ifdef __LINUX__
char command[256];
@ -222,8 +219,8 @@ static void iIopDumpBlock( int startpc, u8 * ptr )
system(command);
f = fopen( filename.c_str(), "a+" );
#endif
}
#endif
}
u8 _psxLoadWritesRs(u32 tempcode)
{
@ -307,19 +304,9 @@ void _psxFlushConstRegs()
MOV32ItoM((uptr)&psxRegs.GPR.r[i], g_psxConstRegs[i]);
g_psxFlushedConstReg |= 1<<i;
}
#if defined(_DEBUG)&&0
else {
// make sure the const regs are the same
u8* ptemp;
CMP32ItoM((uptr)&psxRegs.GPR.r[i], g_psxConstRegs[i]);
ptemp = JE8(0);
CALLFunc((uptr)checkconstreg);
x86SetJ8( ptemp );
}
#else
if( g_psxHasConstReg == g_psxFlushedConstReg )
break;
#endif
}
}
}
@ -448,12 +435,13 @@ void psxRecompileCodeConst1(R3000AFNPTR constcode, R3000AFNPTR_INFO noconstcode)
if ( ! _Rt_ ) {
if( (psxRegs.code>>26) == 9 ) {
//ADDIU, call bios
#ifdef _DEBUG
MOV32ItoM( (uptr)&psxRegs.code, psxRegs.code );
MOV32ItoM( (uptr)&psxRegs.pc, psxpc );
_psxFlushCall(FLUSH_NODESTROY);
CALLFunc((uptr)zeroEx);
#endif
if( IsDebugBuild )
{
MOV32ItoM( (uptr)&psxRegs.code, psxRegs.code );
MOV32ItoM( (uptr)&psxRegs.pc, psxpc );
_psxFlushCall(FLUSH_NODESTROY);
CALLFunc((uptr)zeroEx);
}
// Bios Call: Force the IOP to do a Branch Test ASAP.
// Important! This helps prevent game freeze-ups during boot-up and stage loads.
// Note: Fixes to cdvd have removed the need for this code.
@ -892,23 +880,13 @@ void psxRecompileNextInstruction(int delayslot)
// pblock isn't used elsewhere in this function.
BASEBLOCK* pblock = PSX_GETBLOCK(psxpc);
#ifdef _DEBUG
MOV32ItoR(EAX, psxpc);
#endif
if( IsDebugBuild )
MOV32ItoR(EAX, psxpc);
psxRegs.code = iopMemRead32( psxpc );
s_psxBlockCycles++;
psxpc += 4;
//#ifdef _DEBUG
// CMP32ItoM((uptr)s_pCode, psxRegs.code);
// j8Ptr[0] = JE8(0);
// MOV32ItoR(EAX, psxpc);
// CALLFunc((uptr)checkcodefn);
// x86SetJ8( j8Ptr[ 0 ] );
//#endif
g_pCurInstInfo++;
g_iopCyclePenalty = 0;
@ -926,9 +904,9 @@ void psxRecompileNextInstruction(int delayslot)
_clearNeededX86regs();
}
#ifdef _DEBUG
static void printfn()
{
#ifdef PCSX2_DEBUG
extern void iDumpPsxRegisters(u32 startpc, u32 temp);
static int lastrec = 0;
@ -948,8 +926,8 @@ static void printfn()
lastrec = g_psxlastpc;
}
}
#endif
}
void iopRecRecompile(u32 startpc)
{
@ -957,12 +935,11 @@ void iopRecRecompile(u32 startpc)
u32 branchTo;
u32 willbranch3 = 0;
#ifdef _DEBUG
extern void iDumpPsxRegisters(u32 startpc, u32 temp);
if( psxdump & 4 )
if( IsDebugBuild && (psxdump & 4) )
{
extern void iDumpPsxRegisters(u32 startpc, u32 temp);
iDumpPsxRegisters(startpc, 0);
#endif
}
assert( startpc );
@ -994,11 +971,11 @@ void iopRecRecompile(u32 startpc)
_initX86regs();
#ifdef _DEBUG
// for debugging purposes
MOV32ItoM((uptr)&g_psxlastpc, psxpc);
CALLFunc((uptr)printfn);
#endif
if( IsDebugBuild )
{
MOV32ItoM((uptr)&g_psxlastpc, psxpc);
CALLFunc((uptr)printfn);
}
// go until the next branch
i = startpc;
@ -1082,27 +1059,26 @@ StartRecomp:
}
}
#ifdef _DEBUG
// dump code
for(i = 0; i < ArraySize(s_psxrecblocks); ++i) {
if( IsDebugBuild )
{
for(i = 0; i < ArraySize(s_psxrecblocks); ++i) {
if( startpc == s_psxrecblocks[i] ) {
iIopDumpBlock(startpc, recPtr);
}
}
}
if( (psxdump & 1) )
iIopDumpBlock(startpc, recPtr);
#endif
if( (psxdump & 1) )
iIopDumpBlock(startpc, recPtr);
}
g_pCurInstInfo = s_pInstCache;
while (!psxbranch && psxpc < s_nEndBlock) {
psxRecompileNextInstruction(0);
}
#ifdef _DEBUG
if( (psxdump & 1) )
if( IsDebugBuild && (psxdump & 1) )
iIopDumpBlock(startpc, recPtr);
#endif
assert( (psxpc-startpc)>>2 <= 0xffff );
s_pCurBlockEx->size = (psxpc-startpc)>>2;

View File

@ -80,7 +80,7 @@ void VUtestPause() {
void VUtestPause() {}
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
extern u32 vudump;
#endif

View File

@ -103,7 +103,7 @@ static EEINST* s_psaveInstInfo = NULL;
static u32 s_savenBlockCycles = 0;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static u32 dumplog = 0;
#else
#define dumplog 0
@ -1024,10 +1024,6 @@ static u32 eeScaleBlockCycles()
// setting "branch = 2";
static void iBranchTest(u32 newpc, bool noDispatch)
{
#ifdef _DEBUG
//CALLFunc((uptr)testfpu);
#endif
if( bExecBIOS ) CheckForBIOSEnd();
// Check the Event scheduler if our "cycle target" has been reached.
@ -1089,7 +1085,7 @@ void recompileNextInstruction(int delayslot)
pc += 4;
#if 0
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
CMP32ItoM((u32)s_pCode, cpuRegs.code);
j8Ptr[0] = JE8(0);
MOV32ItoR(EAX, pc);
@ -1188,8 +1184,6 @@ void recompileNextInstruction(int delayslot)
s_nEndBlock = pc;
}
extern u32 psxdump;
static void printfn()
{
static int lastrec = 0;
@ -1241,7 +1235,7 @@ void recRecompile( const u32 startpc )
u32 willbranch3 = 0;
u32 usecop2;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
//dumplog |= 4;
if( dumplog & 4 )
iDumpRegisters(startpc, 0);
@ -1293,7 +1287,7 @@ void recRecompile( const u32 startpc )
_initXMMregs();
_initMMXregs();
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// for debugging purposes
MOV32ItoM((uptr)&g_lastpc, pc);
CALLFunc((uptr)printfn);
@ -1478,7 +1472,7 @@ StartRecomp:
}
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// dump code
for(i = 0; i < ArraySize(s_recblocks); ++i) {
if( startpc == s_recblocks[i] ) {
@ -1571,7 +1565,7 @@ StartRecomp:
recompileNextInstruction(0); // For the love of recursion, batman!
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( (dumplog & 1) )
iDumpBlock(startpc, recPtr);
#endif

View File

@ -130,7 +130,7 @@ void recTransferX86ToReg(int x86reg, int gprreg, int sign)
}
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
void testaddrs()
{
register int tempaddr;
@ -231,7 +231,7 @@ int recSetMemLocation(int regs, int imm, int mmreg, int msize, int j32)
if ( imm != 0 ) ADD32ItoR( ECX, imm );
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
//CALLFunc((uptr)testaddrs);
#endif
@ -256,7 +256,7 @@ int recSetMemLocation(int regs, int imm, int mmreg, int msize, int j32)
x86SetJ8(ptr);
if( msize == 1 ) AND8ItoR(ECX, 0xf8);
else if( msize == 2 ) AND8ItoR(ECX, 0xf0);
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
MOV32RtoR(EAX, ECX);
SHR32ItoR(EAX, 28);
CMP32ItoR(EAX, 1);

View File

@ -57,7 +57,7 @@ extern void iDumpVU1Registers();
#define SUPERVU_PROPAGATEFLAGS // the correct behavior of VUs, for some reason superman breaks gfx with it on...
// registers won't be flushed at block boundaries (faster) (nothing noticable speed-wise, causes SPS in Ratchet and clank (Nneeve) )
#ifndef _DEBUG
#ifndef PCSX2_DEBUG
//#define SUPERVU_INTERCACHING
#endif
@ -104,7 +104,7 @@ extern void (*recVU_LOWER_OPCODE[128])(VURegs* VU, s32 info);
//#define FORIT(it, v) for(it = (v).begin(); it != (v).end(); ++(it))
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
u32 s_vucount = 0;
static u32 g_vu1lastrec = 0, skipparent = -1;
@ -429,7 +429,7 @@ void SuperVUDestroy(int vuindex)
// reset VU
void SuperVUReset(int vuindex)
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
s_vucount = 0;
#endif
@ -722,16 +722,6 @@ void* SuperVUGetProgram(u32 startpc, int vuindex)
if (*pheader == NULL)
{
#ifdef _DEBUG
// if( vuindex ) VU1.VI[REG_TPC].UL = startpc;
// else VU0.VI[REG_TPC].UL = startpc;
// __Log("VU: %x\n", startpc);
// iDumpVU1Registers();
// vudump |= 2;
#endif
// measure run time
//QueryPerformanceCounter(&svubase);
#ifdef SUPERVU_CACHING
void* pmem = (vuindex & 1) ? VU1.Micro : VU0.Micro;
@ -764,9 +754,6 @@ void* SuperVUGetProgram(u32 startpc, int vuindex)
return (void*)SuperVUEndProgram;
}
//QueryPerformanceCounter(&svufinal);
//svutime += (u32)(svufinal.QuadPart-svubase.QuadPart);
assert((*pheader)->pprogfunc != NULL);
}
//else assert( (*pheader)->IsSame((vuindex&1) ? VU1.Micro : VU0.Micro) );
@ -906,7 +893,7 @@ static VuFunctionHeader* SuperVURecompileProgram(u32 startpc, int vuindex)
SuperVUEliminateDeadCode();
SuperVUAssignRegs();
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if ((s_vu && (vudump&1)) || (!s_vu && (vudump&16))) SuperVUDumpBlock(s_listBlocks, s_vu);
#endif
@ -934,7 +921,7 @@ static VuFunctionHeader* SuperVURecompileProgram(u32 startpc, int vuindex)
s_pFnHeader->ranges.push_back(r);
}
#if defined(_DEBUG) && defined(__LINUX__)
#if defined(PCSX2_DEBUG) && defined(__LINUX__)
// dump at the end to capture the actual code
if ((s_vu && (vudump&1)) || (!s_vu && (vudump&16))) SuperVUDumpBlock(s_listBlocks, s_vu);
#endif
@ -1855,7 +1842,7 @@ static void SuperVUEliminateDeadCode()
for(itblock = s_listBlocks.begin(); itblock != s_listBlocks.end(); itblock++)
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
u32 startpc = (*itblock)->startpc;
u32 curpc = startpc;
#endif
@ -1965,8 +1952,8 @@ static void SuperVUEliminateDeadCode()
continue;
}
}
#ifdef _DEBUG
else
#ifdef PCSX2_DEBUG
else
{
curpc += 8;
}
@ -2601,7 +2588,7 @@ __declspec(naked) void SuperVUExecuteProgram(u32 startpc, int vuindex)
mov s_vuedi, edi // have to save even in Release
mov s_vuebx, ebx
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
__asm
{
mov s_vu1esp, esp
@ -2635,7 +2622,7 @@ __declspec(naked) static void SuperVUEndProgram()
mov ebx, s_vuebx
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
__asm
{
sub s_vu1esp, esp
@ -2820,7 +2807,7 @@ void svudispfntemp()
{
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static u32 i;
if (((vudump&8) && g_curdebugvu) || ((vudump&0x80) && !g_curdebugvu)) //&& g_vu1lastrec != g_vu1last ) {
@ -2938,7 +2925,7 @@ void VuBaseBlock::Recompile()
x86Align(16);
pcode = x86Ptr;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
MOV32ItoM((uptr)&s_vufnheader, s_pFnHeader->startpc);
MOV32ItoM((uptr)&VU->VI[REG_TPC], startpc);
MOV32ItoM((uptr)&s_svulast, startpc);
@ -3593,9 +3580,8 @@ void VuInstruction::Recompile(list<VuInstruction>::iterator& itinst, u32 vuxyz)
s_pCurBlock->prevFlagsOutOfBlock = 0;
#ifdef _DEBUG
MOV32ItoR(EAX, pc);
#endif
if( IsDebugBuild )
MOV32ItoR(EAX, pc);
assert(!(type & (INST_CLIP_WRITE | INST_STATUS_WRITE | INST_MAC_WRITE)));
pc += 8;

View File

@ -77,6 +77,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Include", "Include", "{0FADC26C-0E9D-4DD7-84B1-BF4F7754E90C}"
ProjectSection(SolutionItems) = preProject
common\include\afxresmw.h = common\include\afxresmw.h
common\include\intrin_x86.h = common\include\intrin_x86.h
common\include\PS2Edefs.h = common\include\PS2Edefs.h
common\include\PS2Etypes.h = common\include\PS2Etypes.h
EndProjectSection

View File

@ -47,7 +47,7 @@ char *methods[] =
NULL
};
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
char *LibName = "Linuz Iso CDVD (Debug) ";
#else
char *LibName = "Linuz Iso CDVD ";
@ -95,7 +95,7 @@ EXPORT_C_(u32) PS2EgetLibVersion2(u32 type)
return (version << 16) | (revision << 8) | build;
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
void __Log(char *fmt, ...)
{
va_list list;
@ -113,7 +113,7 @@ void __Log(char *fmt, ...)
EXPORT_C_(s32) CDVDinit()
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
cdvdLog = fopen("logs/cdvdLog.txt", "w");
if (cdvdLog == NULL)
{

View File

@ -4,9 +4,8 @@
Version="9.00"
Name="CDVDiso"
ProjectGUID="{5F78E90B-BD22-47B1-9CA5-7A80F4DF5EF3}"
RootNamespace="CDVDiso_vs2008"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
RootNamespace="CDVDiso"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
@ -19,7 +18,9 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
@ -40,15 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_USRDLL;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
BrowseInformation="1"
WarningLevel="3"
DebugInformationFormat="4"
CompileAs="0"
/>
<Tool
@ -64,8 +57,8 @@
Name="VCLinkerTool"
AdditionalDependencies="bzip2.lib zlib.lib"
OutputFile="$(OutDir)\$(ProjectName)-dbg.dll"
GenerateManifest="false"
ModuleDefinitionFile=".\CDVDiso.def"
GenerateDebugInformation="true"
TargetMachine="1"
/>
<Tool
@ -94,7 +87,9 @@
Name="Release|Win32"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -115,21 +110,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="NDEBUG;_USRDLL"
StringPooling="true"
MinimalRebuild="false"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="false"
PreprocessorDefinitions="NDEBUG"
UsePrecompiledHeader="0"
BrowseInformation="1"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -144,11 +126,8 @@
Name="VCLinkerTool"
AdditionalDependencies="bzip2.lib zlib.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
GenerateManifest="false"
ModuleDefinitionFile=".\CDVDiso.def"
GenerateDebugInformation="true"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
@ -176,7 +155,9 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -197,20 +178,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="false"
PreprocessorDefinitions="NDEBUG;_USRDLL"
StringPooling="true"
MinimalRebuild="false"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="false"
PreprocessorDefinitions="NDEBUG"
UsePrecompiledHeader="0"
BrowseInformation="1"
WarningLevel="3"
DebugInformationFormat="3"
/>

View File

@ -23,11 +23,8 @@
#include <windows.h>
#endif
extern "C"
{
#define CDVDdefs
#include "PS2Edefs.h"
}
#ifdef __LINUX__
#include <gtk/gtk.h>

View File

@ -18,7 +18,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -43,12 +43,8 @@
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
PreprocessorDefinitions="NDEBUG;_USRDLL;CDVDNULL_EXPORTS;"
StringPooling="true"
RuntimeLibrary="0"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -23,7 +23,7 @@
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\debug.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
>
<Tool
@ -87,7 +87,7 @@
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\release.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -152,7 +152,7 @@
Name="Debug SSE2|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\debug.vsprops;.\vsprops\sse2.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
>
<Tool
@ -216,7 +216,7 @@
Name="Release SSE2|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\release.vsprops;.\vsprops\sse2.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -281,7 +281,7 @@
Name="Release SSSE3|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\release.vsprops;.\vsprops\sse2.vsprops;.\vsprops\ssse3.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -346,7 +346,7 @@
Name="Debug SSSE3|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\debug.vsprops;.\vsprops\sse2.vsprops;.\vsprops\ssse3.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
>
<Tool
@ -411,7 +411,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\debug.vsprops;.\vsprops\sse2.vsprops;.\vsprops\sse4.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
>
<Tool
@ -475,7 +475,7 @@
Name="Release SSE4|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\vsprops\common.vsprops;.\vsprops\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;.\vsprops\release.vsprops;.\vsprops\sse2.vsprops;.\vsprops\sse4.vsprops"
UseOfMFC="1"
UseOfMFC="2"
CharacterSet="2"
WholeProgramOptimization="1"
>

View File

@ -10,7 +10,7 @@
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="1"
RuntimeLibrary="1"
RuntimeLibrary="3"
/>
<Tool
Name="VCLinkerTool"

View File

@ -14,6 +14,7 @@
WholeProgramOptimization="true"
PreprocessorDefinitions="NDEBUG"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
/>
<Tool

View File

@ -21,15 +21,8 @@
#include <stdio.h>
#ifdef __cplusplus
extern "C"
{
#endif
#define FWdefs
#include "PS2Edefs.h"
#ifdef __cplusplus
}
#endif
#ifdef _WIN32

View File

@ -39,9 +39,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
/>
<Tool
@ -84,7 +81,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -105,10 +102,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
OmitFramePointers="true"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
/>
<Tool

File diff suppressed because it is too large Load Diff

View File

@ -10,7 +10,7 @@
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="1"
RuntimeLibrary="1"
RuntimeLibrary="3"
/>
<Tool
Name="VCLinkerTool"

View File

@ -14,6 +14,7 @@
WholeProgramOptimization="true"
PreprocessorDefinitions="NDEBUG;_SECURE_SCL=0"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
/>
<Tool

View File

@ -84,7 +84,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>

View File

@ -18,7 +18,7 @@
#include "svnrev.h"
#include "resource.h"
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
#include "crtdbg.h"
#endif
@ -577,7 +577,7 @@ u32 CALLBACK PS2EgetLibVersion2(u32 type) {
// Used in about and config screens.
void GetNameAndVersionString(wchar_t *out) {
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
wsprintfW(out, L"LilyPad Debug %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
#elif (_MSC_VER != 1400)
wsprintfW(out, L"LilyPad svn %i.%i.%i (r%i)", (VERSION>>8)&0xFF, VERSION&0xFF, (VERSION>>24)&0xFF, SVN_REV);
@ -587,7 +587,7 @@ void GetNameAndVersionString(wchar_t *out) {
}
char* CALLBACK PSEgetLibName() {
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
static char version[50];
sprintf(version, "LilyPad Debug (r%i)", SVN_REV);
return version;
@ -680,7 +680,7 @@ s32 CALLBACK PADinit(u32 flags) {
return PADinit(2);
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
int tmpFlag = _CrtSetDbgFlag( _CRTDBG_REPORT_FLAG );
tmpFlag |= _CRTDBG_LEAK_CHECK_DF;
_CrtSetDbgFlag( tmpFlag );

View File

@ -21,7 +21,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops"
UseOfMFC="0"
CharacterSet="2"
>
@ -49,14 +49,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_USRDLL;TEST_EXPORTS"
MinimalRebuild="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
PreprocessorDefinitions="_USRDLL;TEST_EXPORTS"
DisableSpecificWarnings="4995, 4996"
/>
<Tool
@ -110,7 +103,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\common\vsprops\BaseProperties.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
@ -137,20 +130,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="NDEBUG;_USRDLL;TEST_EXPORTS"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
WarningLevel="3"
SuppressStartupBanner="true"
CallingConvention="1"
DisableSpecificWarnings="4995, 4996"
/>

View File

@ -84,7 +84,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>

View File

@ -21,11 +21,8 @@
#include <stdio.h>
extern "C"
{
#define USBdefs
#include "PS2Edefs.h"
}
#ifdef _WIN32

View File

@ -39,9 +39,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
/>
<Tool
@ -84,7 +81,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -105,10 +102,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
OmitFramePointers="true"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
/>
<Tool

View File

@ -29,11 +29,8 @@
#include <commctrl.h>
#endif
extern "C"
{
#define DEV9defs
#include "PS2Edefs.h"
}
typedef struct {
int Log;

View File

@ -86,7 +86,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -107,10 +107,6 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
OmitFramePointers="true"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
/>
<Tool

View File

@ -74,7 +74,7 @@ extern void SysMessage(const char *fmt, ...);
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
# define DbgCon Console
static const bool IsDebugBuild = true;

View File

@ -68,9 +68,9 @@ static void InitLibraryName()
// subversion revision tags:
strcpy( libraryName, "SPU2-X"
#ifdef _DEBUG_FAST
#ifdef DEBUG_FAST
"-Debug"
#elif defined( DEBUG )
#elif defined( PCSX2_DEBUG )
"-Debug/Strict" // strict debugging is slow!
#else
"-Dev"
@ -83,9 +83,9 @@ static void InitLibraryName()
// to label the specific revision:
sprintf_s( libraryName, "SPU2-X r%d%s"
#ifdef _DEBUG_FAST
#ifdef DEBUG_FAST
"-Debug"
#elif defined( _DEBUG )
#elif defined( PCSX2_DEBUG )
"-Debug/Strict" // strict debugging is slow!
#else
"-Dev"

View File

@ -503,7 +503,7 @@ static __forceinline StereoOut32 ReadInputPV( uint core )
static __forceinline void spu2M_WriteFast( u32 addr, s16 value )
{
// throw an assertion if the memory range is invalid:
#ifndef _DEBUG_FAST
#ifndef DEBUG_FAST
jASSUME( addr < SPU2_DYN_MEMLINE );
#endif
*GetMemPtr( addr ) = value;

View File

@ -219,4 +219,7 @@ EXPORT_C_(s32) SPU2freeze(int mode, freezeData *data)
jNO_DEFAULT;
}
// technically unreachable, but kills a warning:
return 0;
}

View File

@ -91,7 +91,7 @@ extern void SysMessage(const char *fmt, ...);
__forceinline s16 * __fastcall GetMemPtr(u32 addr)
{
#ifndef _DEBUG_FAST
#ifndef DEBUG_FAST
// In case you're wondering, this assert is the reason SPU2-X
// runs so incrediously slow in Debug mode. :P
jASSUME( addr < 0x100000 );

View File

@ -7,7 +7,8 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxresmw.h"
#include "afxresmw.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@ -270,11 +271,6 @@ VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,1,0
PRODUCTVERSION 1,1,1,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L

View File

@ -18,7 +18,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
@ -47,22 +47,12 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="SPU2X_DEVBUILD;FLOAT_SAMPLES;NDEBUG;_USRDLL"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
UsePrecompiledHeader="0"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
CompileAs="0"
/>
<Tool
@ -112,7 +102,7 @@
<Configuration
Name="DebugStrict|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
@ -140,10 +130,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="SPU2X_DEVBUILD;FLOAT_SAMPLES;_DEBUG;_USRDLL"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PreprocessorDefinitions="SPU2X_DEVBUILD;FLOAT_SAMPLES;_USRDLL"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=".\Debug/spu2-x.pch"
/>
@ -193,7 +180,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
@ -221,22 +208,11 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="FLOAT_SAMPLES;NDEBUG;_USRDLL"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=""
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="false"
CompileAs="0"
/>
<Tool
@ -288,7 +264,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
@ -316,17 +292,9 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="SPU2X_DEVBUILD;FLOAT_SAMPLES;_DEBUG_FAST;_DEBUG;_USRDLL"
MinimalRebuild="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableFunctionLevelLinking="true"
PreprocessorDefinitions="SPU2X_DEVBUILD;FLOAT_SAMPLES;DEBUG_FAST;_USRDLL"
UsePrecompiledHeader="0"
SuppressStartupBanner="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"

View File

@ -10,7 +10,7 @@
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="1"
RuntimeLibrary="1"
RuntimeLibrary="3"
/>
<Tool
Name="VCLinkerTool"

View File

@ -14,6 +14,7 @@
WholeProgramOptimization="true"
PreprocessorDefinitions="NDEBUG"
StringPooling="true"
RuntimeLibrary="2"
BufferSecurityCheck="false"
/>
<Tool

View File

@ -22,11 +22,8 @@
#include <stdio.h>
#include <malloc.h>
// need C definitions
extern "C" {
#define GSdefs
#include "PS2Edefs.h"
}
#ifdef _WIN32

View File

@ -46,7 +46,7 @@ using namespace std;
#pragma warning(disable:4244)
#endif
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
HANDLE g_hCurrentThread = NULL;
#endif
@ -73,7 +73,7 @@ unsigned char revision = 0; // revision and build gives plugin version
unsigned char build = VER;
unsigned char minor = 1;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
char *libraryName = "ZeroGS (Debug) ";
#elif defined(RELEASE_TO_PUBLIC)
@ -354,7 +354,7 @@ s32 CALLBACK GSopen(void *pDsp, char *Title, int multithread) {
GS_LOG("GSopen\n");
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
g_hCurrentThread = GetCurrentThread();
#endif
@ -760,7 +760,7 @@ void CALLBACK GSgetLastTag(u64* ptag)
void _GSgifTransfer(pathInfo *path, u32 *pMem, u32 size)
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
assert( g_hCurrentThread == GetCurrentThread() );
#endif
@ -964,7 +964,7 @@ void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr)
addr &= 0x3fff;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
PRIM_LOG("count: %d\n", count);
count++;
#endif

View File

@ -77,7 +77,7 @@ u32 s_uTex1Data[2][2] = {0}, s_uClampData[2] = {0};
void __fastcall GIFPackedRegHandlerNull(u32* data)
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
DEBUG_LOG("Unexpected packed reg handler %8.8lx_%8.8lx %x\n", data[0], data[1], data[2]);
#endif
}
@ -367,7 +367,7 @@ __forceinline void clampWrite(int i, u32 *data)
void __fastcall GIFRegHandlerNull(u32* data)
{
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( (((uptr)&data[2])&0xffff) == 0 )
return;

View File

@ -18,7 +18,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@ -47,18 +47,9 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
AdditionalIncludeDirectories="..\x86\;..\..\ZeroGSShaders\"
PreprocessorDefinitions="NDEBUG;_USRDLL;__i386__;ZEROGS_DEVBUILD;ZEROGS_SSE2"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
PrecompiledHeaderFile=".\Release/GSsoftdx.pch"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
@ -107,7 +98,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -127,13 +118,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="..\x86\;..\..\ZeroGSShaders\"
PreprocessorDefinitions="D3D_DEBUG_INFO;_USRDLL;_DEBUG;__i386__;ZEROGS_DEVBUILD;ZEROGS_SSE2;"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="true"
PreprocessorDefinitions="D3D_DEBUG_INFO;_USRDLL;__i386__;ZEROGS_DEVBUILD;ZEROGS_SSE2"
DebugInformationFormat="4"
/>
<Tool
@ -179,7 +165,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
@ -208,19 +194,9 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\x86\;..\..\ZeroGSShaders\"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;__i386__;RELEASE_TO_PUBLIC;ZEROGS_SSE2"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
PrecompiledHeaderFile=""
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool

View File

@ -75,10 +75,10 @@ MEMCPY_AMD.CPP
#include <windows.h>
#endif
extern "C" {
#include "PS2Etypes.h"
extern "C" {
#if defined(_MSC_VER) && !defined(__x86_64__)
void * memcpy_amd(void *dest, const void *src, size_t n)

View File

@ -268,7 +268,7 @@ void ZeroGS::CRenderTarget::Resolve()
D3DLOCKED_RECT locksrc;
pd3dDevice->GetRenderTargetData(psurf, psys);
#if !defined(RELEASE_TO_PUBLIC) && defined(_DEBUG)
#if !defined(RELEASE_TO_PUBLIC) && defined(PCSX2_DEBUG)
if( g_bSaveResolved ) {
D3DXSaveSurfaceToFile("resolved.tga", D3DXIFF_TGA, psys, NULL, NULL);
g_bSaveResolved = 0;
@ -293,7 +293,7 @@ void ZeroGS::CRenderTarget::Resolve(int startrange, int endrange)
if( vb[0].prndr == this || vb[0].pdepth == this ) Flush(0);
if( vb[1].prndr == this || vb[1].pdepth == this ) Flush(1);
#if !defined(RELEASE_TO_PUBLIC) && defined(_DEBUG)
#if !defined(RELEASE_TO_PUBLIC) && defined(PCSX2_DEBUG)
if( g_bSaveResolved ) {
D3DXSaveSurfaceToFile("resolved.tga", D3DXIFF_TGA, psys, NULL, NULL);
g_bSaveResolved = 0;
@ -589,7 +589,7 @@ void ZeroGS::CRenderTarget::ConvertTo32()
pd3dDevice->SetPixelShader(ppsConvert16to32);
pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
//g_bSaveZUpdate = 1;
//D3DXSaveSurfaceToFile("tex3.tga", D3DXIFF_TGA, psurfConv, NULL, NULL);
if( g_bSaveZUpdate ) {
@ -801,7 +801,7 @@ void ZeroGS::CRenderTarget::ConvertTo16()
pd3dDevice->SetPixelShader(ppsConvert32to16);
pd3dDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
//g_bSaveZUpdate = 1;
if( g_bSaveZUpdate ) {
pd3dDevice->GetRenderTargetData(psurf, psys);
@ -1186,7 +1186,7 @@ void ZeroGS::CDepthTarget::Update(int context, ZeroGS::CRenderTarget* prndr)
if( conf.options & GSOPTION_WIREFRAME ) SETRS(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
SETRS(D3DRS_SCISSORTESTENABLE, TRUE);
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( g_bSaveZUpdate ) {
if( pusetarg != NULL )
D3DXSaveTextureToFile("tex.tga", D3DXIFF_TGA, pusetarg->ptex, NULL);
@ -1268,7 +1268,7 @@ CRenderTarget* ZeroGS::CRenderTargetMngr::GetTarg(const frameInfo& frame, DWORD
// can be both 16bit and 32bit
if( (frame.psm&2) != (it->second->psm&2) ) {
// a lot of games do this actually...
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
WARN_LOG("Really bad formats! %d %d\n", frame.psm, it->second->psm);
#endif
if( !(opts&TO_StrictHeight) ) {
@ -1949,7 +1949,7 @@ ZeroGS::CMemoryTarget* ZeroGS::CMemoryTargetMngr::GetMemoryTarget(const tex0Info
++it;
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
PRIM_LOG("memtarget: tbp: %x tbw: %x th: %x psm: %x\n", tex0.tbp0, tex0.tbw, tex0.th, tex0.psm);
#endif
@ -2383,7 +2383,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
{
int imin = 0, imax = (int)ranges.size(), imid;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2433,7 +2433,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
if( startindex == 0 && end < ranges.front().start ) {
ranges.insert(ranges.begin(), RANGE(start, end));
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2462,7 +2462,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
// create a new range
ranges.insert(ranges.begin()+startindex, RANGE(start, end));
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2480,7 +2480,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
if( lastend > ranges.back().end ) ranges.back().end = lastend;
if( end > ranges.back().end ) ranges.back().end = end;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2493,7 +2493,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
if( start < ranges.front().start ) ranges.front().start = start;
if( end > ranges.front().end ) ranges.front().end = end;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2509,7 +2509,7 @@ void ZeroGS::CRangeManager::Insert(int start, int end)
if( start < ranges[startindex].start ) ranges[startindex].start = start;
if( end > ranges[startindex].end ) ranges[startindex].end = end;
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// sanity check
for(int i = 0; i < (int)ranges.size()-1; ++i) assert( ranges[i].end < ranges[i+1].start );
#endif
@ -2569,7 +2569,7 @@ void FlushTransferRanges(const tex0Info* ptex)
// Flush(0);
// Flush(1);
//
//#ifdef _DEBUG
//#ifdef PCSX2_DEBUG
// // make sure targets are still the same
// list<CRenderTarget*>::iterator it;
// FORIT(it, listTransmissionUpdateTargs) {
@ -2811,7 +2811,7 @@ void TransferHostLocal(const void* pbyMem, u32 nQWordSize)
}
else s_vTransferCache.resize(0);
#if !defined(RELEASE_TO_PUBLIC) && defined(_DEBUG)
#if !defined(RELEASE_TO_PUBLIC) && defined(PCSX2_DEBUG)
if( g_bSaveTrans ) {
tex0Info t;
t.tbp0 = gs.dstbuf.bp;
@ -3244,7 +3244,7 @@ void TransferLocalLocal()
g_MemTargs.ClearRange(dststart, dstend);
#if !defined(RELEASE_TO_PUBLIC) && defined(_DEBUG)
#if !defined(RELEASE_TO_PUBLIC) && defined(PCSX2_DEBUG)
if( g_bSaveTrans ) {
tex0Info t;
t.tbp0 = gs.dstbuf.bp;

View File

@ -598,7 +598,7 @@ void ZeroGS::VB::CheckFrame(int tbp)
//u32 key = zbuf.zbp|(frame.fbw<<16);
//CRenderTargetMngr::MAPTARGETS::iterator it = s_RTs.mapTargets.find(key);
// if( it != s_RTs.mapTargets.end() ) {
//#ifdef _DEBUG
//#ifdef PCSX2_DEBUG
// DEBUG_LOG("zbuf resolve\n");
//#endif
// if( it->second->status & CRenderTarget::TS_Resolved )
@ -856,7 +856,7 @@ HRESULT ZeroGS::Create(LONG _width, LONG _height)
UINT adapter = D3DADAPTER_DEFAULT;
D3DDEVTYPE devtype = !DEBUG_PS2 ? D3DDEVTYPE_HAL : D3DDEVTYPE_REF;
#ifndef _DEBUG
#ifndef PCSX2_DEBUG
DWORD hwoptions = D3DCREATE_HARDWARE_VERTEXPROCESSING|D3DCREATE_PUREDEVICE;
#else
DWORD hwoptions = D3DCREATE_HARDWARE_VERTEXPROCESSING;
@ -1906,7 +1906,7 @@ void ZeroGS::Flush(int context)
return;
}
#if defined(PRIM_LOG) && defined(_DEBUG)
#if defined(PRIM_LOG) && defined(PCSX2_DEBUG)
static const char* patst[8] = { "NEVER", "ALWAYS", "LESS", "LEQUAL", "EQUAL", "GEQUAL", "GREATER", "NOTEQUAL"};
static const char* pztst[4] = { "NEVER", "ALWAYS", "GEQUAL", "GREATER" };
static const char* pafail[4] = { "KEEP", "FB_ONLY", "ZB_ONLY", "RGB_ONLY" };
@ -2067,7 +2067,7 @@ void ZeroGS::Flush(int context)
else ptextarg = NULL;
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( g_bSaveFlushedFrame & 0x80000000 ) {
char str[255];
sprintf(str, "rndr.tga", g_SaveFrameNum);
@ -2393,7 +2393,7 @@ void ZeroGS::Flush(int context)
}
else {
// save the texture
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
// CMemoryTarget* pmemtarg = g_MemTargs.GetMemoryTarget(curvb.tex0, 0);
// assert( curvb.pmemtarg == pmemtarg );
// if( PSMT_ISCLUT(curvb.tex0.psm) )
@ -2546,7 +2546,7 @@ void ZeroGS::Flush(int context)
}
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( bDestAlphaColor == 1 ) {
WARN_LOG("dest alpha blending! manipulate alpha here\n");
}
@ -2719,7 +2719,7 @@ void ZeroGS::Flush(int context)
//WARN_LOG("Need to reset dest alpha color\n");
}
#ifdef _DEBUG
#ifdef PCSX2_DEBUG
if( g_bSaveFlushedFrame & 0xf ) {
char str[255];
sprintf(str, "frames\\frame%.4d.jpg", g_SaveFrameNum++);

View File

@ -19,7 +19,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -39,13 +39,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_USRDLL;ZEROPAD_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PreprocessorDefinitions="_USRDLL;ZEROPAD_EXPORTS"
UsePrecompiledHeader="0"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -92,7 +87,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops;..\..\..\common\vsprops\pthreads.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -113,12 +108,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
PreprocessorDefinitions="NDEBUG;_USRDLL;ZEROPAD_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
/>
<Tool
@ -163,7 +153,7 @@
<Configuration
Name="Devel|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\pthreads.vsprops;..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -184,13 +174,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="NDEBUG;_USRDLL;ZEROPAD_EXPORTS"
RuntimeLibrary="0"
UsePrecompiledHeader="0"
/>
<Tool
@ -243,25 +227,25 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\win.cpp"
RelativePath="..\analog.cpp"
>
</File>
<File
RelativePath=".\gui.cpp"
>
</File>
<File
RelativePath="..\zeropad.cpp"
>
</File>
<File
RelativePath="..\analog.cpp"
>
</File>
<File
RelativePath="..\keyboard.cpp"
>
</File>
<File
RelativePath=".\win.cpp"
>
</File>
<File
RelativePath="..\zeropad.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
@ -269,7 +253,15 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\win.h"
RelativePath="..\analog.h"
>
</File>
<File
RelativePath="..\bitwise.h"
>
</File>
<File
RelativePath="..\keyboard.h"
>
</File>
<File
@ -284,22 +276,14 @@
RelativePath=".\resource.h"
>
</File>
<File
RelativePath=".\win.h"
>
</File>
<File
RelativePath="..\zeropad.h"
>
</File>
<File
RelativePath="..\analog.h"
>
</File>
<File
RelativePath="..\keyboard.h"
>
</File>
<File
RelativePath="..\bitwise.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"

View File

@ -142,7 +142,7 @@ static void InitLibraryName()
// subversion revision tags:
strcpy(libraryName, "ZeroPAD"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# endif
);
@ -152,7 +152,7 @@ static void InitLibraryName()
// to label the specific revision:
sprintf_s(libraryName, "ZeroPAD r%d%s"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# else
"-Dev"
@ -165,7 +165,7 @@ static void InitLibraryName()
// I'll fix up SVN support later. --arcum42
strcpy(libraryName, "ZeroPAD"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# endif
);

View File

@ -41,10 +41,8 @@
using namespace std;
#define PADdefs
extern "C"
{
#include "PS2Edefs.h"
}
#ifdef __LINUX__
#include "joystick.h"
#endif

View File

@ -54,11 +54,6 @@ VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,4,6,0
PRODUCTVERSION 0,4,6,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L

View File

@ -19,7 +19,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
@ -40,12 +40,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG;_USRDLL;ZEROSPU2_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
PreprocessorDefinitions="_USRDLL;ZEROSPU2_EXPORTS"
UsePrecompiledHeader="0"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@ -92,7 +88,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\GlobalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@ -114,15 +110,7 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="FLOAT_SAMPLES;NDEBUG;_USRDLL;ZEROSPU2_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
/>
<Tool
@ -170,7 +158,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
InheritedPropertySheets="..\..\..\common\vsprops\plugin_svnroot.vsprops;.\ProjectRootDir.vsprops;..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\common\vsprops\3rdpartyDeps.vsprops;..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
@ -192,14 +180,8 @@
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
PreprocessorDefinitions="FLOAT_SAMPLES;NDEBUG;_USRDLL;ZEROSPU2_EXPORTS"
StringPooling="true"
RuntimeLibrary="0"
BufferSecurityCheck="false"
UsePrecompiledHeader="0"
/>

View File

@ -15,8 +15,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef __LINUX__
#pragma once
#ifdef __LINUX__
#include <unistd.h>
#include <gtk/gtk.h>
#include <sys/timeb.h> // ftime(), struct timeb
@ -87,61 +89,3 @@ static __forceinline void pcsx2_aligned_free(void* pmem)
#define _aligned_malloc pcsx2_aligned_malloc
#define _aligned_free pcsx2_aligned_free
#endif
// Atomic Operations
#if defined (_WIN32)
#ifndef __x86_64__
extern "C" LONG __cdecl _InterlockedExchangeAdd(LPLONG volatile Addend, LONG Value);
#endif
#pragma intrinsic (_InterlockedExchangeAdd)
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#else
//typedef void* PVOID;
static __forceinline long InterlockedExchange(volatile long* Target, long Value)
{
long result;
/*
* The XCHG instruction always locks the bus with or without the
* LOCKED prefix. This makes it significantly slower than CMPXCHG on
* uni-processor machines. The Windows InterlockedExchange function
* is nearly 3 times faster than the XCHG instruction, so this routine
* is not yet very useful for speeding up pthreads.
*/
__asm__ __volatile__ (
"xchgl %2,%1"
:"=r" (result)
:"m" (*Target), "0" (Value));
return result;
}
static __forceinline long InterlockedExchangeAdd(volatile long* Addend, long Value)
{
__asm__ __volatile__(
".intel_syntax\n"
"lock xadd [%0], %%eax\n"
".att_syntax\n" : : "r"(Addend), "a"(Value) : "memory");
}
static __forceinline long InterlockedCompareExchange(volatile long *dest, long value, long comp)
{
long result;
__asm__ __volatile__ (
"lock\n\t"
"cmpxchgl %2,%1" /* if (EAX == [location]) */
/* [location] = value */
/* else */
/* EAX = [location] */
:"=a" (result)
:"m" (*dest), "r" (value), "a" (comp));
return result;
}
#endif

View File

@ -126,7 +126,7 @@ static void InitLibraryName()
// subversion revision tags:
strcpy( libraryName, "ZeroSPU2"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# elseif ZEROSPU2_DEVBUILD
"-Dev"
@ -138,7 +138,7 @@ static void InitLibraryName()
// to label the specific revision:
sprintf_s( libraryName, "ZeroSPU2 r%d%s"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# elif ZEROSPU2_DEVBUILD
"-Dev"
@ -151,7 +151,7 @@ static void InitLibraryName()
// I'll hook in svn version code later. --arcum42
strcpy( libraryName, "ZeroSPU2 Playground"
# ifdef _DEBUG
# ifdef PCSX2_DEBUG
"-Debug"
# elif ZEROSPU2_DEVBUILD
"-Dev"

View File

@ -23,10 +23,8 @@
#include <string.h>
#include <malloc.h>
extern "C" {
#define SPU2defs
#include "PS2Edefs.h"
}
#include "reg.h"
#include "misc.h"