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)
|
||||||
|
|
|
@ -1267,9 +1267,7 @@ 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);
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -134,7 +134,9 @@ 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() :
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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