From 77d5a04aa423a9c7caf0637da9b0c3ad34f414b6 Mon Sep 17 00:00:00 2001 From: RedPanda4552 Date: Fri, 27 Dec 2024 22:45:27 -0500 Subject: [PATCH] Memcard: Remove support for legacy PSX card types with headers Supporting legacy PSX cards with headers required constant size checks, thrashing IOP performance. --- pcsx2/SIO/Memcard/MemoryCardFile.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/pcsx2/SIO/Memcard/MemoryCardFile.cpp b/pcsx2/SIO/Memcard/MemoryCardFile.cpp index 496e532388e64..172d8662cf9e9 100644 --- a/pcsx2/SIO/Memcard/MemoryCardFile.cpp +++ b/pcsx2/SIO/Memcard/MemoryCardFile.cpp @@ -360,24 +360,7 @@ void FileMemoryCard::Close() // Returns FALSE if the seek failed (is outside the bounds of the file). bool FileMemoryCard::Seek(std::FILE* f, u32 adr) { - const s64 size = FileSystem::FSize64(f); - - // If anyone knows why this filesize logic is here (it appears to be related to legacy PSX - // cards, perhaps hacked support for some special emulator-specific memcard formats that - // had header info?), then please replace this comment with something useful. Thanks! -- air - - u32 offset = 0; - - if (size == MCD_SIZE + 64) - offset = 64; - else if (size == MCD_SIZE + 3904) - offset = 3904; - else - { - // perform sanity checks here? - } - - return (FileSystem::FSeek64(f, adr + offset, SEEK_SET) == 0); + return (FileSystem::FSeek64(f, adr, SEEK_SET) == 0); } // returns FALSE if an error occurred (either permission denied or disk full)