From f09ce6985d998db712a3a9bb2fb599ef24b45c01 Mon Sep 17 00:00:00 2001 From: DiscoStarslayer Date: Mon, 13 Nov 2023 10:44:37 -0500 Subject: [PATCH] Configure memory like PSX --- pcsx2/Memory.cpp | 2 +- pcsx2/MemoryTypes.h | 8 ++++---- pcsx2/System.h | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pcsx2/Memory.cpp b/pcsx2/Memory.cpp index 89fb669100415..7628242f1ef70 100644 --- a/pcsx2/Memory.cpp +++ b/pcsx2/Memory.cpp @@ -146,7 +146,7 @@ void memMapPhy() // Main memory vtlb_MapBlock(eeMem->Main, 0x00000000,Ps2MemSize::MainRam);//mirrored on first 256 mb ? // High memory, uninstalled on the configuration we emulate - vtlb_MapHandler(null_handler, Ps2MemSize::MainRam, 0x10000000 - Ps2MemSize::MainRam); + vtlb_MapBlock(eeMem->ExtraMemory, Ps2MemSize::ExtraRam, Ps2MemSize::ExtraRam); // Various ROMs (all read-only) vtlb_MapBlock(eeMem->ROM, 0x1fc00000, Ps2MemSize::Rom); diff --git a/pcsx2/MemoryTypes.h b/pcsx2/MemoryTypes.h index 1876a0de2f1de..fd0136790c305 100644 --- a/pcsx2/MemoryTypes.h +++ b/pcsx2/MemoryTypes.h @@ -18,15 +18,15 @@ namespace Ps2MemSize { - static constexpr u32 MainRam = _64mb; // 32 MB main memory. - static constexpr u32 ExtraRam = _1mb * 96; // 32+96 MB devkit memory. + static constexpr u32 MainRam = _32mb; // 32 MB main memory. + static constexpr u32 ExtraRam = _32mb; // 32+32 MB psx memory. static constexpr u32 Rom = _1mb * 4; // 4 MB main rom static constexpr u32 Rom1 = _1mb * 4; // DVD player static constexpr u32 Rom2 = 0x00080000; // Chinese rom extension static constexpr u32 Hardware = _64kb; static constexpr u32 Scratch = _16kb; - static constexpr u32 IopRam = _1mb * 8; // 8MB main ram on the IOP. + static constexpr u32 IopRam = _1mb * 8; // 8MB main ram on the PSX IOP. static constexpr u32 IopHardware = _64kb; static const uint GSregs = 0x00002000; // 8k for the GS registers and stuff. @@ -58,7 +58,7 @@ struct EEVM_MemoryAllocMess struct IopVM_MemoryAllocMess { - u8 Main[Ps2MemSize::IopRam]; // Main memory (hard-wired to 2MB) + u8 Main[Ps2MemSize::IopRam]; // Main memory (hard-wired to 8MB) u8 P[_64kb]; // I really have no idea what this is... --air u8 Sif[0x100]; // a few special SIF/SBUS registers (likely not needed) }; diff --git a/pcsx2/System.h b/pcsx2/System.h index 8a42290f38b2d..419db523620c1 100644 --- a/pcsx2/System.h +++ b/pcsx2/System.h @@ -35,13 +35,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 74.5MB, but we round up to 75MB for simplicity). static constexpr u32 EEmemOffset = 0x00000000; - static constexpr u32 EEmemSize = 0x8B00000; + static constexpr u32 EEmemSize = 0x4B00000; - // IOP main memory (2MB + 64K + 256b, rounded up to 3MB for simplicity). + // IOP main memory (8MB + 64K + 256b, rounded up to 9MB for simplicity). static constexpr u32 IOPmemOffset = EEmemOffset + EEmemSize; - static constexpr u32 IOPmemSize = 0x300000; + static constexpr u32 IOPmemSize = 0x900000; // VU0 and VU1 memory (40KB, rounded up to 1MB for simplicity). static constexpr u32 VUmemOffset = IOPmemOffset + IOPmemSize;