aboutsummaryrefslogtreecommitdiff
path: root/src/GPU2D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GPU2D.cpp')
-rw-r--r--src/GPU2D.cpp55
1 files changed, 27 insertions, 28 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index 2dd606a..eda3e32 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -1,5 +1,5 @@
/*
- Copyright 2016-2021 Arisotura
+ Copyright 2016-2022 melonDS team
This file is part of melonDS.
@@ -521,8 +521,6 @@ void Unit::Write32(u32 addr, u32 val)
return;
case 0x064:
- // TODO: check what happens when writing to it during display
- // esp. if a capture is happening
CaptureCnt = val & 0xEF3F1F1F;
return;
@@ -534,31 +532,32 @@ void Unit::Write32(u32 addr, u32 val)
return;
}
- if (!Enabled) return;
-
- switch (addr & 0x00000FFF)
+ if (Enabled)
{
- case 0x028:
- if (val & 0x08000000) val |= 0xF0000000;
- BGXRef[0] = val;
- if (GPU::VCount < 192) BGXRefInternal[0] = BGXRef[0];
- return;
- case 0x02C:
- if (val & 0x08000000) val |= 0xF0000000;
- BGYRef[0] = val;
- if (GPU::VCount < 192) BGYRefInternal[0] = BGYRef[0];
- return;
-
- case 0x038:
- if (val & 0x08000000) val |= 0xF0000000;
- BGXRef[1] = val;
- if (GPU::VCount < 192) BGXRefInternal[1] = BGXRef[1];
- return;
- case 0x03C:
- if (val & 0x08000000) val |= 0xF0000000;
- BGYRef[1] = val;
- if (GPU::VCount < 192) BGYRefInternal[1] = BGYRef[1];
- return;
+ switch (addr & 0x00000FFF)
+ {
+ case 0x028:
+ if (val & 0x08000000) val |= 0xF0000000;
+ BGXRef[0] = val;
+ if (GPU::VCount < 192) BGXRefInternal[0] = BGXRef[0];
+ return;
+ case 0x02C:
+ if (val & 0x08000000) val |= 0xF0000000;
+ BGYRef[0] = val;
+ if (GPU::VCount < 192) BGYRefInternal[0] = BGYRef[0];
+ return;
+
+ case 0x038:
+ if (val & 0x08000000) val |= 0xF0000000;
+ BGXRef[1] = val;
+ if (GPU::VCount < 192) BGXRefInternal[1] = BGXRef[1];
+ return;
+ case 0x03C:
+ if (val & 0x08000000) val |= 0xF0000000;
+ BGYRef[1] = val;
+ if (GPU::VCount < 192) BGYRefInternal[1] = BGYRef[1];
+ return;
+ }
}
Write16(addr, val&0xFFFF);
@@ -721,4 +720,4 @@ void Unit::GetOBJVRAM(u8*& data, u32& mask)
}
}
-} \ No newline at end of file
+}