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));
26 Pico32x.regs[0] = 0x0082; // SH2 reset?
27 Pico32x.vdp_regs[0x0a/2] = P32XV_VBLK|P32XV_HBLK|P32XV_PEN;
30 void PicoReset32x(void)
34 static void p32x_start_blank(void)
37 Pico32x.vdp_regs[0x0a/2] |= P32XV_VBLK|P32XV_PEN;
39 // swap waits until vblank
40 if ((Pico32x.vdp_regs[0x0a/2] ^ Pico32x.pending_fb) & P32XV_FS) {
41 Pico32x.vdp_regs[0x0a/2] &= ~P32XV_FS;
42 Pico32x.vdp_regs[0x0a/2] |= Pico32x.pending_fb;
43 Pico32xSwapDRAM(Pico32x.pending_fb ^ 1);
48 static __inline void SekRunM68k(int cyc)
52 if ((cyc_do=SekCycleAim-SekCycleCnt) <= 0) return;
53 #if defined(EMU_CORE_DEBUG)
54 // this means we do run-compare
55 SekCycleCnt+=CM_compareRun(cyc_do, 0);
56 #elif defined(EMU_C68K)
57 PicoCpuCM68k.cycles=cyc_do;
58 CycloneRun(&PicoCpuCM68k);
59 SekCycleCnt+=cyc_do-PicoCpuCM68k.cycles;
60 #elif defined(EMU_M68K)
61 SekCycleCnt+=m68k_execute(cyc_do);
62 #elif defined(EMU_F68K)
63 SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0);
68 #include "../pico_cmn.c"
70 void PicoFrame32x(void)
72 if ((Pico32x.vdp_regs[0] & 3 ) != 0) // no forced blanking
73 Pico32x.vdp_regs[0x0a/2] &= ~(P32XV_VBLK|P32XV_PEN); // get out of vblank