diff --git a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp index 291faaf22..5fb0620ee 100644 --- a/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp +++ b/Source/Project64-core/N64System/Interpreter/InterpreterOps.cpp @@ -154,7 +154,7 @@ R4300iOp::Func * R4300iOp::BuildInterpreter() Jump_Opcode[49] = LWC1; Jump_Opcode[50] = UnknownOpcode; Jump_Opcode[51] = UnknownOpcode; - Jump_Opcode[52] = UnknownOpcode; + Jump_Opcode[52] = LLD; Jump_Opcode[53] = LDC1; Jump_Opcode[54] = UnknownOpcode; Jump_Opcode[55] = LD; @@ -1228,6 +1228,15 @@ void R4300iOp::LD() } } +void R4300iOp::LLD() +{ + uint64_t Address = _GPR[m_Opcode.base].DW + (int16_t)m_Opcode.offset; + if (g_MMU->LD_Memory(Address, _GPR[m_Opcode.rt].UDW)) + { + (*_LLBit) = 1; + } +} + void R4300iOp::LDC1() { if (TestCop1UsableException()) diff --git a/Source/Project64-core/N64System/Interpreter/InterpreterOps.h b/Source/Project64-core/N64System/Interpreter/InterpreterOps.h index 3561c9351..95c6c5d58 100644 --- a/Source/Project64-core/N64System/Interpreter/InterpreterOps.h +++ b/Source/Project64-core/N64System/Interpreter/InterpreterOps.h @@ -57,6 +57,7 @@ public: static void CACHE(); static void LL(); static void LWC1(); + static void LLD(); static void LDC1(); static void LD(); static void SC(); diff --git a/Source/Project64-core/N64System/Mips/R4300iInstruction.cpp b/Source/Project64-core/N64System/Mips/R4300iInstruction.cpp index 05b627cbf..c63f5cc65 100644 --- a/Source/Project64-core/N64System/Mips/R4300iInstruction.cpp +++ b/Source/Project64-core/N64System/Mips/R4300iInstruction.cpp @@ -542,6 +542,10 @@ void R4300iInstruction::DecodeName(void) strcpy(m_Name, "LWC1"); sprintf(m_Param, "%s, 0x%04X (%s)", CRegName::FPR[m_Instruction.rt], m_Instruction.offset, CRegName::GPR[m_Instruction.base]); break; + case R4300i_LLD: + strcpy(m_Name, "LLD"); + sprintf(m_Param, "%s, 0x%04X (%s)", CRegName::FPR[m_Instruction.rt], m_Instruction.offset, CRegName::GPR[m_Instruction.base]); + break; case R4300i_LDC1: strcpy(m_Name, "LDC1"); sprintf(m_Param, "%s, 0x%04X (%s)", CRegName::FPR[m_Instruction.rt], m_Instruction.offset, CRegName::GPR[m_Instruction.base]); diff --git a/Source/Project64-core/N64System/Mips/R4300iOpcode.h b/Source/Project64-core/N64System/Mips/R4300iOpcode.h index 45ad324a5..e29d583e0 100644 --- a/Source/Project64-core/N64System/Mips/R4300iOpcode.h +++ b/Source/Project64-core/N64System/Mips/R4300iOpcode.h @@ -108,6 +108,7 @@ enum R4300iOpCodes R4300i_CACHE = 47, R4300i_LL = 48, R4300i_LWC1 = 49, + R4300i_LLD = 52, R4300i_LDC1 = 53, R4300i_LD = 55, R4300i_SC = 56,