From 6e522b2b410e29bc2984d621dd368aa2d2d489af Mon Sep 17 00:00:00 2001 From: retro-wertz Date: Sat, 3 Aug 2019 20:27:27 +0800 Subject: [PATCH 1/1] HLE BIOS: Fix corrupted memory card saves - Save files for games that are suppose to work with HLE bios are now corrupted from the last HLE BIOS improvements PR. - This only affects memcard 2 slot when enabled and used. Saves on memcard 1 are fine since those are directly handled through the Libretro API. - This is fixed by adding the missing SaveMcd() to buwrite(). Tested on Wild Arms and Breath of Fire III NOTE: HLE bios is still not compatible for most games. For example, memory card save functions are broken or does not work at all. Most of Konami games i have tested does not work with HLE BIOS for memory card saves. --- libpcsxcore/psxbios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libpcsxcore/psxbios.c b/libpcsxcore/psxbios.c index ed43045f..0121a7b2 100644 --- a/libpcsxcore/psxbios.c +++ b/libpcsxcore/psxbios.c @@ -347,6 +347,7 @@ static inline void LoadRegs() { ptr = Mcd##mcd##Data + offset; \ memcpy(ptr, Ra1, length); \ FDesc[1 + mcd].offset += length; \ + SaveMcd(Config.Mcd##mcd, Mcd##mcd##Data, offset, length); \ if (FDesc[1 + mcd].mode & 0x8000) { \ DeliverEvent(0x11, 0x2); /* 0xf0000011, 0x0004 */ \ DeliverEvent(0x81, 0x2); /* 0xf4000001, 0x0004 */ \ -- 2.39.2