interpreter: backport fixes from pcsxr
authornotaz <notasas@gmail.com>
Fri, 4 Feb 2011 23:10:26 +0000 (01:10 +0200)
committernotaz <notasas@gmail.com>
Wed, 9 Feb 2011 12:59:32 +0000 (14:59 +0200)
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

index 3736b23..3258743 100644 (file)
@@ -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;