Added an option in the game properties to disable the VBeam speed hack. This option may fix games which currently have an unusual FPS rate. For example, this option fixes the crackly audio in Tales of Symphonia. Leave this option turned off unless you're noticing problems related to the FPS rate because it might slow down the emulator.

Removed the Alternate RFI option as it is no longer needed.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6888 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
skidau 2011-01-20 08:34:49 +00:00
parent 58cb35fe01
commit 12249296a1
10 changed files with 22 additions and 28 deletions

View File

@ -308,7 +308,7 @@ void SConfig::LoadSettings()
ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false); ini.Get("Core", "RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
ini.Get("Core", "MMU", &m_LocalCoreStartupParameter.bMMU, false); ini.Get("Core", "MMU", &m_LocalCoreStartupParameter.bMMU, false);
ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0); ini.Get("Core", "TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
ini.Get("Core", "AlternateRFI", &m_LocalCoreStartupParameter.bAlternateRFI, false); ini.Get("Core", "VBeam", &m_LocalCoreStartupParameter.bVBeam, false);
ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false); ini.Get("Core", "FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
ini.Get("Core", "BAT", &m_LocalCoreStartupParameter.bMMUBAT, false); ini.Get("Core", "BAT", &m_LocalCoreStartupParameter.bMMUBAT, false);
ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default ini.Get("Core", "FrameLimit", &m_Framelimit, 1); // auto frame limit by default

View File

@ -49,7 +49,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bEnableCheats(false), bEnableCheats(false),
bMergeBlocks(false), bMergeBlocks(false),
bRunCompareServer(false), bRunCompareClient(false), bRunCompareServer(false), bRunCompareClient(false),
bMMU(false), bMMUBAT(false), iTLBHack(0), bAlternateRFI(false), bMMU(false), bMMUBAT(false), iTLBHack(0), bVBeam(false),
bFastDiscSpeed(false), bFastDiscSpeed(false),
SelectedLanguage(0), bWii(false), SelectedLanguage(0), bWii(false),
bConfirmStop(false), bHideCursor(false), bConfirmStop(false), bHideCursor(false),
@ -77,7 +77,7 @@ void SCoreStartupParameter::LoadDefaults()
bMMU = false; bMMU = false;
bMMUBAT = false; bMMUBAT = false;
iTLBHack = 0; iTLBHack = 0;
bAlternateRFI = false; bVBeam = false;
bFastDiscSpeed = false; bFastDiscSpeed = false;
bMergeBlocks = false; bMergeBlocks = false;
SelectedLanguage = 0; SelectedLanguage = 0;

View File

@ -84,7 +84,7 @@ struct SCoreStartupParameter
bool bMMU; bool bMMU;
bool bMMUBAT; bool bMMUBAT;
int iTLBHack; int iTLBHack;
bool bAlternateRFI; bool bVBeam;
bool bFastDiscSpeed; bool bFastDiscSpeed;
int SelectedLanguage; int SelectedLanguage;

View File

@ -832,7 +832,7 @@ void Update()
} }
if (++m_VBeamPos > s_lineCount) if (++m_VBeamPos > s_lineCount)
m_VBeamPos = (NewVBeamPos > s_lineCount) ? 1 : NewVBeamPos; m_VBeamPos = (NewVBeamPos > s_lineCount || Core::g_CoreStartupParameter.bVBeam) ? 1 : NewVBeamPos;
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {

View File

@ -2800,7 +2800,7 @@ DEFINE_LUA_FUNCTION(emulua_loadrom, "filename")
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU); game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT); game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack); game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "AlternateRFI", &StartUp.bAlternateRFI, StartUp.bAlternateRFI); game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed); game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
// Wii settings // Wii settings
if (StartUp.bWii) if (StartUp.bWii)

View File

