drc: support ms ABI
[picodrive.git] / pico / debugCPU.c
index 77ca420..128f414 100644 (file)
@@ -1,3 +1,11 @@
+/*\r
+ * debug stuff\r
+ * (C) notaz, 2006-2008\r
+ *\r
+ * This work is licensed under the terms of MAME license.\r
+ * See COPYING file in the top-level directory.\r
+ */\r
+\r
 #include "pico_int.h"\r
 \r
 typedef unsigned char  u8;\r
@@ -22,6 +30,7 @@ static struct Cyclone *currentC68k = NULL;
 #define other_is_stopped()  (currentC68k->state_flags&1)\r
 #define other_is_tracing() ((currentC68k->state_flags&2)?1:0)\r
 #elif defined(EMU_F68K)\r
+static struct M68K_CONTEXT *g_m68kcontext;\r
 #define other_set_sub(s)   g_m68kcontext=(s)?&PicoCpuFS68k:&PicoCpuFM68k;\r
 #define other_get_sr()     g_m68kcontext->sr\r
 #define other_dar(i)       ((unsigned int*)g_m68kcontext->dreg)[i]\r
@@ -41,7 +50,7 @@ static int otherRun(void)
   CycloneRun(currentC68k);\r
   return 1-currentC68k->cycles;\r
 #elif defined(EMU_F68K)\r
-  return fm68k_emulate(1, 0);\r
+  return fm68k_emulate(g_m68kcontext, 1, 0);\r
 #endif\r
 }\r
 \r