From: retro-wertz Date: Sat, 3 Aug 2019 12:27:27 +0000 (+0800) Subject: HLE BIOS: Fix corrupted memory card saves X-Git-Tag: r24l~706^2~1 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e522b2b410e29bc2984d621dd368aa2d2d489af;p=pcsx_rearmed.git 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. --- 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 */ \