32x drc functional on ARM, random adjustments
[picodrive.git] / pico / sms.c
index 6cc6f3c..5e32832 100644 (file)
@@ -9,6 +9,7 @@
  * - H counter
  */
 #include "pico_int.h"
+#include "memory.h"
 #include "sound/sn76496.h"
 
 static unsigned char vdp_data_read(void)
@@ -168,7 +169,7 @@ static void write_bank(unsigned short a, unsigned char d)
   }
 }
 
-static void MEMH_FUNC xwrite(unsigned int a, unsigned char d)
+static void xwrite(unsigned int a, unsigned char d)
 {
   elprintf(EL_IO, "z80 write [%04x] %02x", a, d);
   if (a >= 0xc000)
@@ -235,6 +236,7 @@ void PicoFrameMS(void)
   int lines = is_pal ? 313 : 262;
   int cycles_line = is_pal ? 58020 : 58293; /* (226.6 : 227.7) * 256 */
   int cycles_done = 0, cycles_aim = 0;
+  int skip = PicoSkipFrame;
   int lines_vis = 192;
   int hint; // Hint counter
   int y;
@@ -246,7 +248,7 @@ void PicoFrameMS(void)
   {
     pv->v_counter = Pico.m.scanline = y;
 
-    if (y < lines_vis)
+    if (y < lines_vis && !skip)
       PicoLineMode4(y);
 
     if (y <= lines_vis)