MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetSizeInfo

Method GetSizeInfo

pcsx2/SIO/Memcard/MemoryCardFile.cpp:405–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403}
404
405void FileMemoryCard::GetSizeInfo(uint slot, McdSizeInfo& outways)
406{
407 outways.SectorSize = 512; // 0x0200
408 outways.EraseBlockSizeInSectors = 16; // 0x0010
409 outways.Xor = 18; // 0x12, XOR 02 00 00 10
410
411 pxAssert(m_file[slot]);
412 if (m_file[slot])
413 outways.McdSizeInSectors = static_cast<u32>(m_fileSize[slot]) / (outways.SectorSize + outways.EraseBlockSizeInSectors);
414 else
415 outways.McdSizeInSectors = 0x4000;
416
417 u8* pdata = (u8*)&outways.McdSizeInSectors;
418 outways.Xor ^= pdata[0] ^ pdata[1] ^ pdata[2] ^ pdata[3];
419}
420
421bool FileMemoryCard::IsPSX(uint slot)
422{

Callers 3

FileMcd_GetSizeInfoFunction · 0.45
SetSectorMethod · 0.45
GetSpecsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected