From c87a2f57b43d7cb8b19b9f68aaabfca220465b3f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 13 Dec 2018 11:39:40 -0500 Subject: [PATCH] Interpreter_SystemRegisters: Handle reserved/read-only bits for HID2 in mtspr --- .../Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp index 6de8588307..23dc859967 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter_SystemRegisters.cpp @@ -346,6 +346,9 @@ void Interpreter::mtspr(UGeckoInstruction inst) // not set. // TODO: disable write gather pipe if WPE not set // TODO: emulate locked cache and DMA bits. + // Only the lower half of the register (upper half from a little endian perspective) + // is modifiable, except for the DMAQL field. + rSPR(index) = (rSPR(index) & 0xF0FF0000) | (old_value & 0x0F000000); break; case SPR_HID4: