From 8f416821ad9e85e49630b020fc165ba2c983896d Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Mon, 9 Feb 2015 23:10:30 +1300 Subject: [PATCH 1/2] Remove VBeam Speedhack. --- Source/Core/Core/BootManager.cpp | 5 +---- Source/Core/Core/ConfigManager.cpp | 1 - Source/Core/Core/CoreParameter.cpp | 3 +-- Source/Core/Core/CoreParameter.h | 1 - Source/Core/Core/HW/VideoInterface.cpp | 10 ++-------- Source/Core/DolphinWX/ISOProperties.cpp | 5 ----- Source/Core/DolphinWX/ISOProperties.h | 3 +-- 7 files changed, 5 insertions(+), 23 deletions(-) diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp index 34b2ca8d56..e6cec100cc 100644 --- a/Source/Core/Core/BootManager.cpp +++ b/Source/Core/Core/BootManager.cpp @@ -48,7 +48,7 @@ namespace BootManager struct ConfigCache { bool valid, bCPUThread, bSkipIdle, bFPRF, bBAT, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread, - bVBeamSpeedHack, bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bProgressive; + bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bProgressive; int iCPUCore, Volume; int iWiimoteSource[MAX_BBMOTES]; SIDevices Pads[MAX_SI_CHANNELS]; @@ -117,7 +117,6 @@ bool BootCore(const std::string& _rFilename) config_cache.bBAT = StartUp.bBAT; config_cache.bMMU = StartUp.bMMU; config_cache.bDCBZOFF = StartUp.bDCBZOFF; - config_cache.bVBeamSpeedHack = StartUp.bVBeamSpeedHack; config_cache.bSyncGPU = StartUp.bSyncGPU; config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed; config_cache.bMergeBlocks = StartUp.bMergeBlocks; @@ -159,7 +158,6 @@ bool BootCore(const std::string& _rFilename) core_section->Get("BAT", &StartUp.bBAT, StartUp.bBAT); core_section->Get("MMU", &StartUp.bMMU, StartUp.bMMU); core_section->Get("DCBZ", &StartUp.bDCBZOFF, StartUp.bDCBZOFF); - core_section->Get("VBeam", &StartUp.bVBeamSpeedHack, StartUp.bVBeamSpeedHack); core_section->Get("SyncGPU", &StartUp.bSyncGPU, StartUp.bSyncGPU); core_section->Get("FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed); core_section->Get("BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks); @@ -288,7 +286,6 @@ void Stop() StartUp.bBAT = config_cache.bBAT; StartUp.bMMU = config_cache.bMMU; StartUp.bDCBZOFF = config_cache.bDCBZOFF; - StartUp.bVBeamSpeedHack = config_cache.bVBeamSpeedHack; StartUp.bSyncGPU = config_cache.bSyncGPU; StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed; StartUp.bMergeBlocks = config_cache.bMergeBlocks; diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 3e413e7b90..cf3e06b617 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -583,7 +583,6 @@ void SConfig::LoadCoreSettings(IniFile& ini) core->Get("RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false); core->Get("MMU", &m_LocalCoreStartupParameter.bMMU, false); core->Get("BBDumpPort", &m_LocalCoreStartupParameter.iBBDumpPort, -1); - core->Get("VBeam", &m_LocalCoreStartupParameter.bVBeamSpeedHack, false); core->Get("SyncGPU", &m_LocalCoreStartupParameter.bSyncGPU, false); core->Get("FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false); core->Get("DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false); diff --git a/Source/Core/Core/CoreParameter.cpp b/Source/Core/Core/CoreParameter.cpp index 6172c05499..29bdd1808c 100644 --- a/Source/Core/Core/CoreParameter.cpp +++ b/Source/Core/Core/CoreParameter.cpp @@ -40,7 +40,7 @@ SCoreStartupParameter::SCoreStartupParameter() bDPL2Decoder(false), iLatency(14), bRunCompareServer(false), bRunCompareClient(false), bBAT(false), bMMU(false), bDCBZOFF(false), - iBBDumpPort(0), bVBeamSpeedHack(false), + iBBDumpPort(0), bSyncGPU(false), bFastDiscSpeed(false), SelectedLanguage(0), bWii(false), bConfirmStop(false), bHideCursor(false), @@ -78,7 +78,6 @@ void SCoreStartupParameter::LoadDefaults() bMMU = false; bDCBZOFF = false; iBBDumpPort = -1; - bVBeamSpeedHack = false; bSyncGPU = false; bFastDiscSpeed = false; bMergeBlocks = false; diff --git a/Source/Core/Core/CoreParameter.h b/Source/Core/Core/CoreParameter.h index 363a586b4e..2f7b07e2f4 100644 --- a/Source/Core/Core/CoreParameter.h +++ b/Source/Core/Core/CoreParameter.h @@ -185,7 +185,6 @@ struct SCoreStartupParameter bool bMMU; bool bDCBZOFF; int iBBDumpPort; - bool bVBeamSpeedHack; bool bSyncGPU; bool bFastDiscSpeed; diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index 55bbd56471..e0f18b7530 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -478,10 +478,7 @@ void UpdateParameters() int GetNumFields() { - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeamSpeedHack) - return (2 / fields); - else - return 1; + return 1; } unsigned int GetTicksPerLine() @@ -492,10 +489,7 @@ unsigned int GetTicksPerLine() } else { - if (SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeamSpeedHack) - return TicksPerFrame / s_lineCount; - else - return TicksPerFrame / (s_lineCount / (2 / fields)) ; + return TicksPerFrame / (s_lineCount / (2 / fields)) ; } } diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp index 02a6b1e3cc..53257973ef 100644 --- a/Source/Core/DolphinWX/ISOProperties.cpp +++ b/Source/Core/DolphinWX/ISOProperties.cpp @@ -410,8 +410,6 @@ void CISOProperties::CreateGUIControls(bool IsWad) DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled.")); FPRF = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable FPRF"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "FPRF")); FPRF->SetToolTip(_("Enables Floating Point Result Flag calculation, needed for a few games. (ON = Compatible, OFF = Fast)")); - VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("VBeam Speed Hack"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "VBeam")); - VBeam->SetToolTip(_("Doubles the emulated GPU clock rate. May speed up some games (ON = Fast, OFF = Compatible)")); SyncGPU = new wxCheckBox(m_GameConfig, ID_SYNCGPU, _("Synchronize GPU thread"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "SyncGPU")); SyncGPU->SetToolTip(_("Synchronizes the GPU and CPU threads to help prevent random freezes in Dual Core mode. (ON = Compatible, OFF = Fast)")); FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "FastDiscSpeed")); @@ -471,7 +469,6 @@ void CISOProperties::CreateGUIControls(bool IsWad) sbCoreOverrides->Add(MMU, 0, wxLEFT, 5); sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5); sbCoreOverrides->Add(FPRF, 0, wxLEFT, 5); - sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5); sbCoreOverrides->Add(SyncGPU, 0, wxLEFT, 5); sbCoreOverrides->Add(FastDiscSpeed, 0, wxLEFT, 5); sbCoreOverrides->Add(BlockMerging, 0, wxLEFT, 5); @@ -1063,7 +1060,6 @@ void CISOProperties::LoadGameConfig() SetCheckboxValueFromGameini("Core", "BAT", BAT); SetCheckboxValueFromGameini("Core", "DCBZ", DCBZOFF); SetCheckboxValueFromGameini("Core", "FPRF", FPRF); - SetCheckboxValueFromGameini("Core", "VBeam", VBeam); SetCheckboxValueFromGameini("Core", "SyncGPU", SyncGPU); SetCheckboxValueFromGameini("Core", "FastDiscSpeed", FastDiscSpeed); SetCheckboxValueFromGameini("Core", "BlockMerging", BlockMerging); @@ -1160,7 +1156,6 @@ bool CISOProperties::SaveGameConfig() SaveGameIniValueFrom3StateCheckbox("Core", "BAT", BAT); SaveGameIniValueFrom3StateCheckbox("Core", "DCBZ", DCBZOFF); SaveGameIniValueFrom3StateCheckbox("Core", "FPRF", FPRF); - SaveGameIniValueFrom3StateCheckbox("Core", "VBeam", VBeam); SaveGameIniValueFrom3StateCheckbox("Core", "SyncGPU", SyncGPU); SaveGameIniValueFrom3StateCheckbox("Core", "FastDiscSpeed", FastDiscSpeed); SaveGameIniValueFrom3StateCheckbox("Core", "BlockMerging", BlockMerging); diff --git a/Source/Core/DolphinWX/ISOProperties.h b/Source/Core/DolphinWX/ISOProperties.h index e31d0ca0bc..dfd202611b 100644 --- a/Source/Core/DolphinWX/ISOProperties.h +++ b/Source/Core/DolphinWX/ISOProperties.h @@ -70,7 +70,7 @@ private: // Core wxCheckBox *CPUThread, *SkipIdle, *MMU, *BAT, *DCBZOFF, *FPRF; - wxCheckBox *VBeam, *SyncGPU, *FastDiscSpeed, *BlockMerging, *DSPHLE; + wxCheckBox *SyncGPU, *FastDiscSpeed, *BlockMerging, *DSPHLE; wxArrayString arrayStringFor_GPUDeterminism; wxChoice* GPUDeterminism; @@ -136,7 +136,6 @@ private: ID_IDLESKIP, ID_MMU, ID_DCBZOFF, - ID_VBEAM, ID_SYNCGPU, ID_DISCSPEED, ID_MERGEBLOCKS, From 4cb01673a067360d8b42aa0093f2a7c01e532884 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Tue, 10 Feb 2015 00:40:50 +1300 Subject: [PATCH 2/2] Remove now useless NumFields Function which always returned 1. --- Source/Core/Core/HW/DSPHLE/DSPHLE.cpp | 3 +-- Source/Core/Core/HW/SystemTimers.cpp | 5 ++--- Source/Core/Core/HW/VideoInterface.cpp | 5 ----- Source/Core/Core/HW/VideoInterface.h | 2 -- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp index d73a749ccb..4e43156373 100644 --- a/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp +++ b/Source/Core/Core/HW/DSPHLE/DSPHLE.cpp @@ -75,9 +75,8 @@ void DSPHLE::DSP_Update(int cycles) u32 DSPHLE::DSP_UpdateRate() { // AX HLE uses 3ms (Wii) or 5ms (GC) timing period - int fields = VideoInterface::GetNumFields(); if (m_pUCode != nullptr) - return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs() / fields; + return (SystemTimers::GetTicksPerSecond() / 1000) * m_pUCode->GetUpdateMs(); else return SystemTimers::GetTicksPerSecond() / 1000; } diff --git a/Source/Core/Core/HW/SystemTimers.cpp b/Source/Core/Core/HW/SystemTimers.cpp index c907d3f1a1..af06de378e 100644 --- a/Source/Core/Core/HW/SystemTimers.cpp +++ b/Source/Core/Core/HW/SystemTimers.cpp @@ -114,8 +114,7 @@ static void DSPCallback(u64 userdata, int cyclesLate) static void AudioDMACallback(u64 userdata, int cyclesLate) { - int fields = VideoInterface::GetNumFields(); - int period = CPU_CORE_CLOCK / (AudioInterface::GetAIDSampleRate() * 4 / 32 * fields); + int period = CPU_CORE_CLOCK / (AudioInterface::GetAIDSampleRate() * 4 / 32); DSP::UpdateAudioDMA(); // Push audio to speakers. CoreTiming::ScheduleEvent(period - cyclesLate, et_AudioDMA); } @@ -242,7 +241,7 @@ void Init() // FYI, WII_IPC_HLE_Interface::Update is also called in WII_IPCInterface::Write32 const int freq = 1500; - IPC_HLE_PERIOD = GetTicksPerSecond() / (freq * VideoInterface::GetNumFields()); + IPC_HLE_PERIOD = GetTicksPerSecond() / freq; } // System internal sample rate is fixed at 32KHz * 4 (16bit Stereo) / 32 bytes DMA diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index e0f18b7530..49e29278a6 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -476,11 +476,6 @@ void UpdateParameters() } } -int GetNumFields() -{ - return 1; -} - unsigned int GetTicksPerLine() { if (s_lineCount == 0) diff --git a/Source/Core/Core/HW/VideoInterface.h b/Source/Core/Core/HW/VideoInterface.h index cf7e5ab83d..fda979facd 100644 --- a/Source/Core/Core/HW/VideoInterface.h +++ b/Source/Core/Core/HW/VideoInterface.h @@ -353,6 +353,4 @@ union UVIHorizontalStepping unsigned int GetTicksPerLine(); unsigned int GetTicksPerFrame(); - - int GetNumFields(); }