1 // This is part of Pico Library
3 // (c) Copyright 2004 Dave, All rights reserved.
4 // (c) Copyright 2006 notaz, All rights reserved.
5 // Free for non-commercial use.
7 // For commercial use, separate licencing terms must be obtained.
10 #include "../PicoInt.h"
13 int SekCycleCntS68k=0; // cycles done in this frame
14 int SekCycleAimS68k=0; // cycle aim
17 // ---------------------- MUSASHI 68000 ----------------------
18 m68ki_cpu_core PicoS68kCPU; // Mega CD's CPU
23 int SekIntAckS68k(int level)
25 dprintf("s68k: int %i ack [%i|%i]", level, Pico.m.scanline, SekCyclesDone());
27 return M68K_INT_ACK_AUTOVECTOR;
36 // Musashi is not very context friendly..
37 void *oldcontext = m68ki_cpu_p;
38 m68k_set_context(&PicoS68kCPU);
39 m68k_set_cpu_type(M68K_CPU_TYPE_68000);
41 m68k_set_int_ack_callback(SekIntAckS68k);
42 // m68k_pulse_reset(); // not yet, memmap is not set up
43 m68k_set_context(oldcontext);
53 if (Pico.rom==NULL) return 1;
57 void *oldcontext = m68ki_cpu_p;
59 m68k_set_context(&PicoS68kCPU);
61 m68k_set_context(oldcontext);
68 int SekInterruptS68k(int irq)
71 void *oldcontext = m68ki_cpu_p;
72 m68k_set_context(&PicoS68kCPU);
73 m68k_set_irq(irq); // raise irq (gets lowered after taken or must be done in ack)
74 m68k_set_context(oldcontext);