diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56f617ae1f..2f2a9cd8d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1482,6 +1482,8 @@ add_library(${CoreLibName} ${CoreLinkType}
Core/Debugger/Breakpoints.cpp
Core/Debugger/Breakpoints.h
Core/Debugger/DebugInterface.h
+ Core/Debugger/MemBlockInfo.cpp
+ Core/Debugger/MemBlockInfo.h
Core/Debugger/SymbolMap.cpp
Core/Debugger/SymbolMap.h
Core/Debugger/DisassemblyManager.cpp
diff --git a/Core/Core.vcxproj b/Core/Core.vcxproj
index 065a61aff3..c0c9051d7f 100644
--- a/Core/Core.vcxproj
+++ b/Core/Core.vcxproj
@@ -429,6 +429,7 @@
+
@@ -977,6 +978,7 @@
+
diff --git a/Core/Core.vcxproj.filters b/Core/Core.vcxproj.filters
index 51d07653fd..f66273cddd 100644
--- a/Core/Core.vcxproj.filters
+++ b/Core/Core.vcxproj.filters
@@ -977,6 +977,9 @@
MIPS\fake
+
+ Debugger
+
@@ -1670,6 +1673,9 @@
MIPS\fake
+
+ Debugger
+
diff --git a/Core/Debugger/MemBlockInfo.cpp b/Core/Debugger/MemBlockInfo.cpp
new file mode 100644
index 0000000000..1cb51ae949
--- /dev/null
+++ b/Core/Debugger/MemBlockInfo.cpp
@@ -0,0 +1,34 @@
+// Copyright (c) 2021- PPSSPP Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0 or later versions.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official git repository and contact information can be found at
+// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
+
+#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
+#include "Core/MIPS/MIPS.h"
+
+void NotifyMemInfo(MemBlockFlags flags, uint32_t start, uint32_t size, const std::string &tag) {
+ NotifyMemInfoPC(flags, start, size, currentMIPS->pc, tag);
+}
+
+void NotifyMemInfoPC(MemBlockFlags flags, uint32_t start, uint32_t size, uint32_t pc, const std::string &tag) {
+ // TODO
+
+ if (flags & MemBlockFlags::WRITE) {
+ CBreakPoints::ExecMemCheck(start, true, size, pc);
+ } else if (flags & MemBlockFlags::READ) {
+ CBreakPoints::ExecMemCheck(start, false, size, pc);
+ }
+}
diff --git a/Core/Debugger/MemBlockInfo.h b/Core/Debugger/MemBlockInfo.h
new file mode 100644
index 0000000000..a150b2f272
--- /dev/null
+++ b/Core/Debugger/MemBlockInfo.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2021- PPSSPP Project.
+
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, version 2.0 or later versions.
+
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License 2.0 for more details.
+
+// A copy of the GPL 2.0 should have been included with the program.
+// If not, see http://www.gnu.org/licenses/
+
+// Official git repository and contact information can be found at
+// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
+
+#pragma once
+
+#include
+#include
+#include "Common/Common.h"
+
+enum class MemBlockFlags {
+ FREE = 0,
+ ALLOC = 1,
+ SUB_ALLOC = 2,
+ WRITE = 4,
+ // Not actually logged.
+ READ = 8,
+ SUB_FREE = 16,
+};
+ENUM_CLASS_BITOPS(MemBlockFlags);
+
+void NotifyMemInfo(MemBlockFlags flags, uint32_t start, uint32_t size, const std::string &tag);
+void NotifyMemInfoPC(MemBlockFlags flags, uint32_t start, uint32_t size, uint32_t pc, const std::string &tag);
diff --git a/Core/ELF/ElfReader.cpp b/Core/ELF/ElfReader.cpp
index eec53a3c2f..17bf1f4263 100644
--- a/Core/ELF/ElfReader.cpp
+++ b/Core/ELF/ElfReader.cpp
@@ -19,7 +19,7 @@
#include "Core/Reporting.h"
#include "Core/MIPS/MIPSTables.h"
#include "Core/ELF/ElfReader.h"
-#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/HLE/sceKernelMemory.h"
#include "Core/HLE/sceKernelModule.h"
@@ -478,7 +478,7 @@ int ElfReader::LoadInto(u32 loadAddress, bool fromTop)
}
memcpy(dst, src, srcSize);
- CBreakPoints::ExecMemCheck(writeAddr, true, dstSize, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, writeAddr, dstSize, "ELFLoad");
DEBUG_LOG(LOADER,"Loadable Segment Copied to %08x, size %08x", writeAddr, (u32)p->p_memsz);
}
}
diff --git a/Core/HLE/ReplaceTables.cpp b/Core/HLE/ReplaceTables.cpp
index 86f696e994..9e30cad0dc 100644
--- a/Core/HLE/ReplaceTables.cpp
+++ b/Core/HLE/ReplaceTables.cpp
@@ -24,6 +24,7 @@
#include "Common/Log.h"
#include "Core/Config.h"
#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/Debugger/SymbolMap.h"
#include "Core/MemMap.h"
#include "Core/MIPS/JitCommon/JitCommon.h"
@@ -153,8 +154,8 @@ static int Replace_memcpy() {
}
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(srcPtr, false, bytes, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, "ReplaceMemcpy");
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemcpy");
return 10 + bytes / 4; // approximation
}
@@ -195,8 +196,8 @@ static int Replace_memcpy_jak() {
currentMIPS->r[MIPS_REG_A3] = destPtr + bytes;
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(srcPtr, false, bytes, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, "ReplaceMemcpy");
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemcpy");
return 5 + bytes * 8 + 2; // approximation. This is a slow memcpy - a byte copy loop..
}
@@ -223,8 +224,8 @@ static int Replace_memcpy16() {
}
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(srcPtr, false, bytes, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, "ReplaceMemcpy16");
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemcpy16");
return 10 + bytes / 4; // approximation
}
@@ -261,8 +262,8 @@ static int Replace_memcpy_swizzled() {
RETURN(0);
- CBreakPoints::ExecMemCheck(srcPtr, false, pitch * h, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(destPtr, true, pitch * h, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcPtr, pitch * h, "ReplaceMemcpySwizzle");
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, pitch * h, "ReplaceMemcpySwizzle");
return 10 + (pitch * h) / 4; // approximation
}
@@ -289,8 +290,8 @@ static int Replace_memmove() {
}
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(srcPtr, false, bytes, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcPtr, bytes, "ReplaceMemmove");
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemmove");
return 10 + bytes / 4; // approximation
}
@@ -311,7 +312,7 @@ static int Replace_memset() {
}
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemset");
return 10 + bytes / 4; // approximation
}
@@ -342,7 +343,7 @@ static int Replace_memset_jak() {
currentMIPS->r[MIPS_REG_A3] = -1;
RETURN(destPtr);
- CBreakPoints::ExecMemCheck(destPtr, true, bytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, destPtr, bytes, "ReplaceMemset");
return 5 + bytes * 6 + 2; // approximation (hm, inspecting the disasm this should be 5 + 6 * bytes + 2, but this is what works..)
}
@@ -590,9 +591,9 @@ static int Replace_dl_write_matrix() {
#endif
}
- CBreakPoints::ExecMemCheck(PARAM(2), false, count * sizeof(float), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(PARAM(0) + 2 * sizeof(u32), true, sizeof(u32), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dlStruct[2], true, (count + 1) * sizeof(u32), currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, PARAM(2), count * sizeof(float), "ReplaceDLWriteMatrix");
+ NotifyMemInfo(MemBlockFlags::WRITE, PARAM(0) + 2 * sizeof(u32), sizeof(u32), "ReplaceDLWriteMatrix");
+ NotifyMemInfo(MemBlockFlags::WRITE, dlStruct[2], (count + 1) * sizeof(u32), "ReplaceDLWriteMatrix");
dlStruct[2] += (1 + count) * 4;
RETURN(dlStruct[2]);
@@ -640,7 +641,7 @@ static int Hook_godseaterburst_blit_texture() {
const u32 fb_address = Memory::Read_U32(fb_info);
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "godseaterburst_blit_texture");
}
return 0;
}
@@ -654,7 +655,7 @@ static int Hook_hexyzforce_monoclome_thread() {
const u32 fb_address = Memory::Read_U32(fb_info);
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "hexyzforce_monoclome_thread");
}
return 0;
}
@@ -671,7 +672,7 @@ static int Hook_topx_create_saveicon() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "topx_create_saveicon");
}
return 0;
}
@@ -680,7 +681,7 @@ static int Hook_ff1_battle_effect() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "ff1_battle_effect");
}
return 0;
}
@@ -690,7 +691,7 @@ static int Hook_dissidia_recordframe_avi() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "dissidia_recordframe_avi");
}
return 0;
}
@@ -711,7 +712,7 @@ static int Hook_brandish_download_frame() {
const u32 dest_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsRAMAddress(dest_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "brandish_download_frame");
}
return 0;
}
@@ -722,7 +723,7 @@ static int Hook_growlanser_create_saveicon() {
const u32 sz = fmt == GE_FORMAT_8888 ? 0x00088000 : 0x00044000;
if (Memory::IsVRAMAddress(fb_address) && fmt <= 3) {
gpu->PerformMemoryDownload(fb_address, sz);
- CBreakPoints::ExecMemCheck(fb_address, true, sz, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, sz, "growlanser_create_saveicon");
}
return 0;
}
@@ -733,7 +734,7 @@ static int Hook_sd_gundam_g_generation_download_frame() {
const u32 sz = fmt == GE_FORMAT_8888 ? 0x00088000 : 0x00044000;
if (Memory::IsVRAMAddress(fb_address) && fmt <= 3) {
gpu->PerformMemoryDownload(fb_address, sz);
- CBreakPoints::ExecMemCheck(fb_address, true, sz, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, sz, "sd_gundam_g_generation_download_frame");
}
return 0;
}
@@ -742,7 +743,7 @@ static int Hook_narisokonai_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "narisokonai_download_frame");
}
return 0;
}
@@ -751,7 +752,7 @@ static int Hook_kirameki_school_life_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "kirameki_school_life_download_frame");
}
return 0;
}
@@ -760,7 +761,7 @@ static int Hook_orenoimouto_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A4];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "orenoimouto_download_frame");
}
return 0;
}
@@ -769,7 +770,7 @@ static int Hook_sakurasou_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "sakurasou_download_frame");
}
return 0;
}
@@ -778,7 +779,7 @@ static int Hook_suikoden1_and_2_download_frame_1() {
const u32 fb_address = currentMIPS->r[MIPS_REG_S4];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "suikoden1_and_2_download_frame_1");
}
return 0;
}
@@ -787,7 +788,7 @@ static int Hook_suikoden1_and_2_download_frame_2() {
const u32 fb_address = currentMIPS->r[MIPS_REG_S2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "suikoden1_and_2_download_frame_2");
}
return 0;
}
@@ -798,7 +799,7 @@ static int Hook_rezel_cross_download_frame() {
const u32 sz = fmt == GE_FORMAT_8888 ? 0x00088000 : 0x00044000;
if (Memory::IsVRAMAddress(fb_address) && fmt <= 3) {
gpu->PerformMemoryDownload(fb_address, sz);
- CBreakPoints::ExecMemCheck(fb_address, true, sz, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, sz, "rezel_cross_download_frame");
}
return 0;
}
@@ -807,7 +808,7 @@ static int Hook_kagaku_no_ensemble_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "kagaku_no_ensemble_download_frame");
}
return 0;
}
@@ -816,7 +817,7 @@ static int Hook_soranokiseki_fc_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "soranokiseki_fc_download_frame");
}
return 0;
}
@@ -837,7 +838,7 @@ static int Hook_soranokiseki_sc_download_frame() {
const u32 dest_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsRAMAddress(dest_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "soranokiseki_sc_download_frame");
}
return 0;
}
@@ -846,7 +847,7 @@ static int Hook_bokunonatsuyasumi4_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A3];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "bokunonatsuyasumi4_download_frame");
}
return 0;
}
@@ -858,7 +859,7 @@ static int Hook_danganronpa2_1_download_frame() {
const u32 fb_address = fb_base + fb_offset_fix;
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "danganronpa2_1_download_frame");
}
return 0;
}
@@ -870,7 +871,7 @@ static int Hook_danganronpa2_2_download_frame() {
const u32 fb_address = fb_base + fb_offset_fix;
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "danganronpa2_2_download_frame");
}
return 0;
}
@@ -882,7 +883,7 @@ static int Hook_danganronpa1_1_download_frame() {
const u32 fb_address = fb_base + fb_offset_fix;
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "danganronpa1_1_download_frame");
}
return 0;
}
@@ -896,7 +897,7 @@ static int Hook_danganronpa1_2_download_frame() {
const u32 fb_address = fb_base + fb_offset_fix;
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "danganronpa1_2_download_frame");
}
return 0;
}
@@ -905,7 +906,7 @@ static int Hook_kankabanchoutbr_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "kankabanchoutbr_download_frame");
}
return 0;
}
@@ -914,7 +915,7 @@ static int Hook_orenoimouto_download_frame_2() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A4];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "orenoimouto_download_frame_2");
}
return 0;
}
@@ -923,7 +924,7 @@ static int Hook_rewrite_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "rewrite_download_frame");
}
return 0;
}
@@ -932,7 +933,7 @@ static int Hook_kudwafter_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "kudwafter_download_frame");
}
return 0;
}
@@ -941,7 +942,7 @@ static int Hook_kumonohatateni_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "kumonohatateni_download_frame");
}
return 0;
}
@@ -950,7 +951,7 @@ static int Hook_otomenoheihou_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "otomenoheihou_download_frame");
}
return 0;
}
@@ -959,7 +960,7 @@ static int Hook_grisaianokajitsu_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "grisaianokajitsu_download_frame");
}
return 0;
}
@@ -968,7 +969,7 @@ static int Hook_kokoroconnect_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A3];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "kokoroconnect_download_frame");
}
return 0;
}
@@ -977,7 +978,7 @@ static int Hook_toheart2_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "toheart2_download_frame");
}
return 0;
}
@@ -986,7 +987,7 @@ static int Hook_toheart2_download_frame_2() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "toheart2_download_frame_2");
}
return 0;
}
@@ -995,7 +996,7 @@ static int Hook_flowers_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "flowers_download_frame");
}
return 0;
}
@@ -1004,7 +1005,7 @@ static int Hook_motorstorm_download_frame() {
const u32 fb_address = Memory::Read_U32(currentMIPS->r[MIPS_REG_A1] + 0x18);
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "motorstorm_download_frame");
}
return 0;
}
@@ -1013,7 +1014,7 @@ static int Hook_utawarerumono_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "utawarerumono_download_frame");
}
return 0;
}
@@ -1022,7 +1023,7 @@ static int Hook_photokano_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "photokano_download_frame");
}
return 0;
}
@@ -1031,7 +1032,7 @@ static int Hook_photokano_download_frame_2() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A1];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "photokano_download_frame_2");
}
return 0;
}
@@ -1040,7 +1041,7 @@ static int Hook_gakuenheaven_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "gakuenheaven_download_frame");
}
return 0;
}
@@ -1049,7 +1050,7 @@ static int Hook_youkosohitsujimura_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_V0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "youkosohitsujimura_download_frame");
}
return 0;
}
@@ -1080,7 +1081,7 @@ static int Hook_sdgundamggenerationportable_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A3];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "sdgundamggenerationportable_download_frame");
}
return 0;
}
@@ -1090,7 +1091,7 @@ static int Hook_atvoffroadfurypro_download_frame() {
const u32 fb_size = (currentMIPS->r[MIPS_REG_S4] >> 3) * currentMIPS->r[MIPS_REG_S3];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, fb_size);
- CBreakPoints::ExecMemCheck(fb_address, true, fb_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, fb_size, "atvoffroadfurypro_download_frame");
}
return 0;
}
@@ -1100,7 +1101,7 @@ static int Hook_atvoffroadfuryblazintrails_download_frame() {
const u32 fb_size = (currentMIPS->r[MIPS_REG_S3] >> 3) * currentMIPS->r[MIPS_REG_S2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, fb_size);
- CBreakPoints::ExecMemCheck(fb_address, true, fb_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, fb_size, "atvoffroadfuryblazintrails_download_frame");
}
return 0;
}
@@ -1109,7 +1110,7 @@ static int Hook_littlebustersce_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_A0];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "littlebustersce_download_frame");
}
return 0;
}
@@ -1118,7 +1119,7 @@ static int Hook_shinigamitoshoujo_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_S2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "shinigamitoshoujo_download_frame");
}
return 0;
}
@@ -1128,7 +1129,7 @@ static int Hook_atvoffroadfuryprodemo_download_frame() {
const u32 fb_size = ((currentMIPS->r[MIPS_REG_A0] + currentMIPS->r[MIPS_REG_A1]) >> 3) * currentMIPS->r[MIPS_REG_S2];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, fb_size);
- CBreakPoints::ExecMemCheck(fb_address, true, fb_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, fb_size, "atvoffroadfuryprodemo_download_frame");
}
return 0;
}
@@ -1137,7 +1138,7 @@ static int Hook_unendingbloodycall_download_frame() {
const u32 fb_address = currentMIPS->r[MIPS_REG_T3];
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00088000, "unendingbloodycall_download_frame");
}
return 0;
}
@@ -1146,7 +1147,7 @@ static int Hook_omertachinmokunookitethelegacy_download_frame() {
const u32 fb_address = Memory::Read_U32(currentMIPS->r[MIPS_REG_SP] + 4);
if (Memory::IsVRAMAddress(fb_address)) {
gpu->PerformMemoryDownload(fb_address, 0x00044000);
- CBreakPoints::ExecMemCheck(fb_address, true, 0x00044000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, 0x00044000, "omertachinmokunookitethelegacy_download_frame");
}
return 0;
}
@@ -1166,7 +1167,7 @@ static int Hook_katamari_render_check() {
const u32 totalBytes = width * heightBlocks * heightBlockCount;
gpu->PerformMemoryDownload(fb_address, totalBytes);
- CBreakPoints::ExecMemCheck(fb_address, true, totalBytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, totalBytes, "katamari_render_check");
}
return 0;
}
@@ -1175,7 +1176,7 @@ static int Hook_katamari_screenshot_to_565() {
u32 fb_address;
if (GetMIPSStaticAddress(fb_address, 0x0040, 0x0044)) {
gpu->PerformMemoryDownload(0x04000000 | fb_address, 0x00088000);
- CBreakPoints::ExecMemCheck(0x04000000 | fb_address, true, 0x00088000, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, 0x04000000 | fb_address, 0x00088000, "katamari_screenshot_to_565");
}
return 0;
}
@@ -1198,7 +1199,7 @@ static int Hook_marvelalliance1_copy_a1_before() {
marvelalliance1_copy_size = currentMIPS->r[MIPS_REG_V0] - currentMIPS->r[MIPS_REG_V1];
gpu->PerformMemoryDownload(marvelalliance1_copy_src, marvelalliance1_copy_size);
- CBreakPoints::ExecMemCheck(marvelalliance1_copy_src, true, marvelalliance1_copy_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, marvelalliance1_copy_src, marvelalliance1_copy_size, "marvelalliance1_copy_a1_before");
return 0;
}
@@ -1209,14 +1210,14 @@ static int Hook_marvelalliance1_copy_a2_before() {
marvelalliance1_copy_size = currentMIPS->r[MIPS_REG_A1] - currentMIPS->r[MIPS_REG_A2];
gpu->PerformMemoryDownload(marvelalliance1_copy_src, marvelalliance1_copy_size);
- CBreakPoints::ExecMemCheck(marvelalliance1_copy_src, true, marvelalliance1_copy_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, marvelalliance1_copy_src, marvelalliance1_copy_size, "marvelalliance1_copy_a2_before");
return 0;
}
static int Hook_marvelalliance1_copy_after() {
gpu->PerformMemoryUpload(marvelalliance1_copy_dst, marvelalliance1_copy_size);
- CBreakPoints::ExecMemCheck(marvelalliance1_copy_dst, false, marvelalliance1_copy_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, marvelalliance1_copy_dst, marvelalliance1_copy_size, "marvelalliance1_copy_after");
return 0;
}
@@ -1249,7 +1250,7 @@ static int Hook_motorstorm_pixel_read() {
u32 fb_height = Memory::Read_U16(currentMIPS->r[MIPS_REG_A0] + 0x26);
u32 fb_stride = Memory::Read_U16(currentMIPS->r[MIPS_REG_A0] + 0x28);
gpu->PerformMemoryDownload(fb_address, fb_height * fb_stride);
- CBreakPoints::ExecMemCheck(fb_address, true, fb_height * fb_stride, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, fb_height * fb_stride, "motorstorm_pixel_read");
return 0;
}
@@ -1259,7 +1260,7 @@ static int Hook_worms_copy_normalize_alpha() {
u32 fb_size = currentMIPS->r[MIPS_REG_A2];
if (Memory::IsVRAMAddress(fb_address) && Memory::IsValidRange(fb_address, fb_size)) {
gpu->PerformMemoryDownload(fb_address, fb_size);
- CBreakPoints::ExecMemCheck(fb_address, true, fb_size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, fb_address, fb_size, "worms_copy_normalize_alpha");
}
return 0;
}
diff --git a/Core/HLE/sceAtrac.cpp b/Core/HLE/sceAtrac.cpp
index bdaeea8b98..19861fc045 100644
--- a/Core/HLE/sceAtrac.cpp
+++ b/Core/HLE/sceAtrac.cpp
@@ -26,7 +26,7 @@
#include "Core/MemMapHelpers.h"
#include "Core/Reporting.h"
#include "Core/Config.h"
-#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/HW/MediaEngine.h"
#include "Core/HW/BufferQueue.h"
@@ -1222,7 +1222,7 @@ u32 _AtracDecodeData(int atracID, u8 *outbuf, u32 outbufPtr, u32 *SamplesNum, u3
int avret = swr_convert(atrac->swrCtx_, &out, numSamples, inbuf, numSamples);
if (outbufPtr != 0) {
u32 outBytes = numSamples * atrac->outputChannels_ * sizeof(s16);
- CBreakPoints::ExecMemCheck(outbufPtr, true, outBytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, outbufPtr, outBytes, "AtracDecode");
}
if (avret < 0) {
ERROR_LOG(ME, "swr_convert: Error while converting %d", avret);
@@ -1244,7 +1244,7 @@ u32 _AtracDecodeData(int atracID, u8 *outbuf, u32 outbufPtr, u32 *SamplesNum, u3
u32 outBytes = numSamples * atrac->outputChannels_ * sizeof(s16);
if (outbuf != nullptr) {
memset(outbuf, 0, outBytes);
- CBreakPoints::ExecMemCheck(outbufPtr, true, outBytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, outbufPtr, outBytes, "AtracDecode");
}
}
}
@@ -2447,7 +2447,7 @@ static int sceAtracLowLevelDecode(int atracID, u32 sourceAddr, u32 sourceBytesCo
int avret = swr_convert(atrac->swrCtx_, &out, numSamples,
(const u8**)atrac->frame_->extended_data, numSamples);
u32 outBytes = numSamples * atrac->outputChannels_ * sizeof(s16);
- CBreakPoints::ExecMemCheck(samplesAddr, true, outBytes, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, samplesAddr, outBytes, "AtracLowLevelDecode");
if (avret < 0) {
ERROR_LOG(ME, "swr_convert: Error while converting %d", avret);
}
diff --git a/Core/HLE/sceCcc.cpp b/Core/HLE/sceCcc.cpp
index 51da548291..b47d805573 100644
--- a/Core/HLE/sceCcc.cpp
+++ b/Core/HLE/sceCcc.cpp
@@ -21,7 +21,7 @@
#include "Common/Serialize/Serializer.h"
#include "Common/Serialize/SerializeFuncs.h"
-#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/MemMap.h"
#include "Core/HLE/HLE.h"
#include "Core/HLE/FunctionWrappers.h"
@@ -118,8 +118,8 @@ static int sceCccUTF8toUTF16(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, utf.byteIndex(), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, utf.byteIndex(), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
@@ -154,8 +154,8 @@ static int sceCccUTF8toSJIS(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, utf.byteIndex(), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, utf.byteIndex(), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
@@ -185,8 +185,8 @@ static int sceCccUTF16toUTF8(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, utf.shortIndex() * sizeof(uint16_t), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, utf.shortIndex() * sizeof(uint16_t), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
@@ -221,8 +221,8 @@ static int sceCccUTF16toSJIS(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, utf.shortIndex() * sizeof(uint16_t), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, utf.shortIndex() * sizeof(uint16_t), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
@@ -257,8 +257,8 @@ static int sceCccSJIStoUTF8(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, sjis.byteIndex(), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, sjis.byteIndex(), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
@@ -293,8 +293,8 @@ static int sceCccSJIStoUTF16(u32 dstAddr, u32 dstSize, u32 srcAddr)
if (dst < dstEnd)
*dst++ = 0;
- CBreakPoints::ExecMemCheck(srcAddr, false, sjis.byteIndex(), currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dstAddr, true, dst.ptr - dstAddr, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, srcAddr, sjis.byteIndex(), "sceCcc");
+ NotifyMemInfo(MemBlockFlags::WRITE, dstAddr, dst.ptr - dstAddr, "sceCcc");
return n;
}
diff --git a/Core/HLE/sceHeap.cpp b/Core/HLE/sceHeap.cpp
index e1c802b149..e51f6b1d83 100644
--- a/Core/HLE/sceHeap.cpp
+++ b/Core/HLE/sceHeap.cpp
@@ -202,7 +202,7 @@ static int sceHeapCreateHeap(const char* name, u32 heapSize, int attr, u32 param
heap->address = addr;
// Some of the heap is reserved by the implementation (the first 128 bytes, and 8 after each block.)
- heap->alloc.Init(heap->address + 128, heap->size - 128);
+ heap->alloc.Init(heap->address + 128, heap->size - 128, true);
heapList[heap->address] = heap;
DEBUG_LOG(HLE, "%08x=sceHeapCreateHeap(%s, %08x, %08x, %08x)", heap->address, name, heapSize, attr, paramsPtr);
return heap->address;
diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp
index 9abfd60f51..401c1e1a8f 100644
--- a/Core/HLE/sceIo.cpp
+++ b/Core/HLE/sceIo.cpp
@@ -29,7 +29,7 @@
#include "Core/Core.h"
#include "Core/Config.h"
#include "Core/ConfigValues.h"
-#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/ELF/ParamSFO.h"
#include "Core/MemMapHelpers.h"
#include "Core/System.h"
@@ -1026,7 +1026,7 @@ static bool __IoRead(int &result, int id, u32 data_addr, int size, int &us) {
result = SCE_KERNEL_ERROR_ILLEGAL_ADDR;
return true;
} else if (Memory::IsValidAddress(data_addr)) {
- CBreakPoints::ExecMemCheck(data_addr, true, size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::WRITE, data_addr, size, "IoRead");
u8 *data = (u8 *)Memory::GetPointer(data_addr);
u32 validSize = Memory::ValidSize(data_addr, size);
if (f->npdrm) {
@@ -1162,7 +1162,7 @@ static bool __IoWrite(int &result, int id, u32 data_addr, int size, int &us) {
return true;
}
- CBreakPoints::ExecMemCheck(data_addr, false, size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, data_addr, size, "IoWrite");
bool useThread = __KernelIsDispatchEnabled() && ioManagerThreadEnabled && size > IO_THREAD_MIN_DATA_SIZE;
if (useThread) {
diff --git a/Core/HLE/sceKernelHeap.cpp b/Core/HLE/sceKernelHeap.cpp
index af2cbdff1d..f584684cbb 100644
--- a/Core/HLE/sceKernelHeap.cpp
+++ b/Core/HLE/sceKernelHeap.cpp
@@ -60,7 +60,7 @@ static int sceKernelCreateHeap(int partitionId, int size, int flags, const char
heap->name = Name ? Name : ""; // Not sure if this needs validation.
heap->size = allocSize;
heap->address = addr;
- heap->alloc.Init(heap->address + 128, heap->size - 128);
+ heap->alloc.Init(heap->address + 128, heap->size - 128, true);
heap->uid = uid;
return hleLogSuccessInfoX(SCEKERNEL, uid);
}
diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp
index 8d8e4124db..adaabd362f 100644
--- a/Core/HLE/sceKernelInterrupt.cpp
+++ b/Core/HLE/sceKernelInterrupt.cpp
@@ -29,7 +29,7 @@
#include "Core/HLE/FunctionWrappers.h"
#include "Core/MIPS/MIPS.h"
-#include "Core/Debugger/Breakpoints.h"
+#include "Core/Debugger/MemBlockInfo.h"
#include "Core/HLE/sceKernel.h"
#include "Core/HLE/sceKernelThread.h"
#include "Core/HLE/sceKernelInterrupt.h"
@@ -618,6 +618,7 @@ static u32 sceKernelMemset(u32 addr, u32 fillc, u32 n)
Memory::Memset(addr, c, n);
}
}
+ NotifyMemInfo(MemBlockFlags::WRITE, addr, n, "KernelMemset");
return addr;
}
@@ -657,8 +658,8 @@ static u32 sceKernelMemcpy(u32 dst, u32 src, u32 size)
}
}
- CBreakPoints::ExecMemCheck(src, false, size, currentMIPS->pc);
- CBreakPoints::ExecMemCheck(dst, true, size, currentMIPS->pc);
+ NotifyMemInfo(MemBlockFlags::READ, src, size, "KernelMemcpy");
+ NotifyMemInfo(MemBlockFlags::WRITE, dst, size, "KernelMemcpy");
return dst;
}
@@ -689,6 +690,8 @@ static u32 sysclib_memcpy(u32 dst, u32 src, u32 size) {
if (Memory::IsValidRange(dst, size) && Memory::IsValidRange(src, size)) {
memcpy(Memory::GetPointer(dst), Memory::GetPointer(src), size);
}
+ NotifyMemInfo(MemBlockFlags::READ, src, size, "KernelMemcpy");
+ NotifyMemInfo(MemBlockFlags::WRITE, dst, size, "KernelMemcpy");
return dst;
}
@@ -754,6 +757,7 @@ static u32 sysclib_memset(u32 destAddr, int data, int size) {
if (Memory::IsValidRange(destAddr, size)) {
memset(Memory::GetPointer(destAddr), data, size);
}
+ NotifyMemInfo(MemBlockFlags::WRITE, destAddr, size, "KernelMemset");
return 0;
}
@@ -786,6 +790,8 @@ static u32 sysclib_memmove(u32 dst, u32 src, u32 size) {
if (Memory::IsValidRange(dst, size) && Memory::IsValidRange(src, size)) {
memmove(Memory::GetPointer(dst), Memory::GetPointer(src), size);
}
+ NotifyMemInfo(MemBlockFlags::READ, src, size, "KernelMemmove");
+ NotifyMemInfo(MemBlockFlags::WRITE, dst, size, "KernelMemmove");
return 0;
}
diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp
index 50b0b75fdf..05e4a7d8e7 100644
--- a/Core/HLE/sceKernelMemory.cpp
+++ b/Core/HLE/sceKernelMemory.cpp
@@ -20,16 +20,17 @@
#include
#include