mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Separate logging for GetPointer/GetPointerWrite
This commit is contained in:
1 parent
e6403d7157
commit
861d66a4d4
2 files changed
+21
-15
No files matched your search
+19
-13
@@ -29,22 +29,15 @@
|
||||
namespace Memory {
|
||||
|
||||
u8 *GetPointerWrite(const u32 address) {
|
||||
if ((address & 0x3E000000) == 0x08000000) {
|
||||
// RAM
|
||||
return GetPointerWriteUnchecked(address);
|
||||
} else if ((address & 0x3F800000) == 0x04000000) {
|
||||
// VRAM
|
||||
return GetPointerWriteUnchecked(address);
|
||||
} else if ((address & 0xBFFFC000) == 0x00010000) {
|
||||
// Scratchpad
|
||||
return GetPointerWriteUnchecked(address);
|
||||
} else if ((address & 0x3F000000) >= 0x08000000 && (address & 0x3F000000) < 0x08000000 + g_MemorySize) {
|
||||
// More RAM (remasters, etc.)
|
||||
if ((address & 0x3E000000) == 0x08000000 || // RAM
|
||||
(address & 0x3F800000) == 0x04000000 || // VRAM
|
||||
(address & 0xBFFFC000) == 0x00010000 || // Scratchpad
|
||||
((address & 0x3F000000) >= 0x08000000 && (address & 0x3F000000) < 0x08000000 + g_MemorySize)) { // More RAM (remasters, etc.)
|
||||
return GetPointerWriteUnchecked(address);
|
||||
} else {
|
||||
static bool reported = false;
|
||||
if (!reported) {
|
||||
Reporting::ReportMessage("Unknown GetPointer %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
Reporting::ReportMessage("Unknown GetPointerWrite %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
reported = true;
|
||||
}
|
||||
Core_MemoryException(address, currentMIPS->pc, MemoryExceptionType::WRITE_BLOCK);
|
||||
@@ -53,7 +46,20 @@ u8 *GetPointerWrite(const u32 address) {
|
||||
}
|
||||
|
||||
const u8 *GetPointer(const u32 address) {
|
||||
return (const u8 *)GetPointerWrite(address);
|
||||
if ((address & 0x3E000000) == 0x08000000 || // RAM
|
||||
(address & 0x3F800000) == 0x04000000 || // VRAM
|
||||
(address & 0xBFFFC000) == 0x00010000 || // Scratchpad
|
||||
((address & 0x3F000000) >= 0x08000000 && (address & 0x3F000000) < 0x08000000 + g_MemorySize)) { // More RAM (remasters, etc.)
|
||||
return GetPointerUnchecked(address);
|
||||
} else {
|
||||
static bool reported = false;
|
||||
if (!reported) {
|
||||
Reporting::ReportMessage("Unknown GetPointer %08x PC %08x LR %08x", address, currentMIPS->pc, currentMIPS->r[MIPS_REG_RA]);
|
||||
reported = true;
|
||||
}
|
||||
Core_MemoryException(address, currentMIPS->pc, MemoryExceptionType::READ_BLOCK);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
Reference in new issue
Block a user