Made mVU Macro ON by default again (got turned off by wx merge).
Added microVU speedhacks to GUI.
Deleted microVU_Alloc.h from project file.

Note: No speedhacks appear to be working yet during emulation.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1769 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
cottonvibes 2009-09-07 04:40:50 +00:00
parent ce0e90e8e6
commit 5148323b7c
6 changed files with 45 additions and 13 deletions

View File

@ -215,12 +215,11 @@ public:
IopCycleRate_X2:1, // enables the x2 multiplier of the IOP cyclerate IopCycleRate_X2:1, // enables the x2 multiplier of the IOP cyclerate
IntcStat:1, // tells Pcsx2 to fast-forward through intc_stat waits. IntcStat:1, // tells Pcsx2 to fast-forward through intc_stat waits.
BIFC0:1, // enables BIFC0 detection and fast-forwarding BIFC0:1, // enables BIFC0 detection and fast-forwarding
vuFlagHack:1, // microVU specific flag hack; Can cause Infinite loops, SPS, etc...
vuMinMax:1, // microVU specific MinMax hack; Can cause SPS, Black Screens, etc... vuMinMax:1; // microVU specific MinMax hack; Can cause SPS, Black Screens, etc...
vuFlagHack:1; // MicroVU specific flag hack; Can cause Infinite loops, SPS, etc...
}; }; }; };
u8 EECycleRate; // EE cyclerate selector (1.0, 1.5, 2.0) u8 EECycleRate; // EE cycle rate selector (1.0, 1.5, 2.0)
u8 VUCycleSteal; // VU Cycle Stealer factor (0, 1, 2, or 3) u8 VUCycleSteal; // VU Cycle Stealer factor (0, 1, 2, or 3)
SpeedhackOptions(); SpeedhackOptions();
@ -294,6 +293,7 @@ extern SessionOverrideFlags g_Session;
// ------------ CPU / Recompiler Options --------------- // ------------ CPU / Recompiler Options ---------------
#define CHECK_MACROVU0 // If defined uses mVU for VU Macro (COP2), else uses sVU
#define CHECK_MICROVU0 (EmuConfig.Cpu.Recompiler.UseMicroVU0) #define CHECK_MICROVU0 (EmuConfig.Cpu.Recompiler.UseMicroVU0)
#define CHECK_MICROVU1 (EmuConfig.Cpu.Recompiler.UseMicroVU1) #define CHECK_MICROVU1 (EmuConfig.Cpu.Recompiler.UseMicroVU1)
#define CHECK_EEREC (!g_Session.ForceDisableEErec && EmuConfig.Cpu.Recompiler.EnableEE) #define CHECK_EEREC (!g_Session.ForceDisableEErec && EmuConfig.Cpu.Recompiler.EnableEE)

View File

@ -41,6 +41,8 @@ void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini )
IniBitBool( IopCycleRate_X2 ); IniBitBool( IopCycleRate_X2 );
IniBitBool( IntcStat ); IniBitBool( IntcStat );
IniBitBool( BIFC0 ); IniBitBool( BIFC0 );
IniBitBool( vuFlagHack );
IniBitBool( vuMinMax );
} }
void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini ) void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini )

View File

@ -246,6 +246,8 @@ namespace Panels
wxCheckBox* m_check_intc; wxCheckBox* m_check_intc;
wxCheckBox* m_check_b1fc0; wxCheckBox* m_check_b1fc0;
wxCheckBox* m_check_IOPx2; wxCheckBox* m_check_IOPx2;
wxCheckBox* m_check_vuFlagHack;
wxCheckBox* m_check_vuMinMax;
public: public:
SpeedHacksPanel( wxWindow& parent, int idealWidth ); SpeedHacksPanel( wxWindow& parent, int idealWidth );

View File

