This commit addresses the Hyrule field slowdown issue in Zelda: Twilight Princess, as discussed in Xtreme2damax's thread: http://forums.dolphin-emu.com/thread-10638.html. It can be activated in the DX9, DX11, and OpenGL plugin GUI's. Enabling the hack while playing other games besides ZTP will likely have either an undesirable or no(more likely) effect.

The code changes disable the usual pipeline flush for certain BP Writes that occur while the minimap is being drawn in Zelda: twilight princess. This significantly increases speed while in hyrule field. The way this is accomplished is described more in depth on page 42 of Xtreme's thread. Big thanks to Xtreme for doing a great job hosting that thread, and Kiesel-stein for initial work on the hack

Also, I used the resource editor in Visual studio to generate the GUI code for the DX11 plugin, and some code appeared to be removed, although the behavior of the GUI did not seem to change. Hopefully someone more experienced with resource files (forms?) can double check that no code was damaged


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6057 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Fircrestsk8
2010-08-05 03:24:13 +00:00
parent 9e4ff175ec
commit 040a6e1eb3
10 changed files with 86 additions and 72 deletions

View File

@ -68,6 +68,7 @@ BEGIN_EVENT_TABLE(GFXConfigDialogOGL,wxDialog)
EVT_CHECKBOX(ID_DISABLEFOG, GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_OSDHOTKEY, GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_HACK, GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_ZTPSPEEDHACK, GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_CHECKBOX(ID_SAFETEXTURECACHE,GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_SAFE, GFXConfigDialogOGL::AdvancedSettingsChanged)
EVT_RADIOBUTTON(ID_RADIO_SAFETEXTURECACHE_NORMAL, GFXConfigDialogOGL::AdvancedSettingsChanged)
@ -204,6 +205,7 @@ void GFXConfigDialogOGL::InitializeGUIValues()
m_WidescreenHack->SetValue(g_Config.bWidescreenHack);
m_UseNativeMips->SetValue(g_Config.bUseNativeMips);
m_EFBScaledCopy->SetValue(g_Config.bCopyEFBScaled);
m_ZTPSpeedHack->SetValue(g_Config.bZTPSpeedHack);
// Enhancements
m_MaxAnisotropyCB->SetSelection(g_Config.iMaxAnisotropy - 1);
m_ForceFiltering->SetValue(g_Config.bForceFiltering);
@ -291,7 +293,7 @@ void GFXConfigDialogOGL::InitializeGUITooltips()
wxT(" But it may also cause graphical errors and missing graphics."));
m_Radio_CopyEFBToRAM->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
m_Radio_CopyEFBToGL->SetToolTip(wxT("[This option will apply immediately and does not require a restart to take effect.]"));
m_ZTPSpeedHack->SetToolTip(wxT("Speeds up Hyrule Field in Zelda: Twilight Princess"));
// Utility
#ifdef _WIN32
m_DumpFrames->SetToolTip(
@ -468,6 +470,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
m_Radio_SafeTextureCache_Safe = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_SAFE, wxT("Safe"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP);
m_Radio_SafeTextureCache_Normal = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_NORMAL, wxT("Normal"));
m_Radio_SafeTextureCache_Fast = new wxRadioButton(m_PageAdvanced, ID_RADIO_SAFETEXTURECACHE_FAST, wxT("Fast"));
m_ZTPSpeedHack = new wxCheckBox( m_PageAdvanced, ID_ZTPSPEEDHACK, wxT("ZTP Speed-Up Hack"), wxDefaultPosition, wxDefaultSize, 0 );
// Sizers
sHacks->Add(m_PhackvalueCB, 0, wxTOP, 0);
@ -478,6 +481,7 @@ void GFXConfigDialogOGL::CreateGUIControls()
sbHacks->Add(m_Radio_SafeTextureCache_Normal, 0, wxALL, 5);
sbHacks->Add(m_Radio_SafeTextureCache_Fast, 0, wxALL, 5);
sHacks->Add(sbHacks, 0, wxEXPAND | (wxTOP), 5);
sHacks->Add(m_ZTPSpeedHack, 0, wxEXPAND | (wxTOP), 0);
// Sizers
sAdvanced = new wxBoxSizer(wxVERTICAL);
@ -704,6 +708,9 @@ void GFXConfigDialogOGL::AdvancedSettingsChanged(wxCommandEvent& event)
g_Config.bOSDHotKey = m_OSDHotKey->IsChecked();
break;
// Hacks
case ID_ZTPSPEEDHACK:
g_Config.bZTPSpeedHack = m_ZTPSpeedHack->IsChecked();
break;
case ID_SAFETEXTURECACHE:
g_Config.bSafeTextureCache = m_SafeTextureCache->IsChecked();
break;