minor xlib fix
[picodrive.git] / pico / pico.c
index 08ba510..f900dfe 100644 (file)
@@ -258,35 +258,6 @@ static __inline void SekRunM68k(int cyc)
 #endif\r
 }\r
 \r
-\r
-// to be called on 224 or line_sample scanlines only\r
-static __inline void getSamples(int y)\r
-{\r
-#if SIMPLE_WRITE_SOUND\r
-  if (y != 224) return;\r
-  PsndRender(0, PsndLen);\r
-  if (PicoWriteSound) PicoWriteSound(PsndLen);\r
-  PsndClear();\r
-#else\r
-  static int curr_pos = 0;\r
-\r
-  if(y == 224) {\r
-    if(emustatus & 2)\r
-         curr_pos += PsndRender(curr_pos, PsndLen-PsndLen/2);\r
-    else curr_pos  = PsndRender(0, PsndLen);\r
-    if (emustatus&1) emustatus|=2; else emustatus&=~2;\r
-    if (PicoWriteSound) PicoWriteSound(curr_pos);\r
-    // clear sound buffer\r
-    PsndClear();\r
-  }\r
-  else if(emustatus & 3) {\r
-    emustatus|= 2;\r
-    emustatus&=~1;\r
-    curr_pos = PsndRender(0, PsndLen/2);\r
-  }\r
-#endif\r
-}\r
-\r
 #include "pico_cmn.c"\r
 \r
 int z80stopCycle;\r
@@ -318,6 +289,10 @@ void PicoFrame(void)
     PicoFrameMCD();\r
     return;\r
   }\r
+  else if (PicoAHW & PAHW_SMS) {\r
+    PicoFrameMS();\r
+    return;\r
+  }\r
 \r
   //if(Pico.video.reg[12]&0x2) Pico.video.status ^= 0x10; // change odd bit in interlace mode\r
 \r