diff --git a/pcsx2/Memory.h b/pcsx2/Memory.h index 6b50e58428..a0544c28c3 100644 --- a/pcsx2/Memory.h +++ b/pcsx2/Memory.h @@ -22,11 +22,13 @@ namespace HostMemoryMap // Main ////////////////////////////////////////////////////////////////////////// - // PS2 main memory, SPR, and ROMs (approximately 138.5MB, but we round up to 139MB for simplicity). + // PS2 main memory, SPR, and ROMs (approximately 142MB, but we round up to 144MB for simplicity). + // Needs to be big enough to fit the EEVM_MemoryAllocMess struct static constexpr u32 EEmemOffset = 0x00000000; - static constexpr u32 EEmemSize = 0x8B00000; + static constexpr u32 EEmemSize = 0x9000000; // IOP main memory (2MB + 64K + 256b, rounded up to 3MB for simplicity). + // Needs to be big enough to fit the IopVM_MemoryAllocMess struct static constexpr u32 IOPmemOffset = EEmemOffset + EEmemSize; static constexpr u32 IOPmemSize = 0x300000; diff --git a/pcsx2/MemoryTypes.h b/pcsx2/MemoryTypes.h index 3f550c46b4..cb04c60953 100644 --- a/pcsx2/MemoryTypes.h +++ b/pcsx2/MemoryTypes.h @@ -29,6 +29,7 @@ typedef u32 mem32_t; typedef u64 mem64_t; typedef u128 mem128_t; +// Needs to fit within EEmemSize of Memory.h struct EEVM_MemoryAllocMess { u8 Main[Ps2MemSize::MainRam]; // Main memory (hard-wired to 32MB) @@ -47,6 +48,7 @@ struct EEVM_MemoryAllocMess u8 ZeroWrite[_1mb]; }; +// Needs to fit within IOPmemSize of Memory.h struct IopVM_MemoryAllocMess { u8 Main[Ps2MemSize::IopRam]; // Main memory (hard-wired to 2MB)