drc: add i/o penalty cycles
authornotaz <notasas@gmail.com>
Thu, 17 Feb 2011 00:18:15 +0000 (02:18 +0200)
committernotaz <notasas@gmail.com>
Thu, 17 Feb 2011 15:05:11 +0000 (17:05 +0200)
.. as done by some other PSX emus

libpcsxcore/new_dynarec/new_dynarec.c

index 1435017..1f33c75 100644 (file)
@@ -9478,6 +9478,16 @@ int new_recompile_block(int addr)
     {
       cc=0;
     }
+#ifdef PCSX
+    else if(/*itype[i]==LOAD||*/itype[i]==STORE||itype[i]==C1LS) // load causes weird timing issues
+    {
+      cc+=2; // 2 cycle penalty (after CLOCK_DIVIDER)
+    }
+    else if(itype[i]==C2LS)
+    {
+      cc+=4;
+    }
+#endif
     else
     {
       cc++;