GP2X: fix wrapper script
[picodrive.git] / pico / 32x / 32x.c
index 1128893..8e3553a 100644 (file)
@@ -10,6 +10,12 @@ void Pico32xStartup(void)
   PicoAHW |= PAHW_32X;
   PicoMemSetup32x();
 
+  sh2_init(&msh2);
+  sh2_reset(&msh2);
+
+  sh2_init(&ssh2);
+  sh2_reset(&ssh2);
+
   if (!Pico.m.pal)
     Pico32x.vdp_regs[0] |= P32XV_nPAL;
 
@@ -76,7 +82,15 @@ static __inline void SekRunM68k(int cyc)
 #endif
 }
 
+// ~1463.8, but due to cache misses and slow mem
+// it's much lower than that
+#define SH2_LINE_CYCLES 700
+
 #define PICO_32X
+#define RUN_SH2S \
+  if (!(Pico32x.emu_flags & P32XF_MSH2POLL)) \
+    sh2_execute(&msh2, SH2_LINE_CYCLES);
+
 #include "../pico_cmn.c"
 
 void PicoFrame32x(void)