mirror of https://github.com/PCSX2/pcsx2.git
wxgui: Hack in game fixes support. Fix a few minor compiler warnings. Fix Linux after the last revision...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1752 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
43d9aef534
commit
66507e2303
|
@ -302,12 +302,15 @@ extern SessionOverrideFlags g_Session;
|
||||||
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && EmuConfig.Cpu.Recompiler.EnableVU1)
|
#define CHECK_VU1REC (!g_Session.ForceDisableVU1rec && EmuConfig.Cpu.Recompiler.EnableVU1)
|
||||||
|
|
||||||
//------------ SPECIAL GAME FIXES!!! ---------------
|
//------------ SPECIAL GAME FIXES!!! ---------------
|
||||||
|
#define NUM_OF_GAME_FIXES 7
|
||||||
|
|
||||||
#define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
#define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
||||||
#define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
#define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||||
#define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again).
|
#define CHECK_VUCLIPFLAGHACK (EmuConfig.Gamefixes.VuClipFlagHack) // Special Fix for Persona games, maybe others. It's to do with the VU clip flag (again).
|
||||||
#define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs.
|
#define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs.
|
||||||
#define CHECK_DMAEXECHACK (false) //sVU-only, ignored // Special Fix for Fatal Frame; breaks Gust and Tri-Ace games.
|
#define CHECK_DMAEXECHACK (EmuConfig.Gamefixes.DMAExeHack) // Special Fix for Fatal Frame; breaks Gust and Tri-Ace games.
|
||||||
#define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics.
|
#define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics.
|
||||||
|
#define CHECK_MPEGHACK (EmuConfig.Gamefixes.MpegHack) // Special Fix for Mana Khemia 1; breaks Digital Devil Saga.
|
||||||
|
|
||||||
//------------ Advanced Options!!! ---------------
|
//------------ Advanced Options!!! ---------------
|
||||||
#define CHECK_VU_OVERFLOW (EmuConfig.Cpu.vuOverflow)
|
#define CHECK_VU_OVERFLOW (EmuConfig.Cpu.vuOverflow)
|
||||||
|
|
|
@ -203,7 +203,7 @@ static __forceinline int get_coded_block_pattern(decoder_t * const decoder)
|
||||||
tab = CBP_7 + (UBITS(decoder->bitstream_buf, 7) - 16);
|
tab = CBP_7 + (UBITS(decoder->bitstream_buf, 7) - 16);
|
||||||
else
|
else
|
||||||
tab = CBP_9 + UBITS(decoder->bitstream_buf, 9);
|
tab = CBP_9 + UBITS(decoder->bitstream_buf, 9);
|
||||||
|
|
||||||
DUMPBITS(decoder->bitstream_buf, decoder->bitstream_bits, tab->len);
|
DUMPBITS(decoder->bitstream_buf, decoder->bitstream_bits, tab->len);
|
||||||
return tab->cbp;
|
return tab->cbp;
|
||||||
}
|
}
|
||||||
|
@ -361,7 +361,7 @@ normal_code:
|
||||||
/* escape code */
|
/* escape code */
|
||||||
|
|
||||||
i += UBITS(bit_buf << 6, 6) - 64;
|
i += UBITS(bit_buf << 6, 6) - 64;
|
||||||
|
|
||||||
if (i >= 64) break; /* illegal, check needed to avoid buffer overflow */
|
if (i >= 64) break; /* illegal, check needed to avoid buffer overflow */
|
||||||
|
|
||||||
j = scan[i];
|
j = scan[i];
|
||||||
|
@ -881,14 +881,14 @@ entry_2:
|
||||||
/* escape code */
|
/* escape code */
|
||||||
|
|
||||||
i += UBITS(bit_buf << 6, 6) - 64;
|
i += UBITS(bit_buf << 6, 6) - 64;
|
||||||
|
|
||||||
if (i >= 64) break; /* illegal, check needed to avoid buffer overflow */
|
if (i >= 64) break; /* illegal, check needed to avoid buffer overflow */
|
||||||
|
|
||||||
j = scan[i];
|
j = scan[i];
|
||||||
DUMPBITS(bit_buf, bits, 12);
|
DUMPBITS(bit_buf, bits, 12);
|
||||||
NEEDBITS(bit_buf, bits, bit_ptr);
|
NEEDBITS(bit_buf, bits, bit_ptr);
|
||||||
val = SBITS(bit_buf, 8);
|
val = SBITS(bit_buf, 8);
|
||||||
|
|
||||||
if (!(val & 0x7f))
|
if (!(val & 0x7f))
|
||||||
{
|
{
|
||||||
DUMPBITS(bit_buf, bits, 8);
|
DUMPBITS(bit_buf, bits, 8);
|
||||||
|
@ -957,14 +957,14 @@ static void __fastcall slice_intra_DCT(decoder_t * const decoder, const int cc,
|
||||||
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
|
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
|
||||||
/* Get the intra DC coefficient and inverse quantize it */
|
/* Get the intra DC coefficient and inverse quantize it */
|
||||||
|
|
||||||
if (cc == 0)
|
if (cc == 0)
|
||||||
decoder->dc_dct_pred[0] += get_luma_dc_dct_diff(decoder);
|
decoder->dc_dct_pred[0] += get_luma_dc_dct_diff(decoder);
|
||||||
else
|
else
|
||||||
decoder->dc_dct_pred[cc] += get_chroma_dc_dct_diff(decoder);
|
decoder->dc_dct_pred[cc] += get_chroma_dc_dct_diff(decoder);
|
||||||
|
|
||||||
decoder->DCTblock[0] = decoder->dc_dct_pred[cc] << (3 - decoder->intra_dc_precision);
|
decoder->DCTblock[0] = decoder->dc_dct_pred[cc] << (3 - decoder->intra_dc_precision);
|
||||||
|
|
||||||
if (decoder->mpeg1)
|
if (decoder->mpeg1)
|
||||||
{
|
{
|
||||||
get_mpeg1_intra_block(decoder);
|
get_mpeg1_intra_block(decoder);
|
||||||
}
|
}
|
||||||
|
@ -987,9 +987,9 @@ static void __fastcall slice_non_intra_DCT(decoder_t * const decoder,
|
||||||
int last;
|
int last;
|
||||||
memzero_obj(decoder->DCTblock);
|
memzero_obj(decoder->DCTblock);
|
||||||
|
|
||||||
if (decoder->mpeg1)
|
if (decoder->mpeg1)
|
||||||
last = get_mpeg1_non_intra_block(decoder);
|
last = get_mpeg1_non_intra_block(decoder);
|
||||||
else
|
else
|
||||||
last = get_non_intra_block(decoder);
|
last = get_non_intra_block(decoder);
|
||||||
|
|
||||||
mpeg2_idct_add(last, decoder->DCTblock, dest, stride);
|
mpeg2_idct_add(last, decoder->DCTblock, dest, stride);
|
||||||
|
@ -1231,7 +1231,7 @@ void mpeg2sliceIDEC(void* pdone)
|
||||||
{
|
{
|
||||||
g_pIPU0Pointer += read * 16;
|
g_pIPU0Pointer += read * 16;
|
||||||
g_nIPU0Data -= read;
|
g_nIPU0Data -= read;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1240,7 +1240,7 @@ void mpeg2sliceIDEC(void* pdone)
|
||||||
|
|
||||||
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
|
NEEDBITS(decoder->bitstream_buf, decoder->bitstream_bits, decoder->bitstream_ptr);
|
||||||
mba_inc = 0;
|
mba_inc = 0;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
if (decoder->bitstream_buf >= 0x10000000)
|
if (decoder->bitstream_buf >= 0x10000000)
|
||||||
|
@ -1267,10 +1267,8 @@ void mpeg2sliceIDEC(void* pdone)
|
||||||
|
|
||||||
default: /* end of slice/frame, or error? */
|
default: /* end of slice/frame, or error? */
|
||||||
{
|
{
|
||||||
#ifdef ALWAYS_RESUME_BEFORE_EXITING
|
if ((!resumed) && (CHECK_MPEGHACK)) so_resume();
|
||||||
if (!resumed) so_resume();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
finishmpeg2sliceIDEC(decoder);
|
finishmpeg2sliceIDEC(decoder);
|
||||||
|
|
||||||
*(int*)pdone = 1;
|
*(int*)pdone = 1;
|
||||||
|
@ -1284,7 +1282,7 @@ void mpeg2sliceIDEC(void* pdone)
|
||||||
|
|
||||||
if (mba_inc)
|
if (mba_inc)
|
||||||
{
|
{
|
||||||
decoder->dc_dct_pred[0] =
|
decoder->dc_dct_pred[0] =
|
||||||
decoder->dc_dct_pred[1] =
|
decoder->dc_dct_pred[1] =
|
||||||
decoder->dc_dct_pred[2] = 128 << decoder->intra_dc_precision;
|
decoder->dc_dct_pred[2] = 128 << decoder->intra_dc_precision;
|
||||||
|
|
||||||
|
@ -1297,9 +1295,7 @@ void mpeg2sliceIDEC(void* pdone)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ALWAYS_RESUME_BEFORE_EXITING
|
if ((!resumed) && (CHECK_MPEGHACK)) so_resume();
|
||||||
if (!resumed) so_resume();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
finishmpeg2sliceIDEC(decoder);
|
finishmpeg2sliceIDEC(decoder);
|
||||||
|
|
||||||
|
@ -1326,7 +1322,7 @@ void mpeg2_slice(void* pdone)
|
||||||
|
|
||||||
if (decoder->dcr)
|
if (decoder->dcr)
|
||||||
{
|
{
|
||||||
decoder->dc_dct_pred[0] =
|
decoder->dc_dct_pred[0] =
|
||||||
decoder->dc_dct_pred[1] =
|
decoder->dc_dct_pred[1] =
|
||||||
decoder->dc_dct_pred[2] = 128 << decoder->intra_dc_precision;
|
decoder->dc_dct_pred[2] = 128 << decoder->intra_dc_precision;
|
||||||
}
|
}
|
||||||
|
@ -1371,7 +1367,7 @@ void mpeg2_slice(void* pdone)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Send The MacroBlock via DmaIpuFrom
|
//Send The MacroBlock via DmaIpuFrom
|
||||||
|
|
||||||
size = 0; // Reset
|
size = 0; // Reset
|
||||||
ipuRegs->ctrl.SCD = 0;
|
ipuRegs->ctrl.SCD = 0;
|
||||||
coded_block_pattern = decoder->coded_block_pattern;
|
coded_block_pattern = decoder->coded_block_pattern;
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
void AssignCwd( const wxString& volume = wxEmptyString ) { wxFileName::AssignCwd( volume ); }
|
void AssignCwd( const wxString& volume = wxEmptyString ) { wxFileName::AssignCwd( volume ); }
|
||||||
bool SetCwd() { wxFileName::SetCwd(); }
|
bool SetCwd() { return wxFileName::SetCwd(); }
|
||||||
|
|
||||||
// wxWidgets is missing the const qualifier for this one! Shame!
|
// wxWidgets is missing the const qualifier for this one! Shame!
|
||||||
void Rmdir();
|
void Rmdir();
|
||||||
|
|
|
@ -47,7 +47,7 @@ void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini )
|
||||||
{
|
{
|
||||||
ProfilerOptions defaults;
|
ProfilerOptions defaults;
|
||||||
IniScopedGroup path( ini, L"Profiler" );
|
IniScopedGroup path( ini, L"Profiler" );
|
||||||
|
|
||||||
IniBitBool( Enabled );
|
IniBitBool( Enabled );
|
||||||
IniBitBool( RecBlocks_EE );
|
IniBitBool( RecBlocks_EE );
|
||||||
IniBitBool( RecBlocks_IOP );
|
IniBitBool( RecBlocks_IOP );
|
||||||
|
@ -59,14 +59,14 @@ void Pcsx2Config::RecompilerOptions::LoadSave( IniInterface& ini )
|
||||||
{
|
{
|
||||||
RecompilerOptions defaults;
|
RecompilerOptions defaults;
|
||||||
IniScopedGroup path( ini, L"Recompiler" );
|
IniScopedGroup path( ini, L"Recompiler" );
|
||||||
|
|
||||||
IniBitBool( EnableEE );
|
IniBitBool( EnableEE );
|
||||||
IniBitBool( EnableIOP );
|
IniBitBool( EnableIOP );
|
||||||
IniBitBool( EnableVU0 );
|
IniBitBool( EnableVU0 );
|
||||||
IniBitBool( EnableVU1 );
|
IniBitBool( EnableVU1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
Pcsx2Config::CpuOptions::CpuOptions() :
|
Pcsx2Config::CpuOptions::CpuOptions() :
|
||||||
bitset( 0 )
|
bitset( 0 )
|
||||||
, sseMXCSR( DEFAULT_sseMXCSR )
|
, sseMXCSR( DEFAULT_sseMXCSR )
|
||||||
, sseVUMXCSR( DEFAULT_sseVUMXCSR )
|
, sseVUMXCSR( DEFAULT_sseVUMXCSR )
|
||||||
|
@ -111,7 +111,7 @@ void Pcsx2Config::VideoOptions::LoadSave( IniInterface& ini )
|
||||||
{
|
{
|
||||||
VideoOptions defaults;
|
VideoOptions defaults;
|
||||||
IniScopedGroup path( ini, L"Video" );
|
IniScopedGroup path( ini, L"Video" );
|
||||||
|
|
||||||
IniEntry( EnableFrameLimiting );
|
IniEntry( EnableFrameLimiting );
|
||||||
IniEntry( EnableFrameSkipping );
|
IniEntry( EnableFrameSkipping );
|
||||||
|
|
||||||
|
@ -134,14 +134,16 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
|
||||||
IniBitBool( VuClipFlagHack );
|
IniBitBool( VuClipFlagHack );
|
||||||
IniBitBool( FpuCompareHack );
|
IniBitBool( FpuCompareHack );
|
||||||
IniBitBool( FpuMulHack );
|
IniBitBool( FpuMulHack );
|
||||||
|
IniBitBool( DMAExeHack );
|
||||||
IniBitBool( XgKickHack );
|
IniBitBool( XgKickHack );
|
||||||
|
IniBitBool( MpegHack );
|
||||||
}
|
}
|
||||||
|
|
||||||
Pcsx2Config::Pcsx2Config() :
|
Pcsx2Config::Pcsx2Config() :
|
||||||
bitset( 0 )
|
bitset( 0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void Pcsx2Config::LoadSave( IniInterface& ini )
|
void Pcsx2Config::LoadSave( IniInterface& ini )
|
||||||
{
|
{
|
||||||
Pcsx2Config defaults;
|
Pcsx2Config defaults;
|
||||||
|
|
|
@ -791,6 +791,7 @@ void PluginManager::Open( PluginsEnum_t pid )
|
||||||
case PluginId_USB: result = OpenPlugin_USB(); break;
|
case PluginId_USB: result = OpenPlugin_USB(); break;
|
||||||
case PluginId_FW: result = OpenPlugin_FW(); break;
|
case PluginId_FW: result = OpenPlugin_FW(); break;
|
||||||
case PluginId_DEV9: result = OpenPlugin_DEV9(); break;
|
case PluginId_DEV9: result = OpenPlugin_DEV9(); break;
|
||||||
|
jNO_DEFAULT;
|
||||||
}
|
}
|
||||||
if( !result )
|
if( !result )
|
||||||
throw Exception::PluginOpenError( pid );
|
throw Exception::PluginOpenError( pid );
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
#ifndef __LINUX__
|
||||||
#pragma region Recompiler Stuffs
|
#pragma region Recompiler Stuffs
|
||||||
|
#endif
|
||||||
|
|
||||||
// This code section contains recompiler vars that are used in "shared" code. Placing
|
// This code section contains recompiler vars that are used in "shared" code. Placing
|
||||||
// them in iR5900.h would mean having to include that into more files than I care to
|
// them in iR5900.h would mean having to include that into more files than I care to
|
||||||
|
@ -40,7 +42,9 @@ namespace Exception
|
||||||
explicit RecompilerReset() { }
|
explicit RecompilerReset() { }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
#ifndef __LINUX__
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
#endif
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// EE Bios function name tables.
|
// EE Bios function name tables.
|
||||||
|
@ -77,7 +81,7 @@ union PERFregs {
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
u32 pad0:1; // LSB should always be zero (or undefined)
|
u32 pad0:1; // LSB should always be zero (or undefined)
|
||||||
u32 EXL0:1; // enable PCR0 during Level 1 exception handling
|
u32 EXL0:1; // enable PCR0 during Level 1 exception handling
|
||||||
|
@ -93,11 +97,11 @@ union PERFregs {
|
||||||
u32 S1:1; // enable PCR1 during Supervisor mode execution
|
u32 S1:1; // enable PCR1 during Supervisor mode execution
|
||||||
u32 U1:1; // enable PCR1 during User-mode execution
|
u32 U1:1; // enable PCR1 during User-mode execution
|
||||||
u32 Event1:5; // PCR1 event counter (all values except 1 ignored at this time)
|
u32 Event1:5; // PCR1 event counter (all values except 1 ignored at this time)
|
||||||
|
|
||||||
u32 Reserved:11;
|
u32 Reserved:11;
|
||||||
u32 CTE:1; // Counter enable bit, no counting if set to zero.
|
u32 CTE:1; // Counter enable bit, no counting if set to zero.
|
||||||
} b;
|
} b;
|
||||||
|
|
||||||
u32 val;
|
u32 val;
|
||||||
} pccr;
|
} pccr;
|
||||||
|
|
||||||
|
@ -116,7 +120,7 @@ union CP0regs {
|
||||||
u32 IE:1; // Bit 0: Interrupt Enable flag.
|
u32 IE:1; // Bit 0: Interrupt Enable flag.
|
||||||
u32 EXL:1; // Bit 1: Exception Level, set on any exception not covered by ERL.
|
u32 EXL:1; // Bit 1: Exception Level, set on any exception not covered by ERL.
|
||||||
u32 ERL:1; // Bit 2: Error level, set on Resetm NMI, perf/debug exceptions.
|
u32 ERL:1; // Bit 2: Error level, set on Resetm NMI, perf/debug exceptions.
|
||||||
u32 KSU:2; // Bits 3-4: Kernel [clear] / Supervisor [set] mode
|
u32 KSU:2; // Bits 3-4: Kernel [clear] / Supervisor [set] mode
|
||||||
u32 unused0:3;
|
u32 unused0:3;
|
||||||
u32 IM:8; // Bits 10-15: Interrupt mask (bits 12,13,14 are unused)
|
u32 IM:8; // Bits 10-15: Interrupt mask (bits 12,13,14 are unused)
|
||||||
u32 EIE:1; // Bit 16: IE bit enabler. When cleared, ints are disabled regardless of IE status.
|
u32 EIE:1; // Bit 16: IE bit enabler. When cleared, ints are disabled regardless of IE status.
|
||||||
|
@ -182,7 +186,7 @@ union FPRreg {
|
||||||
struct fpuRegisters {
|
struct fpuRegisters {
|
||||||
FPRreg fpr[32]; // 32bit floating point registers
|
FPRreg fpr[32]; // 32bit floating point registers
|
||||||
u32 fprc[32]; // 32bit floating point control registers
|
u32 fprc[32]; // 32bit floating point control registers
|
||||||
FPRreg ACC; // 32 bit accumulator
|
FPRreg ACC; // 32 bit accumulator
|
||||||
u32 ACCflag; // an internal accumulator overflow flag
|
u32 ACCflag; // an internal accumulator overflow flag
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -218,10 +222,10 @@ struct tlbs
|
||||||
|
|
||||||
#define _PC_ cpuRegs.pc // The next PC to be executed - only used in this header and R3000A.h
|
#define _PC_ cpuRegs.pc // The next PC to be executed - only used in this header and R3000A.h
|
||||||
|
|
||||||
#define _Funct_ ((cpuRegs.code ) & 0x3F) // The funct part of the instruction register
|
#define _Funct_ ((cpuRegs.code ) & 0x3F) // The funct part of the instruction register
|
||||||
#define _Rd_ ((cpuRegs.code >> 11) & 0x1F) // The rd part of the instruction register
|
#define _Rd_ ((cpuRegs.code >> 11) & 0x1F) // The rd part of the instruction register
|
||||||
#define _Rt_ ((cpuRegs.code >> 16) & 0x1F) // The rt part of the instruction register
|
#define _Rt_ ((cpuRegs.code >> 16) & 0x1F) // The rt part of the instruction register
|
||||||
#define _Rs_ ((cpuRegs.code >> 21) & 0x1F) // The rs part of the instruction register
|
#define _Rs_ ((cpuRegs.code >> 21) & 0x1F) // The rs part of the instruction register
|
||||||
#define _Sa_ ((cpuRegs.code >> 6) & 0x1F) // The sa part of the instruction register
|
#define _Sa_ ((cpuRegs.code >> 6) & 0x1F) // The sa part of the instruction register
|
||||||
#define _Im_ ((u16)cpuRegs.code) // The immediate part of the instruction register
|
#define _Im_ ((u16)cpuRegs.code) // The immediate part of the instruction register
|
||||||
#define _Target_ (cpuRegs.code & 0x03ffffff) // The target part of the instruction register
|
#define _Target_ (cpuRegs.code & 0x03ffffff) // The target part of the instruction register
|
||||||
|
|
|
@ -53,9 +53,14 @@ void SysDetect()
|
||||||
{
|
{
|
||||||
using namespace Console;
|
using namespace Console;
|
||||||
|
|
||||||
|
#ifdef __LINUX__
|
||||||
|
// Haven't rigged up getting the svn version yet... --arcum42
|
||||||
|
Notice("PCSX2 %d.%d.%d - compiled on " __DATE__, params PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
|
||||||
|
#else
|
||||||
Notice("PCSX2 %d.%d.%d.r%d %s - compiled on " __DATE__, params PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
Notice("PCSX2 %d.%d.%d.r%d %s - compiled on " __DATE__, params PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||||
SVN_REV, SVN_MODS ? "(modded)" : ""
|
SVN_REV, SVN_MODS ? "(modded)" : ""
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
Notice("Savestate version: %x", params g_SaveVersion);
|
Notice("Savestate version: %x", params g_SaveVersion);
|
||||||
|
|
||||||
cpudetectInit();
|
cpudetectInit();
|
||||||
|
|
|
@ -67,7 +67,7 @@ extern CoreEmuThread* g_EmuThread;
|
||||||
extern void SysPageFaultExceptionFilter( int signal, siginfo_t *info, void * );
|
extern void SysPageFaultExceptionFilter( int signal, siginfo_t *info, void * );
|
||||||
extern void __fastcall InstallLinuxExceptionHandler();
|
extern void __fastcall InstallLinuxExceptionHandler();
|
||||||
extern void __fastcall ReleaseLinuxExceptionHandler();
|
extern void __fastcall ReleaseLinuxExceptionHandler();
|
||||||
static void NTFS_CompressFile( const wxString& file, bool compressStatus=true ) {}
|
static void __unused NTFS_CompressFile( const wxString& file, bool compressStatus=true ) {}
|
||||||
|
|
||||||
# define PCSX2_MEM_PROTECT_BEGIN() InstallLinuxExceptionHandler()
|
# define PCSX2_MEM_PROTECT_BEGIN() InstallLinuxExceptionHandler()
|
||||||
# define PCSX2_MEM_PROTECT_END() ReleaseLinuxExceptionHandler()
|
# define PCSX2_MEM_PROTECT_END() ReleaseLinuxExceptionHandler()
|
||||||
|
|
|
@ -64,7 +64,7 @@ enum MenuIdentifiers
|
||||||
MenuId_Boot_Recent, // Menu populated with recent source bootings
|
MenuId_Boot_Recent, // Menu populated with recent source bootings
|
||||||
MenuId_SkipBiosToggle, // enables the Bios Skip speedhack
|
MenuId_SkipBiosToggle, // enables the Bios Skip speedhack
|
||||||
|
|
||||||
|
|
||||||
MenuId_Emu_Pause, // suspends/resumes active emulation, retains plugin states
|
MenuId_Emu_Pause, // suspends/resumes active emulation, retains plugin states
|
||||||
MenuId_Emu_Close, // Closes the emulator (states are preserved)
|
MenuId_Emu_Close, // Closes the emulator (states are preserved)
|
||||||
MenuId_Emu_Reset, // Issues a complete reset (wipes preserved states)
|
MenuId_Emu_Reset, // Issues a complete reset (wipes preserved states)
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
wxASSERT( whee != NULL );
|
wxASSERT( whee != NULL );
|
||||||
m_window.Disable();
|
m_window.Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
~ScopedWindowDisable()
|
~ScopedWindowDisable()
|
||||||
{
|
{
|
||||||
m_window.Enable();
|
m_window.Enable();
|
||||||
|
@ -230,7 +230,7 @@ public:
|
||||||
void OnInitCmdLine( wxCmdLineParser& parser );
|
void OnInitCmdLine( wxCmdLineParser& parser );
|
||||||
bool OnCmdLineParsed( wxCmdLineParser& parser );
|
bool OnCmdLineParsed( wxCmdLineParser& parser );
|
||||||
bool PrepForExit();
|
bool PrepForExit();
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
void OnAssertFailure( const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg );
|
void OnAssertFailure( const wxChar *file, int line, const wxChar *func, const wxChar *cond, const wxChar *msg );
|
||||||
#endif
|
#endif
|
||||||
|
@ -272,13 +272,13 @@ public:
|
||||||
|
|
||||||
void ProgramLog_CountMsg()
|
void ProgramLog_CountMsg()
|
||||||
{
|
{
|
||||||
if( m_ProgramLogBox == NULL ) return;
|
if ((wxTheApp == NULL) || ( m_ProgramLogBox == NULL )) return;
|
||||||
m_ProgramLogBox->CountMessage();
|
m_ProgramLogBox->CountMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgramLog_PostEvent( wxEvent& evt )
|
void ProgramLog_PostEvent( wxEvent& evt )
|
||||||
{
|
{
|
||||||
if( m_ProgramLogBox == NULL ) return;
|
if ((wxTheApp == NULL) || ( m_ProgramLogBox == NULL )) return;
|
||||||
m_ProgramLogBox->GetEventHandler()->AddPendingEvent( evt );
|
m_ProgramLogBox->GetEventHandler()->AddPendingEvent( evt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class AppEmuThread : public CoreEmuThread
|
||||||
public:
|
public:
|
||||||
AppEmuThread( const wxString& elf_file=wxEmptyString );
|
AppEmuThread( const wxString& elf_file=wxEmptyString );
|
||||||
virtual ~AppEmuThread() { }
|
virtual ~AppEmuThread() { }
|
||||||
|
|
||||||
virtual void Resume();
|
virtual void Resume();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -274,7 +274,7 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
|
||||||
m_menubar.Append( &m_menuMisc, _("Misc") );
|
m_menubar.Append( &m_menuMisc, _("Misc") );
|
||||||
m_menubar.Append( &m_menuDebug, _("Debug") );
|
m_menubar.Append( &m_menuDebug, _("Debug") );
|
||||||
SetMenuBar( &m_menubar );
|
SetMenuBar( &m_menubar );
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
|
||||||
wxSize backsize( m_background.GetSize() );
|
wxSize backsize( m_background.GetSize() );
|
||||||
|
@ -282,16 +282,26 @@ MainEmuFrame::MainEmuFrame(wxWindow* parent, const wxString& title):
|
||||||
wxString wintitle;
|
wxString wintitle;
|
||||||
if( PCSX2_VersionLo & 1 )
|
if( PCSX2_VersionLo & 1 )
|
||||||
{
|
{
|
||||||
|
#ifdef __LINUX__
|
||||||
|
// Linux isn't set up for svn version numbers yet.
|
||||||
|
wintitle.Printf( _("PCSX2 %d.%d.%d (svn) %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||||
|
wxString::FromUTF8(__DATE__).c_str() );
|
||||||
|
#else
|
||||||
// Odd versions: beta / development editions, which feature revision number and compile date.
|
// Odd versions: beta / development editions, which feature revision number and compile date.
|
||||||
wintitle.Printf( _("PCSX2 %d.%d.%d.%d%s (svn) %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
wintitle.Printf( _("PCSX2 %d.%d.%d.%d%s (svn) %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||||
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, wxString::FromUTF8(__DATE__).c_str() );
|
SVN_REV, SVN_MODS ? L"m" : wxEmptyString, wxString::FromUTF8(__DATE__).c_str() );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef __LINUX__
|
||||||
|
wintitle.Printf( _("PCSX2 %d.%d.%d"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo);
|
||||||
|
#else
|
||||||
// evens: stable releases, with a simpler title.
|
// evens: stable releases, with a simpler title.
|
||||||
wintitle.Printf( _("PCSX2 %d.%d.%d %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
wintitle.Printf( _("PCSX2 %d.%d.%d %s"), PCSX2_VersionHi, PCSX2_VersionMid, PCSX2_VersionLo,
|
||||||
SVN_MODS ? _("(modded)") : wxEmptyString
|
SVN_MODS ? _("(modded)") : wxEmptyString
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SetTitle( wintitle );
|
SetTitle( wintitle );
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include "ConfigurationPanels.h"
|
#include "ConfigurationPanels.h"
|
||||||
|
|
||||||
using namespace wxHelpers;
|
using namespace wxHelpers;
|
||||||
|
static wxCheckBox* game_fix_checkbox[NUM_OF_GAME_FIXES];
|
||||||
|
|
||||||
Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
|
Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
|
||||||
BaseApplicableConfigPanel( &parent, idealWidth)
|
BaseApplicableConfigPanel( &parent, idealWidth)
|
||||||
|
@ -28,16 +29,28 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
|
||||||
AddStaticText( mainSizer, _("Some games need special settings.\nEnable them here.") );
|
AddStaticText( mainSizer, _("Some games need special settings.\nEnable them here.") );
|
||||||
|
|
||||||
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
|
wxStaticBoxSizer& groupSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("PCSX2 Gamefixes") );
|
||||||
AddCheckBox( groupSizer, _("VU Add Hack - for Tri-Ace games!") );
|
game_fix_checkbox[0] = &AddCheckBox( groupSizer, _("VU Add Hack - for Tri-Ace games!") );
|
||||||
AddCheckBox( groupSizer, _( "VU Clip Flag Hack - for Persona games, maybe others.") );
|
game_fix_checkbox[0]->SetValue(EmuConfig.Gamefixes.VuAddSubHack);
|
||||||
AddCheckBox( groupSizer, _("FPU Compare Hack - for Digimon Rumble Arena 2.") );
|
|
||||||
AddCheckBox( groupSizer, _("FPU Multiply Hack - for Tales of Destiny.") );
|
game_fix_checkbox[1] = &AddCheckBox( groupSizer, _( "VU Clip Flag Hack - for Persona games, maybe others.") );
|
||||||
AddCheckBox( groupSizer, _("DMA Execution Hack - for Fatal Frame.") );
|
game_fix_checkbox[1]->SetValue(EmuConfig.Gamefixes.VuClipFlagHack);
|
||||||
AddCheckBox( groupSizer, _("VU XGkick Hack - for Erementar Gerad.") );
|
|
||||||
|
game_fix_checkbox[2] = &AddCheckBox( groupSizer, _("FPU Compare Hack - for Digimon Rumble Arena 2.") );
|
||||||
|
game_fix_checkbox[2]->SetValue(EmuConfig.Gamefixes.FpuCompareHack);
|
||||||
|
|
||||||
|
game_fix_checkbox[3] = &AddCheckBox( groupSizer, _("FPU Multiply Hack - for Tales of Destiny.") );
|
||||||
|
game_fix_checkbox[3]->SetValue(EmuConfig.Gamefixes.FpuMulHack);
|
||||||
|
|
||||||
|
game_fix_checkbox[4] = &AddCheckBox( groupSizer, _("DMA Execution Hack - for Fatal Frame.") );
|
||||||
|
game_fix_checkbox[4]->SetValue(EmuConfig.Gamefixes.DMAExeHack);
|
||||||
|
|
||||||
|
game_fix_checkbox[5] = &AddCheckBox( groupSizer, _("VU XGkick Hack - for Erementar Gerad.") );
|
||||||
|
game_fix_checkbox[5]->SetValue(EmuConfig.Gamefixes.XgKickHack);
|
||||||
|
|
||||||
// I may as well add this, since these aren't hooked in yet. If the consensus is against it,
|
// I may as well add this, since these aren't hooked in yet. If the consensus is against it,
|
||||||
// I'll remove it.
|
// I'll remove it.
|
||||||
AddCheckBox( groupSizer, _("MPEG Hack - for Mana Khemia 1.") );
|
game_fix_checkbox[6] = &AddCheckBox( groupSizer, _("MPEG Hack - for Mana Khemia 1.") );
|
||||||
|
game_fix_checkbox[6]->SetValue(EmuConfig.Gamefixes.MpegHack);
|
||||||
|
|
||||||
mainSizer.Add( &groupSizer, wxSizerFlags().Centre() );
|
mainSizer.Add( &groupSizer, wxSizerFlags().Centre() );
|
||||||
|
|
||||||
|
@ -50,7 +63,27 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow& parent, int idealWidth ) :
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// There's a better way to do this. This was quicker to hack in, though, and can always be replaced later.
|
||||||
|
static void set_game_fix(int num, bool status)
|
||||||
|
{
|
||||||
|
switch (num)
|
||||||
|
{
|
||||||
|
case 0: EmuConfig.Gamefixes.VuAddSubHack = status; break;
|
||||||
|
case 1: EmuConfig.Gamefixes.VuClipFlagHack = status; break;
|
||||||
|
case 2: EmuConfig.Gamefixes.FpuCompareHack = status; break;
|
||||||
|
case 3: EmuConfig.Gamefixes.FpuMulHack = status; break;
|
||||||
|
case 4: EmuConfig.Gamefixes.DMAExeHack = status; break;
|
||||||
|
case 5: EmuConfig.Gamefixes.XgKickHack = status; break;
|
||||||
|
case 6: EmuConfig.Gamefixes.MpegHack = status; break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
void Panels::GameFixesPanel::Apply( AppConfig& conf )
|
void Panels::GameFixesPanel::Apply( AppConfig& conf )
|
||||||
{
|
{
|
||||||
|
for (int i = 0; i < NUM_OF_GAME_FIXES; i++)
|
||||||
|
{
|
||||||
|
set_game_fix(i, game_fix_checkbox[i]->GetValue());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ Panels::UsermodeSelectionPanel::UsermodeSelectionPanel( wxWindow& parent, int id
|
||||||
m_radio_user = &AddRadioButton( s_boxer, _("User Documents (recommended)"), _("Location: ") + wxStandardPaths::Get().GetDocumentsDir() );
|
m_radio_user = &AddRadioButton( s_boxer, _("User Documents (recommended)"), _("Location: ") + wxStandardPaths::Get().GetDocumentsDir() );
|
||||||
s_boxer.AddSpacer( 4 );
|
s_boxer.AddSpacer( 4 );
|
||||||
m_radio_cwd = &AddRadioButton( s_boxer, _("Current working folder (intended for developer use only)"), _("Location: ") + wxGetCwd(),
|
m_radio_cwd = &AddRadioButton( s_boxer, _("Current working folder (intended for developer use only)"), _("Location: ") + wxGetCwd(),
|
||||||
_("This setting requires administration privlidges from your operating system.") );
|
_("This setting requires administration privileges from your operating system.") );
|
||||||
|
|
||||||
s_boxer.AddSpacer( 4 );
|
s_boxer.AddSpacer( 4 );
|
||||||
SetSizer( &s_boxer );
|
SetSizer( &s_boxer );
|
||||||
|
|
Loading…
Reference in New Issue