adjustments for MAME
[picodrive.git] / cpu / Cyclone / OpBranch.cpp
index 71f9785..9cc57e9 100644 (file)
@@ -58,7 +58,9 @@ static void PopPc()
   MemHandler(0,2);\r
   ot("  add r4,r0,r10 ;@ r4=Memory Base+PC\n");\r
   ot("\n");\r
+#if USE_CHECKPC_CALLBACK\r
   CheckPc();\r
+#endif\r
 }\r
 \r
 int OpTrap(int op)\r
@@ -68,7 +70,7 @@ int OpTrap(int op)
   use=op&~0xf;\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op);\r
+  OpStart(op,0x10);\r
   ot("  and r0,r8,#0xf ;@ Get trap number\n");\r
   ot("  orr r0,r0,#0x20\n");\r
   ot("  mov r0,r0,asl #2\n");\r
@@ -90,7 +92,7 @@ int OpLink(int op)
   if (reg==7) use=op;\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op);\r
+  OpStart(op,0x10);\r
 \r
   if(reg!=7) {\r
     ot(";@ Get An\n");\r
@@ -132,7 +134,7 @@ int OpUnlk(int op)
   use=op&~7;\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op);\r
+  OpStart(op,0x10);\r
 \r
   ot(";@ Get An\n");\r
   EaCalc(10, 7, 8, 2, 1);\r
@@ -168,27 +170,27 @@ int Op4E70(int op)
     OpEnd();\r
     return 0;\r
 \r
-       case 3: // rte\r
-    OpStart(op); Cycles=20;\r
-       SuperCheck(op);\r
+    case 3: // rte\r
+    OpStart(op,0x10); Cycles=20;\r
+    SuperCheck(op);\r
     PopSr(1);\r
     ot("  ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
     PopPc();\r
-       SuperChange(op);\r
+    SuperChange(op);\r
     CheckInterrupt(op);\r
     OpEnd();\r
-       SuperEnd(op);\r
+    SuperEnd(op);\r
     return 0;\r
 \r
     case 5: // rts\r
-    OpStart(op); Cycles=16;\r
+    OpStart(op,0x10); Cycles=16;\r
     ot("  ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
     PopPc();\r
     OpEnd();\r
     return 0;\r
 \r
     case 6: // trapv\r
-    OpStart(op); Cycles=4;\r
+    OpStart(op,0x10); Cycles=4;\r
     ot("  tst r9,#0x10000000\n");\r
     ot("  subne r5,r5,#%i\n",30);\r
     ot("  movne r0,#0x1c ;@ TRAPV exception\n");\r
@@ -197,7 +199,7 @@ int Op4E70(int op)
     return 0;\r
 \r
     case 7: // rtr\r
-    OpStart(op); Cycles=20;\r
+    OpStart(op,0x10); Cycles=20;\r
     PopSr(0);\r
     ot("  ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
     PopPc();\r
@@ -224,7 +226,7 @@ int OpJsr(int op)
   use=OpBase(op);\r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
 \r
-  OpStart(op);\r
+  OpStart(op,0x10);\r
 \r
   ot("  ldr r10,[r7,#0x60] ;@ Get Memory base\n");\r
   ot("\n");\r
@@ -352,7 +354,7 @@ int OpBranch(int op)
   else use=(op&0xff00)+1; // Use same opcode for all 8-bit branches\r
 \r
   if (op!=use) { OpUse(op,use); return 0; } // Use existing handler\r
-  OpStart(op);\r
+  OpStart(op,size?0x10:0);\r
 \r
   ot(";@ Get Branch offset:\n");\r
   if (size) \r