@ -70,10 +70,7 @@ void Jit64::rfi(UGeckoInstruction inst)
OR(32, M(&MSR), R(EAX)); OR(32, M(&MSR), R(EAX));
// NPC = SRR0; // NPC = SRR0;
MOV(32, R(EAX), M(&SRR0)); MOV(32, R(EAX), M(&SRR0));
if (Core::g_CoreStartupParameter.bAlternateRFI) WriteRfiExitDestInEAX();
WriteExitDestInEAX();
else
WriteRfiExitDestInEAX();
} }
void Jit64::bx(UGeckoInstruction inst) void Jit64::bx(UGeckoInstruction inst)

View File

@ -1859,10 +1859,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, bool UseProfile, bool Mak
Jit->MOV(32, M(&MSR), R(EAX)); Jit->MOV(32, M(&MSR), R(EAX));
// NPC = SRR0; // NPC = SRR0;
Jit->MOV(32, R(EAX), M(&SRR0)); Jit->MOV(32, R(EAX), M(&SRR0));
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bAlternateRFI) Jit->WriteRfiExitDestInOpArg(R(EAX));
Jit->WriteExitDestInOpArg(R(EAX));
else
Jit->WriteRfiExitDestInOpArg(R(EAX));
break; break;
} }
case FPExceptionCheckStart: { case FPExceptionCheckStart: {

View File

@ -68,7 +68,7 @@ namespace BootManager
struct ConfigCache struct ConfigCache
{ {
bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT, bool valid, bCPUThread, bSkipIdle, bEnableFPRF, bMMU, bMMUBAT,
bAlternateRFI, bFastDiscSpeed, bMergeBlocks; bVBeam, bFastDiscSpeed, bMergeBlocks;
int iTLBHack; int iTLBHack;
}; };
static ConfigCache config_cache; static ConfigCache config_cache;
@ -119,7 +119,7 @@ bool BootCore(const std::string& _rFilename)
config_cache.bMMU = StartUp.bMMU; config_cache.bMMU = StartUp.bMMU;
config_cache.bMMUBAT = StartUp.bMMUBAT; config_cache.bMMUBAT = StartUp.bMMUBAT;
config_cache.iTLBHack = StartUp.iTLBHack; config_cache.iTLBHack = StartUp.iTLBHack;
config_cache.bAlternateRFI = StartUp.bAlternateRFI; config_cache.bVBeam = StartUp.bVBeam;
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed; config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
config_cache.bMergeBlocks = StartUp.bMergeBlocks; config_cache.bMergeBlocks = StartUp.bMergeBlocks;
// General settings // General settings
@ -129,7 +129,7 @@ bool BootCore(const std::string& _rFilename)
game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU); game_ini.Get("Core", "MMU", &StartUp.bMMU, StartUp.bMMU);
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT); game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack); game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
game_ini.Get("Core", "AlternateRFI", &StartUp.bAlternateRFI, StartUp.bAlternateRFI); game_ini.Get("Core", "VBeam", &StartUp.bVBeam, StartUp.bVBeam);
game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed); game_ini.Get("Core", "FastDiscSpeed", &StartUp.bFastDiscSpeed, StartUp.bFastDiscSpeed);
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks); game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
// Wii settings // Wii settings
@ -180,7 +180,7 @@ void Stop()
StartUp.bMMU = config_cache.bMMU; StartUp.bMMU = config_cache.bMMU;
StartUp.bMMUBAT = config_cache.bMMUBAT; StartUp.bMMUBAT = config_cache.bMMUBAT;
StartUp.iTLBHack = config_cache.iTLBHack; StartUp.iTLBHack = config_cache.iTLBHack;
StartUp.bAlternateRFI = config_cache.bAlternateRFI; StartUp.bVBeam = config_cache.bVBeam;
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed; StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
StartUp.bMergeBlocks = config_cache.bMergeBlocks; StartUp.bMergeBlocks = config_cache.bMergeBlocks;
} }

View File

