Misc changes to Patches.cpp. Unconst xSHUF for the moment, so Linux compiles.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2136 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-11-06 01:50:11 +00:00
parent fcdb429bb9
commit 6a7c617a65
7 changed files with 474 additions and 524 deletions

View File

@ -431,7 +431,7 @@ namespace x86Emitter
extern const xImplSimd_DestRegEither xPOR;
extern const xImplSimd_DestRegEither xPXOR;
extern const xImplSimd_Shuffle xSHUF;
extern /*const*/ xImplSimd_Shuffle xSHUF;
// ------------------------------------------------------------------------

View File

@ -486,7 +486,7 @@ void SimdImpl_PExtract::W( const xRegister32& to, const xRegisterSSE& from, u8 i
void SimdImpl_PExtract::W( const xRegister32& to, const xRegisterMMX& from, u8 imm8 ) const { xOpWrite0F( 0xc5, to, from, imm8 ); }
void SimdImpl_PExtract::W( const ModSibBase& dest, const xRegisterSSE& from, u8 imm8 ) const { xOpWrite0F( 0x66, 0x153a, from, dest, imm8 ); }
const xImplSimd_Shuffle xSHUF;
/*const*/ xImplSimd_Shuffle xSHUF;
const xImplSimd_PShuffle xPSHUF =
{

View File

@ -34,7 +34,6 @@
#include "R5900.h"
#include "Elfheader.h"
#include "Patch.h"
static const ConsoleColors ConColor_IOP = Color_Yellow;
static const ConsoleColors ConColor_EE = Color_Cyan;
@ -42,7 +41,6 @@ static const ConsoleColors ConColor_EE = Color_Cyan;
extern wxString ShiftJIS_ConvertString( const char* src );
extern wxString ShiftJIS_ConvertString( const char* src, int maxlen );
// Some homeless externs. This is as good a spot as any for now...
extern void SetCPUState(SSE_MXCSR sseMXCSR, SSE_MXCSR sseVUMXCSR);

View File

@ -31,6 +31,10 @@ using namespace Threading;
extern u8 psxhblankgate;
// The two functions needed for patches.
extern void ApplyPatch( int place );
extern void inifile_read( const char* name );
static const uint EECNT_FUTURE_TARGET = 0x10000000;
u64 profile_starttick = 0;
@ -357,7 +361,7 @@ static __forceinline void VSyncStart(u32 sCycle)
psxVBlankStart();
if (gates) rcntStartGate(true, sCycle); // Counters Start Gate code
if (EmuConfig.EnablePatches) applypatch(1); // fixme - Apply patches
if (EmuConfig.EnablePatches) ApplyPatch(1); // fixme - Apply patches
// INTC - VB Blank Start Hack --
// Hack fix! This corrects a freezeup in Granda 2 where it decides to spin

View File

@ -22,6 +22,10 @@
using namespace std;
// The two functions needed for patches.
extern void ApplyPatch( int place );
extern void inifile_read( const char* name );
u32 ElfCRC;
struct ELF_HEADER {
@ -496,16 +500,8 @@ void ElfApplyPatches()
if( !EmuConfig.EnablePatches ) return;
/*if(LoadPatch( filename ) != 0)
{
Console.WriteLn( "XML Loader returned an error. Trying to load a pnach..." );
inifile_read( filename.ToUTF8() );
}
else
Console.WriteLn( "XML Loading success. Will not load from pnach..." );*/
inifile_read( filename.ToUTF8() );
applypatch( 0 );
ApplyPatch( 0 );
}
// Fetches the CRC of the game bound to the CDVD plugin.

File diff suppressed because it is too large Load Diff

View File

@ -17,23 +17,8 @@
#include "Pcsx2Defs.h"
//
// Defines
//
#define MAX_PATCH 1024
#define IFIS(x,str) if(!strnicmp(x,str,sizeof(str)-1))
#define GETNEXT_PARAM() \
while ( *param && ( *param != ',' ) ) param++; \
if ( *param ) param++; \
while ( *param && ( *param == ' ' ) ) param++; \
if ( *param == 0 ) { Console.Error( _( "Not enough params for inicommand" ) ); return; }
//
// Enums
//
enum patch_cpu_type {
NO_CPU,
CPU_EE,
@ -49,9 +34,6 @@ enum patch_data_type {
EXTENDED_T
};
//
// Typedefs
//
typedef void (*PATCHTABLEFUNC)( char * text1, char * text2 );
struct IniPatch
@ -65,41 +47,27 @@ struct IniPatch
u64 data;
};
//
// Function prototypes
//
void patchFunc_comment( char * text1, char * text2 );
void patchFunc_gametitle( char * text1, char * text2 );
void patchFunc_patch( char * text1, char * text2 );
void patchFunc_fastmemory( char * text1, char * text2 );
void patchFunc_roundmode( char * text1, char * text2 );
void patchFunc_zerogs( char * text1, char * text2 );
void patchFunc_vunanmode( char * text1, char * text2 );
void patchFunc_ffxhack( char * text1, char * text2 );
void patchFunc_xkickdelay( char * text1, char * text2 );
void inifile_trim( char * buffer );
namespace PatchFunc
{
void comment( char* text1, char* text2 );
void gametitle( char* text1, char* text2 );
void patch( char* text1, char* text2 );
void roundmode( char* text1, char* text2 );
void zerogs( char* text1, char* text2 );
}
//
// Variables
//
extern IniPatch patch[ MAX_PATCH ];
extern int patchnumber;
void applypatch( int place );
void inifile_read( const char * name );
void inifile_command( char * cmd );
void resetpatch( void );
void inifile_read( const char* name );
void inifile_command( char* cmd );
void inifile_trim( char* buffer );
int AddPatch(int Mode, int Place, int Address, int Size, u64 data);
void ApplyPatch( int place );
void ResetPatch( void );
extern void SetFastMemory(int); // iR5900LoadStore.c
//extern int g_VUGameFixes;
extern int g_ZeroGSOptions;
extern void SetRoundMode(SSE_RoundMode ee, SSE_RoundMode vu);
extern int LoadPatch(const wxString& patchfile);
void SetRoundMode(SSE_RoundMode ee, SSE_RoundMode vu);
#endif /* __PATCH_H__ */