From: Paul Cercueil Date: Sun, 20 Feb 2022 00:15:43 +0000 (+0000) Subject: Fix GTE directly referencing psxRegs X-Git-Tag: r24l~505^2~4 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=641d7badb70e58c4fbab04fa70212e6e7b7cdaaa;p=pcsx_rearmed.git Fix GTE directly referencing psxRegs It should reference the 'regs' function argument instead. This makes it possible to use the latest Lightrec code with its new API, which has internal CP2 registers, without having to copy the registers back and forth between the internal ones and the psxRegs ones. Signed-off-by: Paul Cercueil --- diff --git a/libpcsxcore/gte.c b/libpcsxcore/gte.c index 5164a892..4459600f 100644 --- a/libpcsxcore/gte.c +++ b/libpcsxcore/gte.c @@ -154,8 +154,8 @@ // sign-extended by bug in original hardware, according to Nocash docs // GTE section 'Screen Offset and Distance'. The emulator does this // sign extension when it is loaded to GTE by CTC2. -//#define gteH (psxRegs.CP2C.p[26].sw.l) -#define gteH (psxRegs.CP2C.p[26].w.l) +//#define gteH (regs->CP2C.p[26].sw.l) +#define gteH (regs->CP2C.p[26].w.l) #define gteDQA (regs->CP2C.p[27].sw.l) #define gteDQB (((s32 *)regs->CP2C.r)[28]) #define gteZSF3 (regs->CP2C.p[29].sw.l)