@ -310,8 +310,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
MMUBAT->SetToolTip(_("Enables Block Address Translation (BAT); a function of the Memory Management Unit. Accurate to the hardware, but slow to emulate. (ON = Compatible, OFF = Fast)")); MMUBAT->SetToolTip(_("Enables Block Address Translation (BAT); a function of the Memory Management Unit. Accurate to the hardware, but slow to emulate. (ON = Compatible, OFF = Fast)"));
TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game.")); TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game."));
AlternateRFI = new wxCheckBox(m_GameConfig, ID_RFI, _("Alternate RFI"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); VBeam = new wxCheckBox(m_GameConfig, ID_RFI, _("Disable VBeam Speed Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
AlternateRFI->SetToolTip(_("If a game hangs, works only in the Interpreter or Dolphin crashes, this option may fix the game.")); VBeam->SetToolTip(_("If the FPS is erratic, this option may help. (ON = Compatible, OFF = Fast)"));
FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); FastDiscSpeed = new wxCheckBox(m_GameConfig, ID_DISCSPEED, _("Speed up Disc Transfer Rate"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
FastDiscSpeed->SetToolTip(_("Enable fast disc access. Needed for a few games. (ON = Fast, OFF = Compatible)")); FastDiscSpeed->SetToolTip(_("Enable fast disc access. Needed for a few games. (ON = Fast, OFF = Compatible)"));
BlockMerging = new wxCheckBox(m_GameConfig, ID_MERGEBLOCKS, _("Enable Block Merging"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); BlockMerging = new wxCheckBox(m_GameConfig, ID_MERGEBLOCKS, _("Enable Block Merging"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
@ -375,7 +375,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(MMU, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(MMU, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(MMUBAT, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(MMUBAT, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(AlternateRFI, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(VBeam, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(FastDiscSpeed, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(FastDiscSpeed, 0, wxEXPAND|wxLEFT, 5);
sbCoreOverrides->Add(BlockMerging, 0, wxEXPAND|wxLEFT, 5); sbCoreOverrides->Add(BlockMerging, 0, wxEXPAND|wxLEFT, 5);
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5); sbWiiOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5);
@ -843,10 +843,10 @@ void CISOProperties::LoadGameConfig()
else else
TLBHack->Set3StateValue(wxCHK_UNDETERMINED); TLBHack->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "AlternateRFI", &bTemp)) if (GameIni.Get("Core", "VBeam", &bTemp))
AlternateRFI->Set3StateValue((wxCheckBoxState)bTemp); VBeam->Set3StateValue((wxCheckBoxState)bTemp);
else else
AlternateRFI->Set3StateValue(wxCHK_UNDETERMINED); VBeam->Set3StateValue(wxCHK_UNDETERMINED);
if (GameIni.Get("Core", "FastDiscSpeed", &bTemp)) if (GameIni.Get("Core", "FastDiscSpeed", &bTemp))
FastDiscSpeed->Set3StateValue((wxCheckBoxState)bTemp); FastDiscSpeed->Set3StateValue((wxCheckBoxState)bTemp);
@ -959,10 +959,10 @@ bool CISOProperties::SaveGameConfig()
else else
GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue()); GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue());
if (AlternateRFI->Get3StateValue() == wxCHK_UNDETERMINED) if (VBeam->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "AlternateRFI"); GameIni.DeleteKey("Core", "VBeam");
else else
GameIni.Set("Core", "AlternateRFI", AlternateRFI->Get3StateValue()); GameIni.Set("Core", "VBeam", VBeam->Get3StateValue());
if (FastDiscSpeed->Get3StateValue() == wxCHK_UNDETERMINED) if (FastDiscSpeed->Get3StateValue() == wxCHK_UNDETERMINED)
GameIni.DeleteKey("Core", "FastDiscSpeed"); GameIni.DeleteKey("Core", "FastDiscSpeed");

View File

@ -85,7 +85,7 @@ class CISOProperties : public wxDialog
wxStaticText *OverrideText; wxStaticText *OverrideText;
// Core // Core
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack; wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
wxCheckBox *AlternateRFI, *FastDiscSpeed, *BlockMerging; wxCheckBox *VBeam, *FastDiscSpeed, *BlockMerging;
// Wii // Wii
wxCheckBox *EnableProgressiveScan, *EnableWideScreen; wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
// Video // Video