aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-04-24 16:01:24 +0200
committerStapleButter <thetotalworm@gmail.com>2017-04-24 16:01:24 +0200
commit7ea488a3c9149b996d48c1fb7b5a5c4552a10361 (patch)
tree9a4fd27fbc8624ea84d10a2fc5402a7834a0c7e0
parent8c984f1fd75ac3f5b1322432acb92e6862ba322f (diff)
support 8-bit writes to the color effect registers
-rw-r--r--src/GPU2D.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp
index d92d960..2ff9413 100644
--- a/src/GPU2D.cpp
+++ b/src/GPU2D.cpp
@@ -198,6 +198,21 @@ void GPU2D::Write8(u32 addr, u8 val)
case 0x049: WinCnt[1] = val; return;
case 0x04A: WinCnt[2] = val; return;
case 0x04B: WinCnt[3] = val; return;
+
+ case 0x050: BlendCnt = (BlendCnt & 0xFF00) | val; return;
+ case 0x051: BlendCnt = (BlendCnt & 0x00FF) | (val << 8); return;
+ case 0x052:
+ EVA = val & 0x1F;
+ if (EVA > 16) EVA = 16;
+ return;
+ case 0x53:
+ EVB = val & 0x1F;
+ if (EVB > 16) EVB = 16;
+ return;
+ case 0x054:
+ EVY = val & 0x1F;
+ if (EVY > 16) EVY = 16;
+ return;
}
printf("unknown GPU write8 %08X %02X\n", addr, val);