From 5148323b7c2d8ae6d17f12c49649f56d52ffd709 Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Mon, 7 Sep 2009 04:40:50 +0000 Subject: [PATCH] pcsx2: 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 --- pcsx2/Config.h | 8 +++---- pcsx2/Pcsx2Config.cpp | 2 ++ pcsx2/gui/Panels/ConfigurationPanels.h | 2 ++ pcsx2/gui/Panels/SpeedhacksPanel.cpp | 28 ++++++++++++++++++++++ pcsx2/windows/VCprojects/pcsx2_2008.vcproj | 14 +++++------ pcsx2/x86/microVU_Misc.h | 4 ++-- 6 files changed, 45 insertions(+), 13 deletions(-) diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 8af382f019..553a958a72 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -215,12 +215,11 @@ public: IopCycleRate_X2:1, // enables the x2 multiplier of the IOP cyclerate IntcStat:1, // tells Pcsx2 to fast-forward through intc_stat waits. BIFC0:1, // enables BIFC0 detection and fast-forwarding - - vuMinMax:1, // microVU specific MinMax hack; Can cause SPS, Black Screens, etc... - vuFlagHack:1; // MicroVU specific flag hack; Can cause Infinite loops, SPS, etc... + vuFlagHack:1, // microVU specific flag hack; Can cause Infinite loops, SPS, etc... + vuMinMax:1; // microVU specific MinMax hack; Can cause SPS, Black Screens, 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) SpeedhackOptions(); @@ -294,6 +293,7 @@ extern SessionOverrideFlags g_Session; // ------------ 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_MICROVU1 (EmuConfig.Cpu.Recompiler.UseMicroVU1) #define CHECK_EEREC (!g_Session.ForceDisableEErec && EmuConfig.Cpu.Recompiler.EnableEE) diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index fe6862e80f..4d5276e713 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -41,6 +41,8 @@ void Pcsx2Config::SpeedhackOptions::LoadSave( IniInterface& ini ) IniBitBool( IopCycleRate_X2 ); IniBitBool( IntcStat ); IniBitBool( BIFC0 ); + IniBitBool( vuFlagHack ); + IniBitBool( vuMinMax ); } void Pcsx2Config::ProfilerOptions::LoadSave( IniInterface& ini ) diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index c479842f3c..997578ae1b 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -246,6 +246,8 @@ namespace Panels wxCheckBox* m_check_intc; wxCheckBox* m_check_b1fc0; wxCheckBox* m_check_IOPx2; + wxCheckBox* m_check_vuFlagHack; + wxCheckBox* m_check_vuMinMax; public: SpeedHacksPanel( wxWindow& parent, int idealWidth ); diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 0cd95a6cf8..b4f96c33d1 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -102,6 +102,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) : wxStaticBoxSizer& cyclerateSizer = *new wxStaticBoxSizer( wxVERTICAL, this, _("EE Cyclerate") ); 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") ); AddStaticText( mainSizer, pxE( ".Panels:Speedhacks:Overview", @@ -114,6 +115,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) : // ------------------------------------------------------------------------ // EE Cyclerate Hack Section: + // ------------------------------------------------------------------------ m_slider_eecycle = new wxSlider( this, wxID_ANY, opts.EECycleRate+1, 1, 3, wxDefaultPosition, wxDefaultSize, wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS ); @@ -134,6 +136,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) : // ------------------------------------------------------------------------ // VU Cycle Stealing Hack Section: + // ------------------------------------------------------------------------ m_slider_vustealer = new wxSlider( this, wxID_ANY, opts.VUCycleSteal, 0, 3, wxDefaultPosition, wxDefaultSize, wxHORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS ); @@ -154,8 +157,30 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow& parent, int idealWidth ) : m_slider_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: + // ------------------------------------------------------------------------ m_check_intc = &AddCheckBox(miscSizer, _("Enable INTC Spin Detection"), _("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() ); mainSizer.Add( &cycleHacksSizer, wxSizerFlags().Expand() ); + mainSizer.Add( µVUSizer, SizerFlags::TopLevelBox() ); mainSizer.Add( &miscSizer, SizerFlags::TopLevelBox() ); SetSizer( &mainSizer ); @@ -205,6 +231,8 @@ void Panels::SpeedHacksPanel::Apply( AppConfig& conf ) opts.BIFC0 = m_check_b1fc0->GetValue(); opts.IopCycleRate_X2 = m_check_IOPx2->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) diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index a5d2af38e6..d0c3502147 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -1470,10 +1470,6 @@ RelativePath="..\..\x86\microVU.h" > - - @@ -1494,6 +1490,10 @@ RelativePath="..\..\x86\microVU_Execute.inl" > + + @@ -2414,7 +2414,7 @@ @@ -2424,7 +2424,7 @@ @@ -2434,7 +2434,7 @@ diff --git a/pcsx2/x86/microVU_Misc.h b/pcsx2/x86/microVU_Misc.h index 8578b5033b..68a64d242c 100644 --- a/pcsx2/x86/microVU_Misc.h +++ b/pcsx2/x86/microVU_Misc.h @@ -264,8 +264,8 @@ typedef u32 (__fastcall *mVUCall)(void*, void*); // Speed Hacks #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_MINMAXHACK (EmuConfig.Speedhacks.vuMinMax) // (Can cause SPS, Black Screens, 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...) // Unknown Data #define mVU_XGKICK_CYCLES ((CHECK_XGKICKHACK) ? 3 : 1)