X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fpsxinterpreter.c;h=e6f1587ec2fc43a0aaf5cf4d4fdb1c41a5515ed9;hb=6fe8a1d4501485790b5a58f1a4c62130dd70afb4;hp=5d931a9a20e9e845750a86cbeaf817305f251192;hpb=ebed7428a3e7e817bb4befe7fdfc1f5681577e50;p=pcsx_rearmed.git diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index 5d931a9a..e6f1587e 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -60,7 +60,7 @@ void (*psxCP2BSC[32])(); static u32 fetchNoCache(u32 pc) { u32 *code = (u32 *)PSXM(pc); - return ((code == NULL) ? 0 : SWAP32(*code)); + return ((code == INVALID_PTR) ? 0 : SWAP32(*code)); } /* @@ -83,7 +83,7 @@ static u32 fetchICache(u32 pc) if (((entry->tag ^ pc) & 0xfffffff0) != 0 || pc < entry->tag) { u32 *code = (u32 *)PSXM(pc & ~0x0f); - if (!code) + if (code == INVALID_PTR) return 0; entry->tag = pc; @@ -318,7 +318,7 @@ int psxTestLoadDelay(int reg, u32 tmp) { } void psxDelayTest(int reg, u32 bpc) { - u32 tmp = fetch(psxRegs.pc); + u32 tmp = fetch(bpc); branch = 1; switch (psxTestLoadDelay(reg, tmp)) {