initial libretro port
[picodrive.git] / pico / pico.c
index c63360c..6a065e6 100644 (file)
@@ -1,11 +1,11 @@
-// PicoDrive\r
-\r
-// (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006-2008 notaz, All rights reserved.\r
-// Free for non-commercial use.\r
-\r
-// For commercial use, separate licencing terms must be obtained.\r
-\r
+/*\r
+ * PicoDrive\r
+ * (c) Copyright Dave, 2004\r
+ * (C) notaz, 2006-2010\r
+ *\r
+ * This work is licensed under the terms of MAME license.\r
+ * See COPYING file in the top-level directory.\r
+ */\r
 \r
 #include "pico_int.h"\r
 #include "sound/ym2612.h"\r
@@ -23,6 +23,9 @@ struct PicoSRAM SRam;
 int emustatus;         // rapid_ym2612, multi_ym_updates\r
 int scanlines_total;\r
 \r
+int p32x_msh2_multiplier = MSH2_MULTI_DEFAULT;\r
+int p32x_ssh2_multiplier = SSH2_MULTI_DEFAULT;\r
+\r
 void (*PicoWriteSound)(int len) = NULL; // called at the best time to send sound buffer (PsndOut) to hardware\r
 void (*PicoResetHook)(void) = NULL;\r
 void (*PicoLineHook)(void) = NULL;\r
@@ -192,10 +195,8 @@ int PicoReset(void)
   if (!(PicoOpt & POPT_DIS_IDLE_DET))\r
     SekInitIdleDet();\r
 \r
-  if (PicoOpt & POPT_EN_32X) {\r
+  if (PicoOpt & POPT_EN_32X)\r
     PicoReset32x();\r
-    return 0;\r
-  }\r
 \r
   // reset sram state; enable sram access by default if it doesn't overlap with ROM\r
   Pico.m.sram_reg = 0;\r
@@ -209,7 +210,7 @@ int PicoReset(void)
   return 0;\r
 }\r
 \r
-// flush cinfig changes before emu loop starts\r
+// flush config changes before emu loop starts\r
 void PicoLoopPrepare(void)\r
 {\r
   if (PicoRegionOverride)\r
@@ -219,6 +220,9 @@ void PicoLoopPrepare(void)
   // FIXME: PAL has 313 scanlines..\r
   scanlines_total = Pico.m.pal ? 312 : 262;\r
 \r
+  Pico.m.dirtyPal = 1;\r
+  rendstatus_old = -1;\r
+\r
   if (PicoAHW & PAHW_32X)\r
     p32x_timers_recalc();\r
 }\r