From 37f145f6bdb939826e86c7a9265b10a5d2b36080 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sun, 22 Nov 2020 21:25:04 +0000 Subject: [PATCH] BIOS/HLE: Write OSD config with memwrites instead of direct to physical fixes crashes with Crash Twinsanity --- pcsx2/R5900OpcodeImpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/R5900OpcodeImpl.cpp b/pcsx2/R5900OpcodeImpl.cpp index 29d19eb49f..41fb2b35e0 100644 --- a/pcsx2/R5900OpcodeImpl.cpp +++ b/pcsx2/R5900OpcodeImpl.cpp @@ -946,7 +946,7 @@ void SYSCALL() case Syscall::GetOsdConfigParam: if(g_SkipBiosHack) { - u8* pointer = (u8*)PSM(cpuRegs.GPR.n.a0.UL[0]); + u32 memaddr = cpuRegs.GPR.n.a0.UL[0]; u8 params[16]; cdvdReadLanguageParams(params); @@ -960,21 +960,21 @@ void SYSCALL() osdconf |= (u32)(params[2] & 0x1F) << 16; // Language osdconf |= timezone << 21; // Timezone - memcpy(pointer, &osdconf, 4); + memWrite32(memaddr, osdconf); return; } break; case Syscall::GetOsdConfigParam2: if (g_SkipBiosHack) { - u8* pointer = (u8*)PSM(cpuRegs.GPR.n.a0.UL[0]); + u32 memaddr = cpuRegs.GPR.n.a0.UL[0]; u8 params[16]; cdvdReadLanguageParams(params); u32 osdconf2 = (u32)((params[3] & 0x78) << 1); // Daylight Savings, 24hr clock, Date format - memcpy(pointer, &osdconf2, 4); + memWrite32(memaddr, osdconf2); return; } break;