From d083fc047084764d1d78de8863b17cd962181d65 Mon Sep 17 00:00:00 2001 From: Crementif <26669564+Crementif@users.noreply.github.com> Date: Sun, 4 May 2025 17:19:56 +0200 Subject: [PATCH] Reorder PPCInterpreter memory layout to keep plugin compatibility Commit b089ae5b32f5f2bc901b9ff2db2424cbf3c1186b changed the PPCInterpreter struct that external plugins rely on to hook Cemu through e.g. the exported "osLib_registerHLEFunction". This commit moves some unused values down so that it keeps the same memory layout as before the PPC recompiler rework. --- src/Cafe/HW/Espresso/PPCState.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Cafe/HW/Espresso/PPCState.h b/src/Cafe/HW/Espresso/PPCState.h index 8f27ee93..179e2687 100644 --- a/src/Cafe/HW/Espresso/PPCState.h +++ b/src/Cafe/HW/Espresso/PPCState.h @@ -51,12 +51,10 @@ struct PPCInterpreter_t uint8 xer_ca; // carry from xer uint8 xer_so; uint8 xer_ov; - uint8 LSQE; - uint8 PSE; // thread remaining cycles sint32 remainingCycles; // if this value goes below zero, the next thread is scheduled sint32 skippedCycles; // number of skipped cycles - struct + struct { uint32 LR; uint32 CTR; @@ -72,7 +70,7 @@ struct PPCInterpreter_t uint32 temporaryGPR[4]; // deprecated, refactor backend dependency on this away uint32 temporaryGPR_reg[4]; // values below this are not used by Cafe OS usermode - struct + struct { uint32 fpecr; // is this the same register as fpscr ? uint32 DEC; @@ -87,7 +85,7 @@ struct PPCInterpreter_t // DMA uint32 dmaU; uint32 dmaL; - // MMU + // MMU uint32 dbatU[8]; uint32 dbatL[8]; uint32 ibatU[8]; @@ -95,6 +93,8 @@ struct PPCInterpreter_t uint32 sr[16]; uint32 sdr1; }sprExtended; + uint8 LSQE; + uint8 PSE; // global CPU values PPCInterpreterGlobal_t* global; // interpreter control