diff --git a/pcsx2-qt/Settings/SystemSettingsWidget.cpp b/pcsx2-qt/Settings/SystemSettingsWidget.cpp index 2c2ce7609b..93150fa208 100644 --- a/pcsx2-qt/Settings/SystemSettingsWidget.cpp +++ b/pcsx2-qt/Settings/SystemSettingsWidget.cpp @@ -94,18 +94,10 @@ SystemSettingsWidget::SystemSettingsWidget(SettingsDialog* dialog, QWidget* pare dialog->registerWidgetHelp(m_ui.fastCDVD, tr("Enable Fast CDVD"), tr("Unchecked"), tr("Fast disc access, less loading times. Check HDLoader compatibility lists for known games that have issues with this.")); - - updateVU1InstantState(); - connect(m_ui.MTVU, &QCheckBox::stateChanged, this, &SystemSettingsWidget::updateVU1InstantState); } SystemSettingsWidget::~SystemSettingsWidget() = default; -void SystemSettingsWidget::updateVU1InstantState() -{ - //m_ui.instantVU1->setEnabled(!m_dialog->getEffectiveBoolValue("EmuCore/Speedhacks", "vuThread", false)); -} - int SystemSettingsWidget::getGlobalClampingModeIndex(bool vu) const { if (Host::GetBaseBoolSettingValue("EmuCore/CPU/Recompiler", vu ? "vuSignOverflow" : "fpuFullMode", false)) diff --git a/pcsx2-qt/Settings/SystemSettingsWidget.h b/pcsx2-qt/Settings/SystemSettingsWidget.h index 6b760b1b78..2e5a7a97cf 100644 --- a/pcsx2-qt/Settings/SystemSettingsWidget.h +++ b/pcsx2-qt/Settings/SystemSettingsWidget.h @@ -29,9 +29,6 @@ public: SystemSettingsWidget(SettingsDialog* dialog, QWidget* parent); ~SystemSettingsWidget(); -private Q_SLOTS: - void updateVU1InstantState(); - private: int getGlobalClampingModeIndex(bool vu) const; int getClampingModeIndex(bool vu) const; diff --git a/pcsx2/MTVU.cpp b/pcsx2/MTVU.cpp index a058f95502..0702901379 100644 --- a/pcsx2/MTVU.cpp +++ b/pcsx2/MTVU.cpp @@ -416,7 +416,7 @@ void VU_Thread::Get_MTVUChanges() { mtvuInterrupts.fetch_and(~InterruptFlagVUEBit, std::memory_order_relaxed); - if(!INSTANT_VU1) + if(INSTANT_VU1) VU0.VI[REG_VPU_STAT].UL &= ~0xFF00; //DevCon.Warning("E-Bit registered %x", VU0.VI[REG_VPU_STAT].UL); } diff --git a/pcsx2/R5900.cpp b/pcsx2/R5900.cpp index 7a6692fff3..a43cfb9c29 100644 --- a/pcsx2/R5900.cpp +++ b/pcsx2/R5900.cpp @@ -528,7 +528,7 @@ __fi void CPU_INT( EE_EventType n, s32 ecycle) // EE events happen 8 cycles in the future instead of whatever was requested. // This can be used on games with PATH3 masking issues for example, or when // some FMV look bad. - if(CHECK_EETIMINGHACK) ecycle = 8; + if(CHECK_EETIMINGHACK && n < VIF_VU0_FINISH) ecycle = 8; cpuRegs.interrupt|= 1 << n; cpuRegs.sCycle[n] = cpuRegs.cycle; diff --git a/pcsx2/VU1micro.cpp b/pcsx2/VU1micro.cpp index 5f429fab20..32d7d0ffd2 100644 --- a/pcsx2/VU1micro.cpp +++ b/pcsx2/VU1micro.cpp @@ -38,7 +38,10 @@ void vu1ResetRegs() void vu1Finish(bool add_cycles) { if (THREAD_VU1) { //if (VU0.VI[REG_VPU_STAT].UL & 0x100) DevCon.Error("MTVU: VU0.VI[REG_VPU_STAT].UL & 0x100"); - vu1Thread.WaitVU(); + if (INSTANT_VU1 || add_cycles) + { + vu1Thread.WaitVU(); + } vu1Thread.Get_MTVUChanges(); return; } diff --git a/pcsx2/Vif1_Dma.cpp b/pcsx2/Vif1_Dma.cpp index ef98d45e00..e93a88a9bd 100644 --- a/pcsx2/Vif1_Dma.cpp +++ b/pcsx2/Vif1_Dma.cpp @@ -228,8 +228,11 @@ __fi void vif1VUFinish() if (VU0.VI[REG_VPU_STAT].UL & 0x500) { vu1Thread.Get_MTVUChanges(); - - CPU_INT(VIF_VU1_FINISH, 128); + + if (THREAD_VU1 && !INSTANT_VU1 && (VU0.VI[REG_VPU_STAT].UL & 0x100)) + CPU_INT(VIF_VU1_FINISH, cpuGetCycles(VU_MTVU_BUSY)); + else + CPU_INT(VIF_VU1_FINISH, 128); return; } diff --git a/pcsx2/gui/Panels/ConfigurationPanels.h b/pcsx2/gui/Panels/ConfigurationPanels.h index 2cee6b985c..41007448ee 100644 --- a/pcsx2/gui/Panels/ConfigurationPanels.h +++ b/pcsx2/gui/Panels/ConfigurationPanels.h @@ -341,7 +341,6 @@ namespace Panels void Defaults_Click(wxCommandEvent& evt); void EECycleRate_Scroll(wxScrollEvent& event); void VUCycleRate_Scroll(wxScrollEvent& event); - void VUThread_Enable(wxCommandEvent& evt); }; // -------------------------------------------------------------------------------------- diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 4b0298fcda..c1d7fae214 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -173,7 +173,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) m_check_vuFlagHack->SetToolTip( pxEt( L"Updates Status Flags only on blocks which will read them, instead of all the time. This is safe most of the time." ) ); - m_check_vuThread->SetToolTip( pxEt( L"Runs VU1 on its own thread (microVU1-only). Generally a speedup on CPUs with 3 or more cores. This is safe for most games, but a few games are incompatible and may hang. In the case of GS limited games, it may be a slowdown (especially on dual core CPUs)." + m_check_vuThread->SetToolTip( pxEt( L"Runs VU1 on its own thread. Generally a speedup on CPUs with 3 or more cores. This is safe for most games, but a few games are incompatible and may hang. In the case of GS limited games, it may be a slowdown (especially on dual core CPUs)." ) ); m_check_vu1Instant->SetToolTip(pxEt(L"Runs VU1 instantly. Provides a modest speed improvement in most games. This is safe for most games, but a few games may exhibit graphical errors." @@ -237,7 +237,6 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) Bind(wxEVT_SCROLL_CHANGED, &SpeedHacksPanel::VUCycleRate_Scroll, this, m_slider_eeSkip->GetId()); Bind(wxEVT_CHECKBOX, &SpeedHacksPanel::OnEnable_Toggled, this, m_check_Enable->GetId()); Bind(wxEVT_BUTTON, &SpeedHacksPanel::Defaults_Click, this, wxID_DEFAULT); - Bind(wxEVT_CHECKBOX, &SpeedHacksPanel::VUThread_Enable, this, m_check_vuThread->GetId()); } // Doesn't modify values - only locks(gray out)/unlocks as necessary. @@ -267,11 +266,6 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse ) // Grayout MTVU on safest preset m_check_vuThread->Enable(hacksEnabled && (!hasPreset || configToUse->PresetIndex != 0)); - // Disables the Instant VU1 checkbox when MTVU is checked in the GUI as reflected in the code. - // Makes Instant VU1 toggleable when MTVU is unchecked in the GUI. - // Some may think that having MTVU + Instant VU1 checked, can have bad side-effects when it doesn't. - //m_check_vu1Instant->Enable(hacksEnabled && !m_check_vuThread->GetValue()); - // Layout necessary to ensure changed slider text gets re-aligned properly // and to properly gray/ungray pxStaticText stuff (I suspect it causes a // paint event to be sent on Windows) @@ -370,9 +364,3 @@ void Panels::SpeedHacksPanel::VUCycleRate_Scroll(wxScrollEvent &event) event.Skip(); } - -void Panels::SpeedHacksPanel::VUThread_Enable(wxCommandEvent& evt) -{ - m_check_vu1Instant->Enable(!m_check_vuThread->GetValue()); - Layout(); -}