aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GPU2D.cpp6
-rw-r--r--src/GPU2D.h1
-rw-r--r--src/GPU2D_Soft.cpp5
3 files changed, 10 insertions, 2 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index 030936e..d2a8b34 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -581,7 +581,11 @@ void GPU2D::UpdateMosaicCounters(u32 line)
void GPU2D::VBlank()
{
- CaptureCnt &= ~(1<<31);
+ if (CaptureLatch)
+ {
+ CaptureCnt &= ~(1<<31);
+ CaptureLatch = false;
+ }
DispFIFOReadPtr = 0;
DispFIFOWritePtr = 0;
diff --git a/src/GPU2D.h b/src/GPU2D.h
index 132a1bc..0f59ae3 100644
--- a/src/GPU2D.h
+++ b/src/GPU2D.h
@@ -110,6 +110,7 @@ protected:
u8 EVA, EVB;
u8 EVY;
+ bool CaptureLatch;
u32 CaptureCnt;
u16 MasterBrightness;
diff --git a/src/GPU2D_Soft.cpp b/src/GPU2D_Soft.cpp
index ecc5016..7345af9 100644
--- a/src/GPU2D_Soft.cpp
+++ b/src/GPU2D_Soft.cpp
@@ -213,6 +213,9 @@ void GPU2D_Soft::DrawScanline(u32 line)
}
}
+ if (line == 0 && CaptureCnt & (1 << 31))
+ CaptureLatch = true;
+
// always render regular graphics
DrawScanline_BGOBJ(line);
UpdateMosaicCounters(line);
@@ -278,7 +281,7 @@ void GPU2D_Soft::DrawScanline(u32 line)
}
// capture
- if ((Num == 0) && (CaptureCnt & (1<<31)))
+ if ((Num == 0) && CaptureLatch)
{
u32 capwidth, capheight;
switch ((CaptureCnt >> 20) & 0x3)