Added options to enable/disable Block Merging and DList Cache into game specific settings.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6203 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4ec8f97154
commit
412ce56f83
|
@ -48,6 +48,7 @@ SCoreStartupParameter::SCoreStartupParameter()
|
|||
bEnableCheats(false),
|
||||
bRunCompareServer(false), bRunCompareClient(false),
|
||||
bMMU(false), bMMUBAT(false), iTLBHack(0), bAlternateRFI(false),
|
||||
bMergeBlocks(false),
|
||||
SelectedLanguage(0), bWii(false),
|
||||
bConfirmStop(false), bHideCursor(false),
|
||||
bAutoHideCursor(false), bUsePanicHandlers(true),
|
||||
|
@ -74,6 +75,7 @@ void SCoreStartupParameter::LoadDefaults()
|
|||
bMMUBAT = false;
|
||||
iTLBHack = 0;
|
||||
bAlternateRFI = false;
|
||||
bMergeBlocks = false;
|
||||
SelectedLanguage = 0;
|
||||
bWii = false;
|
||||
|
||||
|
|
|
@ -74,6 +74,7 @@ struct SCoreStartupParameter
|
|||
bool bUseFastMem;
|
||||
bool bLockThreads;
|
||||
bool bEnableCheats;
|
||||
bool bMergeBlocks;
|
||||
|
||||
bool bRunCompareServer;
|
||||
bool bRunCompareClient;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "PPCSymbolDB.h"
|
||||
#include "SignatureDB.h"
|
||||
#include "PPCAnalyst.h"
|
||||
#include "../ConfigManager.h"
|
||||
|
||||
// Analyzes PowerPC code in memory to find functions
|
||||
// After running, for each function we will know what functions it calls
|
||||
|
@ -454,6 +455,10 @@ u32 Flatten(u32 address, int *realsize, BlockStats *st, BlockRegStats *gpa, Bloc
|
|||
if (numFollows > FUNCTION_FOLLOWING_THRESHOLD)
|
||||
follow = false;
|
||||
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMergeBlocks) {
|
||||
follow = false;
|
||||
}
|
||||
|
||||
if (!follow)
|
||||
{
|
||||
if (opinfo->flags & FL_ENDBLOCK) //right now we stop early
|
||||
|
|
|
@ -110,6 +110,7 @@ bool BootCore(const std::string& _rFilename)
|
|||
game_ini.Get("Core", "BAT", &StartUp.bMMUBAT, StartUp.bMMUBAT);
|
||||
game_ini.Get("Core", "TLBHack", &StartUp.iTLBHack, StartUp.iTLBHack);
|
||||
game_ini.Get("Core", "AlternateRFI", &StartUp.bAlternateRFI, StartUp.bAlternateRFI);
|
||||
game_ini.Get("Core", "BlockMerging", &StartUp.bMergeBlocks, StartUp.bMergeBlocks);
|
||||
// Wii settings
|
||||
if (StartUp.bWii)
|
||||
{
|
||||
|
|
|
@ -298,6 +298,8 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
TLBHack->SetToolTip(wxT("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);
|
||||
AlternateRFI->SetToolTip(wxT("If a game hangs, works only in the Interpreter or Dolphin crashes, this option may fix the game."));
|
||||
BlockMerging = new wxCheckBox(m_GameConfig, ID_MERGEBLOCKS, _("Enable Block Merging"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
|
||||
// Wii Console
|
||||
sbWiiOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Wii Console"));
|
||||
EnableProgressiveScan = new wxCheckBox(m_GameConfig, ID_ENABLEPROGRESSIVESCAN, _("Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
|
@ -325,6 +327,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
UseXFB = new wxCheckBox(m_GameConfig, ID_USEXFB, _("Use XFB"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
UseZTPSpeedupHack = new wxCheckBox(m_GameConfig, ID_ZTP_SPEEDUP, _("ZTP hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
UseZTPSpeedupHack->SetToolTip(wxT("Enable this to speed up The Legend of Zelda: Twilight Princess. Disable for ANY other game."));
|
||||
DListCache = new wxCheckBox(m_GameConfig, ID_DLISTCACHE, _("DList Cache"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator);
|
||||
// Hack
|
||||
Hacktext = new wxStaticText(m_GameConfig, ID_HACK_TEXT, _("Projection Hack for: "), wxDefaultPosition, wxDefaultSize);
|
||||
arrayStringFor_Hack.Add(_("None"));
|
||||
|
@ -359,6 +362,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
sbCoreOverrides->Add(MMUBAT, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbCoreOverrides->Add(AlternateRFI, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbCoreOverrides->Add(BlockMerging, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbWiiOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbWiiOverrides->Add(EnableWideScreen, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(ForceFiltering, 0, wxEXPAND|wxLEFT, 5);
|
||||
|
@ -368,6 +372,7 @@ void CISOProperties::CreateGUIControls(bool IsWad)
|
|||
sbVideoOverrides->Add(DstAlphaPass, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(UseXFB, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(UseZTPSpeedupHack, 0, wxEXPAND|wxLEFT, 5);
|
||||
sbVideoOverrides->Add(DListCache, 0, wxEXPAND|wxLEFT, 5);
|
||||
|
||||
wxFlexGridSizer* fifosizer = new wxFlexGridSizer(2, 2, 0, 0);
|
||||
fifosizer->Add(Hacktext, 0, wxLEFT, 5);
|
||||
|
@ -842,6 +847,11 @@ void CISOProperties::LoadGameConfig()
|
|||
else
|
||||
AlternateRFI->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Core", "BlockMerging", &bTemp))
|
||||
BlockMerging->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
BlockMerging->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Wii", "ProgressiveScan", &bTemp))
|
||||
EnableProgressiveScan->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
|
@ -887,6 +897,11 @@ void CISOProperties::LoadGameConfig()
|
|||
else
|
||||
UseZTPSpeedupHack->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Video", "DlistCachingEnable", &bTemp))
|
||||
DListCache->Set3StateValue((wxCheckBoxState)bTemp);
|
||||
else
|
||||
DListCache->Set3StateValue(wxCHK_UNDETERMINED);
|
||||
|
||||
if (GameIni.Get("Video", "FIFOWatermarkTightness", &sTemp))
|
||||
WMTightness->SetValue(wxString(sTemp.c_str(), *wxConvCurrent));
|
||||
else
|
||||
|
@ -943,6 +958,11 @@ bool CISOProperties::SaveGameConfig()
|
|||
else
|
||||
GameIni.Set("Core", "AlternateRFI", AlternateRFI->Get3StateValue());
|
||||
|
||||
if (BlockMerging->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Core", "BlockMerging");
|
||||
else
|
||||
GameIni.Set("Core", "BlockMerging", BlockMerging->Get3StateValue());
|
||||
|
||||
if (EnableProgressiveScan->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Wii", "ProgressiveScan");
|
||||
else
|
||||
|
@ -988,6 +1008,11 @@ bool CISOProperties::SaveGameConfig()
|
|||
else
|
||||
GameIni.Set("Video", "ZTPSpeedupHack", UseZTPSpeedupHack->Get3StateValue());
|
||||
|
||||
if (DListCache->Get3StateValue() == wxCHK_UNDETERMINED)
|
||||
GameIni.DeleteKey("Video", "DlistCachingEnable");
|
||||
else
|
||||
GameIni.Set("Video", "DlistCachingEnable", DListCache->Get3StateValue());
|
||||
|
||||
if (Hack->GetSelection() == -1)
|
||||
GameIni.DeleteKey("Video", "ProjectionHack");
|
||||
else
|
||||
|
|
|
@ -85,13 +85,14 @@ class CISOProperties : public wxDialog
|
|||
wxStaticText *OverrideText;
|
||||
// Core
|
||||
wxCheckBox *CPUThread, *SkipIdle, *MMU, *MMUBAT, *TLBHack;
|
||||
wxCheckBox *AlternateRFI;
|
||||
wxCheckBox *AlternateRFI, *BlockMerging;
|
||||
// Wii
|
||||
wxCheckBox *EnableProgressiveScan, *EnableWideScreen;
|
||||
// Video
|
||||
wxCheckBox *ForceFiltering,
|
||||
*EFBCopyDisable, *EFBToTextureEnable,
|
||||
*SafeTextureCache, *DstAlphaPass, *UseXFB, *UseZTPSpeedupHack;
|
||||
*SafeTextureCache, *DstAlphaPass, *UseXFB, *UseZTPSpeedupHack,
|
||||
*DListCache;
|
||||
wxStaticText *Hacktext;
|
||||
wxArrayString arrayStringFor_Hack;
|
||||
wxChoice *Hack;
|
||||
|
@ -169,6 +170,7 @@ class CISOProperties : public wxDialog
|
|||
ID_MMUBAT,
|
||||
ID_TLBHACK,
|
||||
ID_RFI,
|
||||
ID_MERGEBLOCKS,
|
||||
ID_FORCEFILTERING,
|
||||
ID_EFBCOPYDISABLE,
|
||||
ID_EFBTOTEXTUREENABLE,
|
||||
|
@ -176,6 +178,7 @@ class CISOProperties : public wxDialog
|
|||
ID_DSTALPHAPASS,
|
||||
ID_USEXFB,
|
||||
ID_ZTP_SPEEDUP,
|
||||
ID_DLISTCACHE,
|
||||
ID_HACK_TEXT,
|
||||
ID_HACK,
|
||||
ID_WMTIGHTNESS_TEXT,
|
||||
|
|
|
@ -151,6 +151,8 @@ void VideoConfig::GameIniLoad(const char *ini_file)
|
|||
iniFile.Get("Video", "UseNativeMips", &bUseNativeMips);
|
||||
if (iniFile.Exists("Video", "ZTPSpeedupHack"))
|
||||
iniFile.Get("Video", "ZTPSpeedupHack", &bZTPSpeedHack);
|
||||
if (iniFile.Exists("Video", "DlistCachingEnable"))
|
||||
iniFile.Get("Video", "DlistCachingEnable", &bDlistCachingEnable);
|
||||
}
|
||||
|
||||
void VideoConfig::Save(const char *ini_file)
|
||||
|
|
Loading…
Reference in New Issue