From 862bfc0d6da5d83c8af5bf3a1fdd189474d25812 Mon Sep 17 00:00:00 2001 From: notaz Date: Sat, 5 Feb 2011 01:10:26 +0200 Subject: interpreter: backport fixes from pcsxr shalma: - (nhyone) fix load delay bgez, bgezal Xenogears - psxinterpreter.c - lbu v1 - beq v1 = no load delay - fix battle loading (interpreter only) --- libpcsxcore/psxinterpreter.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index 3736b23..3258743 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -153,8 +153,12 @@ int psxTestLoadDelay(int reg, u32 tmp) { case 0x01: // REGIMM switch (_tRt_) { - case 0x00: case 0x02: - case 0x10: case 0x12: // BLTZ/BGEZ... + case 0x00: case 0x01: + case 0x10: case 0x11: // BLTZ/BGEZ... + // Xenogears - lbu v0 / beq v0 + // - no load delay (fixes battle loading) + break; + if (_tRs_ == reg) return 2; break; } @@ -166,10 +170,18 @@ int psxTestLoadDelay(int reg, u32 tmp) { break; case 0x04: case 0x05: // BEQ/BNE + // Xenogears - lbu v0 / beq v0 + // - no load delay (fixes battle loading) + break; + if (_tRs_ == reg || _tRt_ == reg) return 2; break; case 0x06: case 0x07: // BLEZ/BGTZ + // Xenogears - lbu v0 / beq v0 + // - no load delay (fixes battle loading) + break; + if (_tRs_ == reg) return 2; break; -- cgit v1.2.3