aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRSDuck <rsduck@users.noreply.github.com>2021-01-07 22:39:36 +0100
committerRSDuck <rsduck@users.noreply.github.com>2021-01-07 22:39:36 +0100
commit7081c2de65ded60fb59b44009a5b5a07201f6fcb (patch)
treed7c215da8bd3223175a20a2d45c3d8a226499006 /src
parente311eea1c5567fb72710cbc862ff5b2d853fe456 (diff)
readd vram invalidation through display capture
also remove stray printf
Diffstat (limited to 'src')
-rw-r--r--src/GPU.cpp1
-rw-r--r--src/GPU2D_Soft.cpp6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/GPU.cpp b/src/GPU.cpp
index 2b61b4c..f490f84 100644
--- a/src/GPU.cpp
+++ b/src/GPU.cpp
@@ -1178,7 +1178,6 @@ NonStupidBitField<Size/VRAMDirtyGranularity> VRAMTrackingSet<Size, MappingGranul
{
if (currentMappings[i] != Mapping[i])
{
- printf("remapped %x %x\n", currentMappings[i], Mapping[i]);
result |= NonStupidBitField<Size/VRAMDirtyGranularity>(i*VRAMBitsPerMapping, VRAMBitsPerMapping);
banksToBeZeroed |= currentMappings[i];
Mapping[i] = currentMappings[i];
diff --git a/src/GPU2D_Soft.cpp b/src/GPU2D_Soft.cpp
index c686bad..16d9cab 100644
--- a/src/GPU2D_Soft.cpp
+++ b/src/GPU2D_Soft.cpp
@@ -372,9 +372,6 @@ void GPU2D_Soft::DoCapture(u32 line, u32 width)
u16* dst = (u16*)GPU::VRAM[dstvram];
u32 dstaddr = (((CaptureCnt >> 18) & 0x3) << 14) + (line * width);
- static_assert(GPU::VRAMDirtyGranularity == 512);
- GPU::VRAMDirty[dstvram][(dstaddr & 0x1FFFF) / GPU::VRAMDirtyGranularity] = true;
-
// TODO: handle 3D in accelerated mode!!
u32* srcA;
@@ -467,6 +464,9 @@ void GPU2D_Soft::DoCapture(u32 line, u32 width)
dstaddr &= 0xFFFF;
srcBaddr &= 0xFFFF;
+ static_assert(GPU::VRAMDirtyGranularity == 512);
+ GPU::VRAMDirty[dstvram][(dstaddr * 2) / GPU::VRAMDirtyGranularity] = true;
+
switch ((CaptureCnt >> 29) & 0x3)
{
case 0: // source A