PicoDrive hacks
[picodrive.git] / Pico / cd / Sek.c
index fc30045..f28b142 100644 (file)
@@ -1,10 +1,4 @@
-// This is part of Pico Library
-
-// (c) Copyright 2004 Dave, All rights reserved.
 // (c) Copyright 2006 notaz, All rights reserved.
-// Free for non-commercial use.
-
-// For commercial use, separate licencing terms must be obtained.
 
 
 #include "../PicoInt.h"
@@ -35,7 +29,7 @@ static int new_irq_level(int level)
 }
 
 #ifdef EMU_M68K
-static int SekIntAckS68k(int level)
+static int SekIntAckS68kM(int level)
 {
   int level_new = new_irq_level(level);
   dprintf("s68kACK %i -> %i", level, level_new);
@@ -88,7 +82,7 @@ int SekInitS68k()
     m68k_set_context(&PicoS68kCPU);
     m68k_set_cpu_type(M68K_CPU_TYPE_68000);
     m68k_init();
-    m68k_set_int_ack_callback(SekIntAckS68k);
+    m68k_set_int_ack_callback(SekIntAckS68kM);
 //  m68k_pulse_reset(); // not yet, memmap is not set up
     m68k_set_context(oldcontext);
   }
@@ -117,6 +111,8 @@ int SekResetS68k()
     void *oldcontext = m68ki_cpu_p;
 
     m68k_set_context(&PicoS68kCPU);
+    m68ki_cpu.sp[0]=0;
+    m68k_set_irq(0);
     m68k_pulse_reset();
     m68k_set_context(oldcontext);
   }