new acc mode timing, VDP FIFO code
[picodrive.git] / cpu / Cyclone / OpMove.cpp
index b5dc0ce..f0a8ecc 100644 (file)
@@ -150,7 +150,7 @@ int OpMove(int op)
 \r
 #if CYCLONE_FOR_GENESIS && !MEMHANDLERS_CHANGE_CYCLES\r
   // this is a bit hacky\r
-  if ((tea==0x39||(tea&0x38)==0x10)&&size>=1)\r
+  if ((tea==0x39||(tea>=0x10&&tea<0x30))&&size>=1)\r
     ot("  ldr r5,[r7,#0x5c] ;@ Load Cycles\n");\r
 #endif\r
 \r
@@ -415,12 +415,21 @@ int OpMovem(int op)
   }\r
   else\r
   {\r
-    // if (size == 2 && decr && SPLIT_MOVEL_PD) we should do 2xWrite16 here\r
-    // (same as in movel.l ?, -(An)), but as this is not likely to be needed and\r
-    // we do not want the performance hit, we do single Write32 instead.\r
     ot("  ;@ Copy register to memory:\n",1<<size);\r
     ot("  ldr r1,[r7,r10] ;@ Load value from Dn/An\n");\r
-    EaWrite(6,1,ea,size,0x003f);\r
+#if SPLIT_MOVEL_PD\r
+    if (decr && size==2) { // -(An)\r
+      ot("  add r0,r6,#2\n");\r
+      EaWrite(0,1,ea,1,0x003f,0,0);\r
+      ot("  ldr r1,[r7,r10] ;@ Load value from Dn/An\n");\r
+      ot("  mov r0,r6\n");\r
+      EaWrite(0,1,ea,1,0x003f,1);\r
+    }\r
+    else\r
+#endif\r
+    {\r
+      EaWrite(6,1,ea,size,0x003f);\r
+    }\r
   }\r
 \r
   if (decr==0) ot("  add r6,r6,#%d ;@ Post-increment address\n",1<<size);\r