diff --git a/Core/Breakpoint.cpp b/Core/Breakpoint.cpp index 0386458..a0ff408 100644 --- a/Core/Breakpoint.cpp +++ b/Core/Breakpoint.cpp @@ -5,7 +5,7 @@ bool Breakpoint::Matches(uint32_t memoryAddr, AddressInfo &info) { - if(_memoryType <= DebugUtilities::GetLastCpuMemoryType()) { + if(_memoryType <= DebugUtilities::GetLastCpuMemoryType() && !DebugUtilities::IsPpuMemory(info.Type)) { if(_startAddr == -1) { return true; } else if(_endAddr == -1) { diff --git a/Core/DebugUtilities.h b/Core/DebugUtilities.h index 3541a58..913a619 100644 --- a/Core/DebugUtilities.h +++ b/Core/DebugUtilities.h @@ -25,6 +25,19 @@ public: return SnesMemoryType::GsuMemory; } + static bool IsPpuMemory(SnesMemoryType memType) + { + switch(memType) { + case SnesMemoryType::VideoRam: + case SnesMemoryType::SpriteRam: + case SnesMemoryType::CGRam: + return true; + + default: + return false; + } + } + static constexpr CpuType GetLastCpuType() { return CpuType::Cx4;