1 #include "../pico_int.h"
2 #include "../sound/ym2612.h"
4 struct Pico32x Pico32x;
6 void Pico32xStartup(void)
8 elprintf(EL_STATUS|EL_32X, "32X startup");
14 Pico32x.vdp_regs[0] |= P32XV_nPAL;
19 void Pico32xInit(void)
23 void PicoPower32x(void)
25 memset(&Pico32x, 0, sizeof(Pico32x));
27 Pico32x.regs[0] = 0x0082; // SH2 reset?
28 Pico32x.vdp_regs[0x0a/2] = P32XV_VBLK|P32XV_HBLK|P32XV_PEN;
31 void PicoUnload32x(void)
33 if (Pico32xMem != NULL)
40 void PicoReset32x(void)
42 extern int p32x_csum_faked;
43 p32x_csum_faked = 0; // tmp
46 static void p32x_start_blank(void)
49 Pico32x.vdp_regs[0x0a/2] |= P32XV_VBLK|P32XV_PEN;
51 // swap waits until vblank
52 if ((Pico32x.vdp_regs[0x0a/2] ^ Pico32x.pending_fb) & P32XV_FS) {
53 Pico32x.vdp_regs[0x0a/2] &= ~P32XV_FS;
54 Pico32x.vdp_regs[0x0a/2] |= Pico32x.pending_fb;
55 Pico32xSwapDRAM(Pico32x.pending_fb ^ 1);
60 static __inline void SekRunM68k(int cyc)
64 if ((cyc_do=SekCycleAim-SekCycleCnt) <= 0) return;
65 #if defined(EMU_CORE_DEBUG)
66 // this means we do run-compare
67 SekCycleCnt+=CM_compareRun(cyc_do, 0);
68 #elif defined(EMU_C68K)
69 PicoCpuCM68k.cycles=cyc_do;
70 CycloneRun(&PicoCpuCM68k);
71 SekCycleCnt+=cyc_do-PicoCpuCM68k.cycles;
72 #elif defined(EMU_M68K)
73 SekCycleCnt+=m68k_execute(cyc_do);
74 #elif defined(EMU_F68K)
75 SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0);
80 #include "../pico_cmn.c"
82 void PicoFrame32x(void)
84 if ((Pico32x.vdp_regs[0] & 3 ) != 0) // no forced blanking
85 Pico32x.vdp_regs[0x0a/2] &= ~(P32XV_VBLK|P32XV_PEN); // get out of vblank