core md, add interlace field info to video status
authorkub <derkub@gmail.com>
Sun, 30 Mar 2025 17:11:01 +0000 (19:11 +0200)
committerkub <derkub@gmail.com>
Sun, 30 Mar 2025 22:00:11 +0000 (00:00 +0200)
pico/pico.c
pico/pico_cmn.c

index ee3d143..e305e3b 100644 (file)
@@ -297,8 +297,6 @@ void PicoFrame(void)
     goto end;\r
   }\r
 \r
-  //if(Pico.video.reg[12]&0x2) Pico.video.status ^= SR_ODD; // change odd bit in interlace mode\r
-\r
   PicoFrameStart();\r
   PicoFrameHints();\r
 \r
index 39a3d15..37198f1 100644 (file)
@@ -231,6 +231,11 @@ static int PicoFrameHints(void)
   p32x_start_blank();
 #endif
 
+  if (pv->reg[12] & 2)
+    pv->status ^= SR_ODD; // change odd bit in interlace modes
+  else
+    pv->status &= ~SR_ODD; // never set in non-interlace modes
+
   // the following SekRun is there for several reasons:
   // there must be a delay after vblank bit is set and irq is asserted (Mazin Saga)
   // also delay between F bit (bit 7) is set in SR and IRQ happens (Ex-Mutants)