diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp
index 6149d31be6..5b0aa0b1e0 100644
--- a/Core/HLE/ReplaceTables.cpp
+++ b/Core/HLE/ReplaceTables.cpp
@@ -109,6 +109,19 @@ static int Replace_memcpy() {
return 10 + bytes / 4; // approximation
}
+static int Replace_memcpy16() {
+ u32 destPtr = PARAM(0);
+ u32 srcPtr = PARAM(1);
+ u32 bytes = PARAM(2) * 16;
+ if (bytes != 0) {
+ u8 *dst = Memory::GetPointerUnchecked(destPtr);
+ u8 *src = Memory::GetPointerUnchecked(srcPtr);
+ memmove(dst, src, bytes);
+ }
+ RETURN(destPtr);
+ return 10 + bytes / 4; // approximation
+}
+
static int Replace_memmove() {
u32 destPtr = PARAM(0);
u32 srcPtr = PARAM(1);
@@ -357,6 +370,7 @@ static const ReplacementTableEntry entries[] = {
{ "floorf", &Replace_floorf, 0, 0},
{ "ceilf", &Replace_ceilf, 0, 0},
{ "memcpy", &Replace_memcpy, 0, 0},
+ { "memcpy16", &Replace_memcpy16, 0, 0},
{ "memmove", &Replace_memmove, 0, 0},
{ "memset", &Replace_memset, 0, 0},
{ "strlen", &Replace_strlen, 0, 0},
@@ -386,6 +400,8 @@ void Replacement_Shutdown() {
replacedInstructions.clear();
}
+// TODO: Do something on load state?
+
int GetNumReplacementFuncs() {
return ARRAY_SIZE(entries);
}
@@ -423,7 +439,7 @@ void WriteReplaceInstruction(u32 address, u64 hash, int size) {
return;
}
replacedInstructions[address] = prevInstr;
- INFO_LOG(HLE, "Replaced %s at %08x", entries[index].name, address);
+ INFO_LOG(HLE, "Replaced %s at %08x with hash %016llx", entries[index].name, address, hash);
Memory::Write_U32(MIPS_EMUHACK_CALL_REPLACEMENT | (int)index, address);
}
}
diff --git a/Windows/PPSSPP.vcxproj b/Windows/PPSSPP.vcxproj
index 56c2bc6736..089843547f 100644
--- a/Windows/PPSSPP.vcxproj
+++ b/Windows/PPSSPP.vcxproj
@@ -363,6 +363,7 @@
+
@@ -414,4 +415,4 @@
-
+
\ No newline at end of file
diff --git a/Windows/PPSSPP.vcxproj.filters b/Windows/PPSSPP.vcxproj.filters
index 281af1571b..3868bfdaa9 100644
--- a/Windows/PPSSPP.vcxproj.filters
+++ b/Windows/PPSSPP.vcxproj.filters
@@ -299,6 +299,9 @@
Other Platforms
+
+ Resource Files
+
diff --git a/assets/knownfuncs.ini b/assets/knownfuncs.ini
index eecc096f9c..ef1e42b927 100644
--- a/assets/knownfuncs.ini
+++ b/assets/knownfuncs.ini
@@ -38,7 +38,7 @@
1a7564fa3e25c992:844 = memcpy
1aad94c0723edfc0:124 = vmmul_t_transp
1ab33b12b3cb8cb0:28 = vqmul_q
-1ac05627df1f87f4:112 = memcpy
+1ac05627df1f87f4:112 = memcpy16
1bdf3600844373fd:112 = strstr
1c967be07917ddc9:92 = strcat
1d03fa48334ca966:556 = _strtol_r