diff --git a/CMakeLists.txt b/CMakeLists.txt
index 199cc0e0ae..bb96a1b3fa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -869,6 +869,7 @@ if(ARM)
Core/MIPS/ARM/ArmCompLoadStore.cpp
Core/MIPS/ARM/ArmCompVFPU.cpp
Core/MIPS/ARM/ArmCompVFPUNEON.cpp
+ Core/MIPS/ARM/ArmCompReplace.cpp
Core/MIPS/ARM/ArmJit.cpp
Core/MIPS/ARM/ArmJit.h
Core/MIPS/ARM/ArmRegCache.cpp
@@ -887,6 +888,7 @@ elseif(X86)
Core/MIPS/x86/CompFPU.cpp
Core/MIPS/x86/CompLoadStore.cpp
Core/MIPS/x86/CompVFPU.cpp
+ Core/MIPS/x86/CompReplace.cpp
Core/MIPS/x86/Jit.cpp
Core/MIPS/x86/Jit.h
Core/MIPS/x86/RegCache.cpp
diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj
index fb115cb355..6ce530e53a 100644
--- a/Core/Core.vcxproj
+++ b/Core/Core.vcxproj
@@ -291,6 +291,12 @@
true
true
+
+ true
+ true
+ true
+ true
+
true
true
@@ -359,6 +365,12 @@
true
true
+
+ true
+ true
+ true
+ true
+
true
true
@@ -382,6 +394,7 @@
+
diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters
index 8dedeb712a..6782cdded8 100644
--- a/Core/Core.vcxproj.filters
+++ b/Core/Core.vcxproj.filters
@@ -508,6 +508,15 @@
HLE
+
+ MIPS\x86
+
+
+ MIPS\ARM
+
+
+ MIPS\PPC
+
@@ -949,4 +958,4 @@
-
+
\ No newline at end of file
diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp
index de9dba3c4b..6ec7ba91c3 100644
--- a/Core/HLE/ReplaceTables.cpp
+++ b/Core/HLE/ReplaceTables.cpp
@@ -15,28 +15,114 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
+#include