From 669cadf1ee17ca5656338b4cb9a033c6a88db05a Mon Sep 17 00:00:00 2001 From: AKuHAK <621640+AKuHAK@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:41:00 +0200 Subject: [PATCH] DEV9: fix incorrect max hdd size PS2 support 28-bit addressing not the the 24-bit addressing. 24-bit addressing is limited by 8Gb storage, while 28-bit is limited by 128Gb --- pcsx2/DEV9/ATA/ATA_Info.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcsx2/DEV9/ATA/ATA_Info.cpp b/pcsx2/DEV9/ATA/ATA_Info.cpp index 0fba5bc578b5f..083cfff8b2f82 100644 --- a/pcsx2/DEV9/ATA/ATA_Info.cpp +++ b/pcsx2/DEV9/ATA/ATA_Info.cpp @@ -47,8 +47,8 @@ void ATA::WritePaddedString(u8* data, int* index, const std::string& value, u32 void ATA::CreateHDDinfo(u64 sizeSectors) { //PS2 is limited to 32bit size HDD (2TB), however, - //we don't yet support 48bit, so limit to 24bit size - constexpr u32 maxSize = 1 << 24; + //we don't yet support 48bit, so limit to 28bit size + constexpr u32 maxSize = (1 << 28) - 1; // 128Gb sizeSectors = std::min(sizeSectors, maxSize); constexpr u16 sectorSize = 512;