more MAME fixes, some optimization
[picodrive.git] / cpu / Cyclone / OpMove.cpp
index 3333287..95e3027 100644 (file)
@@ -56,7 +56,7 @@ void SuperEnd(int op)
   ot("  mov r0,#0x20 ;@ privilege violation\n");\r
   ot("  bl Exception\n");\r
   Cycles=34;\r
-  OpEnd();\r
+  OpEnd(0x10);\r
 }\r
 \r
 // does OSP and A7 swapping if needed\r
@@ -117,7 +117,7 @@ int OpMove(int op)
 \r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op,sea|tea); Cycles=4;\r
+  OpStart(op,sea,tea); Cycles=4;\r
 \r
   EaCalc(0,0x003f,sea,size);\r
   EaRead(0,     1,sea,size,0x003f);\r
@@ -153,7 +153,7 @@ int OpMove(int op)
 \r
   if((tea&0x38)==0x20) Cycles-=2; // less cycles when dest is -(An)\r
 \r
-  OpEnd();\r
+  OpEnd(sea,tea);\r
   return 0;\r
 }\r
 \r
@@ -173,7 +173,7 @@ int OpLea(int op)
   use&=~0x0e00; // Also use 1 handler for target ?0-7\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op,sea|tea);\r
+  OpStart(op,sea,tea);\r
 \r
   EaCalc (1,0x003f,sea,0); // Lea\r
   EaCalc (0,0x0e00,tea,2,1);\r
@@ -181,7 +181,7 @@ int OpLea(int op)
 \r
   Cycles=Ea_add_ns(g_lea_cycle_table,sea);\r
 \r
-  OpEnd();\r
+  OpEnd(sea,tea);\r
 \r
   return 0;\r
 }\r
@@ -239,7 +239,7 @@ int OpMoveSr(int op)
     }\r
   }\r
 \r
-  OpEnd();\r
+  OpEnd(ea);\r
 \r
   if (type==3) SuperEnd(op);\r
 \r
@@ -277,7 +277,7 @@ int OpArithSr(int op)
     CheckInterrupt(op);\r
   }\r
 \r
-  OpEnd();\r
+  OpEnd(ea);\r
   if (size) SuperEnd(op);\r
 \r
   return 0;\r
@@ -309,7 +309,7 @@ int OpPea(int op)
 \r
   Cycles=6+Ea_add_ns(g_pea_cycle_table,ea);\r
 \r
-  OpEnd();\r
+  OpEnd(ea);\r
 \r
   return 0;\r
 }\r
@@ -404,7 +404,7 @@ int OpMovem(int op)
 \r
   Cycles+=Ea_add_ns(g_movem_cycle_table,ea);\r
 \r
-  OpEnd();\r
+  OpEnd(ea);\r
 \r
   return 0;\r
 }\r
@@ -560,7 +560,7 @@ int OpMovep(int op)
   }\r
 \r
   Cycles=(size==2)?24:16;\r
-  OpEnd();\r
+  OpEnd(ea);\r
 \r
   return 0;\r
 }\r
@@ -614,3 +614,4 @@ int OpStopReset(int op)
 \r
   return 0;\r
 }\r
+\r