summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorcomex <comexk@gmail.com>2014-10-14 01:08:20 -0400
committercomex <comexk@gmail.com>2014-10-14 01:08:20 -0400
commit47faf7c4fd78f73734fe42bd31d0e2a91cc508b8 (patch)
tree90c33e99aa600e5483d8eaca88310253f1172bb4 /Source
parent89fb096ef3abb29239fd6c96f0d9c2dc5858b3af (diff)
parent8738b1879c993658181d90bbf2dc2f4622e304bf (diff)
Merge branch 'Remove-MMU-Speed-Hack-option' of https://github.com/skidau/dolphin into skidau-Remove-MMU-Speed-Hack-option
Conflicts: Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/BootManager.cpp5
-rw-r--r--Source/Core/Core/ConfigManager.cpp1
-rw-r--r--Source/Core/Core/CoreParameter.cpp3
-rw-r--r--Source/Core/Core/CoreParameter.h1
-rw-r--r--Source/Core/Core/HW/Memmap.cpp5
-rw-r--r--Source/Core/Core/HW/MemmapFunctions.cpp1
-rw-r--r--Source/Core/Core/PowerPC/Jit64/JitAsm.cpp39
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp5
-rw-r--r--Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp13
-rw-r--r--Source/Core/Core/PowerPC/JitInterface.cpp2
-rw-r--r--Source/Core/DolphinWX/Debugger/MemoryWindow.cpp2
-rw-r--r--Source/Core/DolphinWX/ISOProperties.cpp5
-rw-r--r--Source/Core/DolphinWX/ISOProperties.h3
13 files changed, 29 insertions, 56 deletions
diff --git a/Source/Core/Core/BootManager.cpp b/Source/Core/Core/BootManager.cpp
index bfea949301..e6d14c28f7 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, bEnableFPRF, bMMU, bDCBZOFF, m_EnableJIT, bDSPThread,
- bVBeamSpeedHack, bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bTLBHack, bProgressive;
+ bVBeamSpeedHack, bSyncGPU, bFastDiscSpeed, bMergeBlocks, bDSPHLE, bHLE_BS2, bProgressive;
int iCPUCore, Volume;
int iWiimoteSource[MAX_BBMOTES];
SIDevices Pads[MAX_SI_CHANNELS];
@@ -116,7 +116,6 @@ bool BootCore(const std::string& _rFilename)
config_cache.bEnableFPRF = StartUp.bEnableFPRF;
config_cache.bMMU = StartUp.bMMU;
config_cache.bDCBZOFF = StartUp.bDCBZOFF;
- config_cache.bTLBHack = StartUp.bTLBHack;
config_cache.bVBeamSpeedHack = StartUp.bVBeamSpeedHack;
config_cache.bSyncGPU = StartUp.bSyncGPU;
config_cache.bFastDiscSpeed = StartUp.bFastDiscSpeed;
@@ -158,7 +157,6 @@ bool BootCore(const std::string& _rFilename)
core_section->Get("SkipIdle", &StartUp.bSkipIdle, StartUp.bSkipIdle);
core_section->Get("EnableFPRF", &StartUp.bEnableFPRF, StartUp.bEnableFPRF);
core_section->Get("MMU", &StartUp.bMMU, StartUp.bMMU);
- core_section->Get("TLBHack", &StartUp.bTLBHack, StartUp.bTLBHack);
core_section->Get("DCBZ", &StartUp.bDCBZOFF, StartUp.bDCBZOFF);
core_section->Get("VBeam", &StartUp.bVBeamSpeedHack, StartUp.bVBeamSpeedHack);
core_section->Get("SyncGPU", &StartUp.bSyncGPU, StartUp.bSyncGPU);
@@ -286,7 +284,6 @@ void Stop()
StartUp.bEnableFPRF = config_cache.bEnableFPRF;
StartUp.bMMU = config_cache.bMMU;
StartUp.bDCBZOFF = config_cache.bDCBZOFF;
- StartUp.bTLBHack = config_cache.bTLBHack;
StartUp.bVBeamSpeedHack = config_cache.bVBeamSpeedHack;
StartUp.bSyncGPU = config_cache.bSyncGPU;
StartUp.bFastDiscSpeed = config_cache.bFastDiscSpeed;
diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp
index 3272f7a3b4..a1058546ce 100644
--- a/Source/Core/Core/ConfigManager.cpp
+++ b/Source/Core/Core/ConfigManager.cpp
@@ -536,7 +536,6 @@ void SConfig::LoadCoreSettings(IniFile& ini)
core->Get("RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
core->Get("RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
core->Get("MMU", &m_LocalCoreStartupParameter.bMMU, false);
- core->Get("TLBHack", &m_LocalCoreStartupParameter.bTLBHack, false);
core->Get("BBDumpPort", &m_LocalCoreStartupParameter.iBBDumpPort, -1);
core->Get("VBeam", &m_LocalCoreStartupParameter.bVBeamSpeedHack, false);
core->Get("SyncGPU", &m_LocalCoreStartupParameter.bSyncGPU, false);
diff --git a/Source/Core/Core/CoreParameter.cpp b/Source/Core/Core/CoreParameter.cpp
index ff5daa783c..299c26219d 100644
--- a/Source/Core/Core/CoreParameter.cpp
+++ b/Source/Core/Core/CoreParameter.cpp
@@ -39,7 +39,7 @@ SCoreStartupParameter::SCoreStartupParameter()
bMergeBlocks(false), bEnableMemcardSaving(true),
bDPL2Decoder(false), iLatency(14),
bRunCompareServer(false), bRunCompareClient(false),
- bMMU(false), bDCBZOFF(false), bTLBHack(false), iBBDumpPort(0), bVBeamSpeedHack(false),
+ bMMU(false), bDCBZOFF(false), iBBDumpPort(0), bVBeamSpeedHack(false),
bSyncGPU(false), bFastDiscSpeed(false),
SelectedLanguage(0), bWii(false),
bConfirmStop(false), bHideCursor(false),
@@ -75,7 +75,6 @@ void SCoreStartupParameter::LoadDefaults()
bEnableFPRF = false;
bMMU = false;
bDCBZOFF = false;
- bTLBHack = false;
iBBDumpPort = -1;
bVBeamSpeedHack = false;
bSyncGPU = false;
diff --git a/Source/Core/Core/CoreParameter.h b/Source/Core/Core/CoreParameter.h
index bdf979e0dd..23376c9799 100644
--- a/Source/Core/Core/CoreParameter.h
+++ b/Source/Core/Core/CoreParameter.h
@@ -162,7 +162,6 @@ struct SCoreStartupParameter
bool bMMU;
bool bDCBZOFF;
- bool bTLBHack;
int iBBDumpPort;
bool bVBeamSpeedHack;
bool bSyncGPU;
diff --git a/Source/Core/Core/HW/Memmap.cpp b/Source/Core/Core/HW/Memmap.cpp
index e1b1548c40..5d7b96d60d 100644
--- a/Source/Core/Core/HW/Memmap.cpp
+++ b/Source/Core/Core/HW/Memmap.cpp
@@ -43,8 +43,7 @@ namespace Memory
// LOCAL SETTINGS
// ----------------
-/* Enable the Translation Lookaside Buffer functions. TLBHack = 1 in Dolphin.ini or a
- <GameID>.ini file will set this to true */
+// Enable the Translation Lookaside Buffer functions.
bool bFakeVMEM = false;
static bool bMMU = false;
// ==============
@@ -143,8 +142,8 @@ static const int num_views = sizeof(views) / sizeof(MemoryView);
void Init()
{
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
- bFakeVMEM = SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack == true;
bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
+ bFakeVMEM = !bMMU;
u32 flags = 0;
if (wii) flags |= MV_WII_ONLY;
diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp
index b2005670f7..2bc24586b9 100644
--- a/Source/Core/Core/HW/MemmapFunctions.cpp
+++ b/Source/Core/Core/HW/MemmapFunctions.cpp
@@ -305,7 +305,6 @@ u32 Read_Opcode(u32 _Address)
}
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU &&
- !SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack &&
(_Address & ADDR_MASK_MEM1))
{
// TODO: Check for MSR instruction address translation flag before translating
diff --git a/Source/Core/Core/PowerPC/Jit64/JitAsm.cpp b/Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
index 7831f734e0..d895ae76db 100644
--- a/Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/JitAsm.cpp
@@ -91,33 +91,23 @@ void Jit64AsmRoutineManager::Generate()
FixupBranch exit_vmem;
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
mask = JIT_ICACHE_EXRAM_BIT;
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- mask |= JIT_ICACHE_VMEM_BIT;
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- {
- TEST(32, R(RSCRATCH), Imm32(mask));
- no_mem = J_CC(CC_NZ);
- }
+ mask |= JIT_ICACHE_VMEM_BIT;
+ TEST(32, R(RSCRATCH), Imm32(mask));
+ no_mem = J_CC(CC_NZ);
AND(32, R(RSCRATCH), Imm32(JIT_ICACHE_MASK));
MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCache.data()));
MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- {
- exit_mem = J();
- SetJumpTarget(no_mem);
- }
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- {
- TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_VMEM_BIT));
- FixupBranch no_vmem = J_CC(CC_Z);
- AND(32, R(RSCRATCH), Imm32(JIT_ICACHE_MASK));
- MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCacheVMEM.data()));
- MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
+ exit_mem = J();
+ SetJumpTarget(no_mem);
+ TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_VMEM_BIT));
+ FixupBranch no_vmem = J_CC(CC_Z);
+ AND(32, R(RSCRATCH), Imm32(JIT_ICACHE_MASK));
+ MOV(64, R(RSCRATCH2), Imm64((u64)jit->GetBlockCache()->iCacheVMEM.data()));
+ MOV(32, R(RSCRATCH), MComplex(RSCRATCH2, RSCRATCH, SCALE_1, 0));
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) exit_vmem = J();
- SetJumpTarget(no_vmem);
- }
+ if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) exit_vmem = J();
+ SetJumpTarget(no_vmem);
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
{
TEST(32, R(RSCRATCH), Imm32(JIT_ICACHE_EXRAM_BIT));
@@ -128,9 +118,8 @@ void Jit64AsmRoutineManager::Generate()
SetJumpTarget(no_exram);
}
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- SetJumpTarget(exit_mem);
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii && (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack))
+ SetJumpTarget(exit_mem);
+ if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
SetJumpTarget(exit_vmem);
TEST(32, R(RSCRATCH), R(RSCRATCH));
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
index 9680a8439d..a2abade26b 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStore.cpp
@@ -294,8 +294,9 @@ void Jit64::dcbz(UGeckoInstruction inst)
int b = inst.RB;
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- mem_mask |= Memory::ADDR_MASK_MEM1;
+
+ // The following masks the region used by the GC/Wii virtual memory lib
+ mem_mask |= Memory::ADDR_MASK_MEM1;
MOV(32, R(RSCRATCH), gpr.R(b));
if (a)
diff --git a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp
index 45f37b6889..0e9853948a 100644
--- a/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp
+++ b/Source/Core/Core/PowerPC/JitCommon/Jit_Util.cpp
@@ -312,10 +312,9 @@ void EmuCodeBlock::SafeLoadToReg(X64Reg reg_value, const Gen::OpArg & opAddress,
else
{
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- {
- mem_mask |= Memory::ADDR_MASK_MEM1;
- }
+
+ // The following masks the region used by the GC/Wii virtual memory lib
+ mem_mask |= Memory::ADDR_MASK_MEM1;
#ifdef ENABLE_MEM_CHECK
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
@@ -517,10 +516,8 @@ void EmuCodeBlock::SafeWriteRegToReg(OpArg reg_value, X64Reg reg_addr, int acces
u32 mem_mask = Memory::ADDR_MASK_HW_ACCESS;
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU || SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack)
- {
- mem_mask |= Memory::ADDR_MASK_MEM1;
- }
+ // The following masks the region used by the GC/Wii virtual memory lib
+ mem_mask |= Memory::ADDR_MASK_MEM1;
#ifdef ENABLE_MEM_CHECK
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableDebugging)
diff --git a/Source/Core/Core/PowerPC/JitInterface.cpp b/Source/Core/Core/PowerPC/JitInterface.cpp
index 6a598a736a..c2a3114804 100644
--- a/Source/Core/Core/PowerPC/JitInterface.cpp
+++ b/Source/Core/Core/PowerPC/JitInterface.cpp
@@ -46,8 +46,8 @@ namespace JitInterface
}
CPUCoreBase *InitJitCore(int core)
{
- bFakeVMEM = SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack == true;
bMMU = SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU;
+ bFakeVMEM = !bMMU;
CPUCoreBase *ptr = nullptr;
switch (core)
diff --git a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
index 73dead18d1..60978b6693 100644
--- a/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/MemoryWindow.cpp
@@ -102,7 +102,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
sizerRight->Add(new wxButton(this, IDM_DUMP_MEMORY, _("&Dump MRAM")));
sizerRight->Add(new wxButton(this, IDM_DUMP_MEM2, _("&Dump EXRAM")));
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bTLBHack == true)
+ if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
sizerRight->Add(new wxButton(this, IDM_DUMP_FAKEVMEM, _("&Dump FakeVMEM")));
wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
diff --git a/Source/Core/DolphinWX/ISOProperties.cpp b/Source/Core/DolphinWX/ISOProperties.cpp
index e2bb1710b7..9f64c00159 100644
--- a/Source/Core/DolphinWX/ISOProperties.cpp
+++ b/Source/Core/DolphinWX/ISOProperties.cpp
@@ -389,8 +389,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "SkipIdle"));
MMU = new wxCheckBox(m_GameConfig, ID_MMU, _("Enable MMU"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "MMU"));
MMU->SetToolTip(_("Enables the Memory Management Unit, needed for some games. (ON = Compatible, OFF = Fast)"));
- TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("MMU Speed Hack"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "TLBHack"));
- TLBHack->SetToolTip(_("Fast version of the MMU. Does not work for every game."));
DCBZOFF = new wxCheckBox(m_GameConfig, ID_DCBZOFF, _("Skip DCBZ clearing"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "DCBZ"));
DCBZOFF->SetToolTip(_("Bypass the clearing of the data cache by the DCBZ instruction. Usually leave this option disabled."));
VBeam = new wxCheckBox(m_GameConfig, ID_VBEAM, _("VBeam Speed Hack"), wxDefaultPosition, wxDefaultSize, GetElementStyle("Core", "VBeam"));
@@ -426,7 +424,6 @@ void CISOProperties::CreateGUIControls(bool IsWad)
sbCoreOverrides->Add(CPUThread, 0, wxLEFT, 5);
sbCoreOverrides->Add(SkipIdle, 0, wxLEFT, 5);
sbCoreOverrides->Add(MMU, 0, wxLEFT, 5);
- sbCoreOverrides->Add(TLBHack, 0, wxLEFT, 5);
sbCoreOverrides->Add(DCBZOFF, 0, wxLEFT, 5);
sbCoreOverrides->Add(VBeam, 0, wxLEFT, 5);
sbCoreOverrides->Add(SyncGPU, 0, wxLEFT, 5);
@@ -1013,7 +1010,6 @@ void CISOProperties::LoadGameConfig()
SetCheckboxValueFromGameini("Core", "CPUThread", CPUThread);
SetCheckboxValueFromGameini("Core", "SkipIdle", SkipIdle);
SetCheckboxValueFromGameini("Core", "MMU", MMU);
- SetCheckboxValueFromGameini("Core", "TLBHack", TLBHack);
SetCheckboxValueFromGameini("Core", "DCBZ", DCBZOFF);
SetCheckboxValueFromGameini("Core", "VBeam", VBeam);
SetCheckboxValueFromGameini("Core", "SyncGPU", SyncGPU);
@@ -1088,7 +1084,6 @@ bool CISOProperties::SaveGameConfig()
SaveGameIniValueFrom3StateCheckbox("Core", "CPUThread", CPUThread);
SaveGameIniValueFrom3StateCheckbox("Core", "SkipIdle", SkipIdle);
SaveGameIniValueFrom3StateCheckbox("Core", "MMU", MMU);
- SaveGameIniValueFrom3StateCheckbox("Core", "TLBHack", TLBHack);
SaveGameIniValueFrom3StateCheckbox("Core", "DCBZ", DCBZOFF);
SaveGameIniValueFrom3StateCheckbox("Core", "VBeam", VBeam);
SaveGameIniValueFrom3StateCheckbox("Core", "SyncGPU", SyncGPU);
diff --git a/Source/Core/DolphinWX/ISOProperties.h b/Source/Core/DolphinWX/ISOProperties.h
index bdcf252068..0f7ce53711 100644
--- a/Source/Core/DolphinWX/ISOProperties.h
+++ b/Source/Core/DolphinWX/ISOProperties.h
@@ -67,7 +67,7 @@ private:
DECLARE_EVENT_TABLE();
// Core
- wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF, *TLBHack;
+ wxCheckBox *CPUThread, *SkipIdle, *MMU, *DCBZOFF;
wxCheckBox *VBeam, *SyncGPU, *FastDiscSpeed, *BlockMerging, *DSPHLE;
// Wii
wxCheckBox *EnableWideScreen;
@@ -128,7 +128,6 @@ private:
ID_IDLESKIP,
ID_MMU,
ID_DCBZOFF,
- ID_TLBHACK,
ID_VBEAM,
ID_SYNCGPU,
ID_DISCSPEED,