1.31 release
[picodrive.git] / cpu / Cyclone / OpLogic.cpp
index 4a795e4..d0eafec 100644 (file)
@@ -632,7 +632,7 @@ int OpAsrEa(int op)
   return 0;\r
 }\r
 \r
-int OpTas(int op)\r
+int OpTas(int op, int gen_special)\r
 {\r
   int ea=0;\r
   int use=0;\r
@@ -645,7 +645,11 @@ int OpTas(int op)
   use=OpBase(op);\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op); Cycles=4;\r
+  if (!gen_special) OpStart(op);\r
+  else\r
+    ot("Op%.4x_%s\n", op, ms?"":":");\r
+\r
+  Cycles=4;\r
   if(ea>=8) Cycles+=10;\r
 \r
   EaCalc (10,0x003f,ea,0,1);\r
@@ -657,7 +661,7 @@ int OpTas(int op)
 \r
 #if CYCLONE_FOR_GENESIS\r
   // the original Sega hardware ignores write-back phase (to memory only)\r
-  if (ea < 0x10) {\r
+  if (ea < 0x10 || gen_special) {\r
 #endif\r
     ot("  orr r1,r1,#0x80000000 ;@ set bit7\n");\r
 \r
@@ -667,6 +671,13 @@ int OpTas(int op)
 #endif\r
 \r
   OpEnd();\r
+\r
+#if CYCLONE_FOR_GENESIS\r
+  if (!gen_special && ea >= 0x10) {\r
+    OpTas(op, 1);\r
+  }\r
+#endif\r
+\r
   return 0;\r
 }\r
 \r