Skip to content

Commit

Permalink
DEV9: fix incorrect max hdd size
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AKuHAK authored and refractionpcsx2 committed Dec 20, 2023
1 parent c3bafa2 commit 669cadf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcsx2/DEV9/ATA/ATA_Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>(sizeSectors, maxSize);

constexpr u16 sectorSize = 512;
Expand Down

0 comments on commit 669cadf

Please sign in to comment.