Merge pull request #2025 from phire/be-neobrain

Remove VBeam Speed Hack.
This commit is contained in:
Markus Wick 2015-02-09 12:55:58 +01:00
commit 2aef84d80c
10 changed files with 7 additions and 34 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -185,7 +185,6 @@ struct SCoreStartupParameter
bool bMMU;
bool bDCBZOFF;
int iBBDumpPort;
bool bVBeamSpeedHack;
bool bSyncGPU;
bool bFastDiscSpeed;

View File

@ -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;
}

View File

@ -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

View File

@ -476,14 +476,6 @@ void UpdateParameters()
}
}
int GetNumFields()
{
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bVBeamSpeedHack)
return (2 / fields);
else
return 1;
}
unsigned int GetTicksPerLine()
{
if (s_lineCount == 0)
@ -492,10 +484,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)) ;
}
}

View File

@ -353,6 +353,4 @@ union UVIHorizontalStepping
unsigned int GetTicksPerLine();
unsigned int GetTicksPerFrame();
int GetNumFields();
}

View File

@ -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);

View File

@ -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,