From 7ea488a3c9149b996d48c1fb7b5a5c4552a10361 Mon Sep 17 00:00:00 2001 From: StapleButter Date: Mon, 24 Apr 2017 16:01:24 +0200 Subject: [PATCH] support 8-bit writes to the color effect registers --- src/GPU2D.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp index d92d9609..2ff94135 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);