From c9c2c00c1a4b02fa099f4ac9f392bfcb7ec21255 Mon Sep 17 00:00:00 2001
From: Connor McLaughlin <stenzek@gmail.com>
Date: Wed, 19 Aug 2020 00:02:35 +1000
Subject: [PATCH] GPU: Update GPUSTAT.13 with field

Doubt this'll change much..
---
 src/core/gpu.cpp | 6 ++++++
 src/core/gpu.h   | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp
index de8b77f24..5180eaaa8 100644
--- a/src/core/gpu.cpp
+++ b/src/core/gpu.cpp
@@ -759,9 +759,15 @@ void GPU::CRTCTickEvent(TickCount ticks)
       // start the new frame
       m_crtc_state.current_scanline = 0;
       if (m_GPUSTAT.vertical_interlace)
+      {
         m_crtc_state.interlaced_field ^= 1u;
+        m_GPUSTAT.interlaced_field = m_crtc_state.interlaced_field;
+      }
       else
+      {
         m_crtc_state.interlaced_field = 0;
+        m_GPUSTAT.interlaced_field = 0u;      // new GPU = 1, old GPU = 0
+      }
     }
   }
 
diff --git a/src/core/gpu.h b/src/core/gpu.h
index 3ebe49898..b91981071 100644
--- a/src/core/gpu.h
+++ b/src/core/gpu.h
@@ -489,7 +489,7 @@ protected:
     BitField<u32, bool, 10, 1> draw_to_displayed_field;
     BitField<u32, bool, 11, 1> set_mask_while_drawing;
     BitField<u32, bool, 12, 1> check_mask_before_draw;
-    BitField<u32, bool, 13, 1> interlaced_field;
+    BitField<u32, u8, 13, 1> interlaced_field;
     BitField<u32, bool, 14, 1> reverse_flag;
     BitField<u32, bool, 15, 1> texture_disable;
     BitField<u32, u8, 16, 1> horizontal_resolution_2;