@ -102,6 +102,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
wxStaticBoxSizer& cyclerateSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("EE Cyclerate") ); wxStaticBoxSizer& cyclerateSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("EE Cyclerate") );
wxStaticBoxSizer& stealerSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("VU Cycle Stealing") ); wxStaticBoxSizer& stealerSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("VU Cycle Stealing") );
wxStaticBoxSizer& microVUSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("microVU Hacks") );
wxStaticBoxSizer& miscSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Other Hacks") ); wxStaticBoxSizer& miscSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("Other Hacks") );
AddStaticText( mainSizer, pxE( ".Panels:Speedhacks:Overview", AddStaticText( mainSizer, pxE( ".Panels:Speedhacks:Overview",
@ -114,6 +115,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// EE Cyclerate Hack Section: // EE Cyclerate Hack Section:
// ------------------------------------------------------------------------
m_slider_eecycle = new wxSlider( this, wxID_ANY, opts.EECycleRate+1, 1, 3, m_slider_eecycle = new wxSlider( this, wxID_ANY, opts.EECycleRate+1, 1, 3,
wxDefaultPosition, wxDefaultSize, wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS ); wxDefaultPosition, wxDefaultSize, wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS );
@ -134,6 +136,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// VU Cycle Stealing Hack Section: // VU Cycle Stealing Hack Section:
// ------------------------------------------------------------------------
m_slider_vustealer = new wxSlider( this, wxID_ANY, opts.VUCycleSteal, 0, 3, wxDefaultPosition, wxDefaultSize, m_slider_vustealer = new wxSlider( this, wxID_ANY, opts.VUCycleSteal, 0, 3, wxDefaultPosition, wxDefaultSize,
wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS ); wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS );
@ -154,8 +157,30 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
m_slider_vustealer->SetToolTip( tooltip ); m_slider_vustealer->SetToolTip( tooltip );
m_msg_vustealer->SetToolTip( tooltip ); m_msg_vustealer->SetToolTip( tooltip );
// ------------------------------------------------------------------------
// microVU Hacks Section:
// ------------------------------------------------------------------------
m_check_vuFlagHack = &AddCheckBox(microVUSizer, _("mVU Flag Hack"),
_("Large Speedup and High Compatibility; may cause garbage graphics, SPS, etc..."),
pxE( ".Tooltips:Speedhacks:vuFlagHack",
L"Updates Status Flags only on blocks which will read them, instead of all the time."
L"This is safe most of the time, and Super VU does something similar by default."
) );
m_check_vuFlagHack->SetValue(opts.vuFlagHack);
m_check_vuMinMax = &AddCheckBox(microVUSizer, _("mVU Min/Max Hack"),
_("Small Speedup; may cause black screens, garbage graphics, SPS, etc..."),
pxE( ".Tooltips:Speedhacks:vuMinMax",
L"Uses SSE's Min/Max Floating Point Operations instead of custom logical Min/Max routines."
) );
m_check_vuMinMax->SetValue(opts.vuMinMax);
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// All other hacks Section: // All other hacks Section:
// ------------------------------------------------------------------------
m_check_intc = &AddCheckBox(miscSizer, _("Enable INTC Spin Detection"), m_check_intc = &AddCheckBox(miscSizer, _("Enable INTC Spin Detection"),
_("Huge speedup for some games, with almost no compatibility side effects. [Recommended]"), _("Huge speedup for some games, with almost no compatibility side effects. [Recommended]"),
@ -189,6 +214,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) :
cycleHacksSizer.Add( &stealerSizer, SizerFlags::TopLevelBox() ); cycleHacksSizer.Add( &stealerSizer, SizerFlags::TopLevelBox() );
mainSizer.Add( &cycleHacksSizer, wxSizerFlags().Expand() ); mainSizer.Add( &cycleHacksSizer, wxSizerFlags().Expand() );
mainSizer.Add( &microVUSizer, SizerFlags::TopLevelBox() );
mainSizer.Add( &miscSizer, SizerFlags::TopLevelBox() ); mainSizer.Add( &miscSizer, SizerFlags::TopLevelBox() );
SetSizer( &mainSizer ); SetSizer( &mainSizer );
@ -205,6 +231,8 @@ void Panels::SpeedHacksPanel::Apply( AppConfig& conf )
opts.BIFC0 = m_check_b1fc0->GetValue(); opts.BIFC0 = m_check_b1fc0->GetValue();
opts.IopCycleRate_X2 = m_check_IOPx2->GetValue(); opts.IopCycleRate_X2 = m_check_IOPx2->GetValue();
opts.IntcStat = m_check_intc->GetValue(); opts.IntcStat = m_check_intc->GetValue();
opts.vuFlagHack = m_check_vuFlagHack->GetValue();
opts.vuMinMax = m_check_vuMinMax->GetValue();
} }
void Panels::SpeedHacksPanel::EECycleRate_Scroll(wxScrollEvent &event) void Panels::SpeedHacksPanel::EECycleRate_Scroll(wxScrollEvent &event)

View File

@ -1470,10 +1470,6 @@
RelativePath="..\..\x86\microVU.h" RelativePath="..\..\x86\microVU.h"
> >
</File> </File>
<File
RelativePath="..\..\x86\microVU_Alloc.h"
>
</File>
<File <File
RelativePath="..\..\x86\microVU_Alloc.inl" RelativePath="..\..\x86\microVU_Alloc.inl"
> >
@ -1494,6 +1490,10 @@
RelativePath="..\..\x86\microVU_Execute.inl" RelativePath="..\..\x86\microVU_Execute.inl"
> >
</File> </File>
<File
RelativePath="..\..\x86\microVU_IR.h"
>
</File>
<File <File
RelativePath="..\..\x86\microVU_Log.inl" RelativePath="..\..\x86\microVU_Log.inl"
> >
@ -2414,7 +2414,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="" Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)" CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h" Outputs="&quot;$(InputDir)\$(InputName).h"
/> />
</FileConfiguration> </FileConfiguration>
@ -2424,7 +2424,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="" Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)" CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h" Outputs="&quot;$(InputDir)\$(InputName).h"
/> />
</FileConfiguration> </FileConfiguration>
@ -2434,7 +2434,7 @@
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
Description="" Description=""
CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)" CommandLine="&quot;$(InputDir)\bin2cpp.cmd&quot; $(InputFileName)&#x0D;&#x0A;"
Outputs="&quot;$(InputDir)\$(InputName).h" Outputs="&quot;$(InputDir)\$(InputName).h"
/> />
</FileConfiguration> </FileConfiguration>

View File

@ -264,8 +264,8 @@ typedef u32 (__fastcall *mVUCall)(void*, void*);
// Speed Hacks // Speed Hacks
#define CHECK_VU_CONSTHACK 1 // Disables Constant Propagation for Jumps #define CHECK_VU_CONSTHACK 1 // Disables Constant Propagation for Jumps
#define CHECK_VU_FLAGHACK (EmuConfig.Speedhacks.vuFlagHack) // (Can cause Infinite loops, SPS, etc...) #define CHECK_VU_FLAGHACK (EmuConfig.Speedhacks.vuFlagHack) // (Can cause Infinite loops, SPS, etc...)
#define CHECK_VU_MINMAXHACK (EmuConfig.Speedhacks.vuMinMax) // (Can cause SPS, Black Screens, etc...) #define CHECK_VU_MINMAXHACK (EmuConfig.Speedhacks.vuMinMax) // (Can cause SPS, Black Screens, etc...)
// Unknown Data // Unknown Data
#define mVU_XGKICK_CYCLES ((CHECK_XGKICKHACK) ? 3 : 1) #define mVU_XGKICK_CYCLES ((CHECK_XGKICKHACK) ? 3 : 1)