From ee39a36f20104f7b290d5d33a3af25ed04520cee Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Thu, 14 Nov 2024 15:54:12 -0800 Subject: [PATCH] cp15: add support for process ID --- desmume/src/cp15.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/desmume/src/cp15.cpp b/desmume/src/cp15.cpp index 60cce8f0b..bde283142 100644 --- a/desmume/src/cp15.cpp +++ b/desmume/src/cp15.cpp @@ -366,6 +366,13 @@ BOOL armcp15_moveCP2ARM(armcp15_t *armcp15, u32 * R, u8 CRn, u8 CRm, u8 opcode1, } } return FALSE; + case 13: + if(opcode1 == 0 && opcode2 == 1) + { + *R = armcp15->processID; + return TRUE; + } + return FALSE; default: LOG("Unsupported CP15 operation : MRC\n"); return FALSE; @@ -488,6 +495,13 @@ BOOL armcp15_moveARM2CP(armcp15_t *armcp15, u32 val, u8 CRn, u8 CRm, u8 opcode1, } } return FALSE; + case 13: + if(opcode1 == 0 && opcode2 == 1) + { + armcp15->processID = val; + return TRUE; + } + return FALSE; default: return FALSE; }