diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GPU2D.cpp | 9 | ||||
-rw-r--r-- | src/GPU2D.h | 1 | ||||
-rw-r--r-- | src/version.h | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp index 92edfd4..c4a249a 100644 --- a/src/GPU2D.cpp +++ b/src/GPU2D.cpp @@ -161,6 +161,8 @@ u16 GPU2D::Read16(u32 addr) case 0x04A: return WinCnt[2] | (WinCnt[3] << 8); case 0x050: return BlendCnt; + case 0x052: return BlendAlpha; + // BLDY is write-only case 0x064: return CaptureCnt & 0xFFFF; case 0x066: return CaptureCnt >> 16; @@ -203,13 +205,15 @@ void GPU2D::Write8(u32 addr, u8 val) case 0x04A: WinCnt[2] = val; return; case 0x04B: WinCnt[3] = val; return; - case 0x050: BlendCnt = (BlendCnt & 0xFF00) | val; return; + case 0x050: BlendCnt = (BlendCnt & 0x3F00) | val; return; case 0x051: BlendCnt = (BlendCnt & 0x00FF) | (val << 8); return; case 0x052: + BlendAlpha = (BlendAlpha & 0x1F00) | (val & 0x1F); EVA = val & 0x1F; if (EVA > 16) EVA = 16; return; case 0x53: + BlendAlpha = (BlendAlpha & 0x001F) | ((val & 0x1F) << 8); EVB = val & 0x1F; if (EVB > 16) EVB = 16; return; @@ -320,8 +324,9 @@ void GPU2D::Write16(u32 addr, u16 val) WinCnt[3] = val >> 8; return; - case 0x050: BlendCnt = val; return; + case 0x050: BlendCnt = val & 0x3FFF; return; case 0x052: + BlendAlpha = val & 0x1F1F; EVA = val & 0x1F; if (EVA > 16) EVA = 16; EVB = (val >> 8) & 0x1F; diff --git a/src/GPU2D.h b/src/GPU2D.h index 4c68cdb..affcc75 100644 --- a/src/GPU2D.h +++ b/src/GPU2D.h @@ -92,6 +92,7 @@ private: bool Win1Active; u16 BlendCnt; + u16 BlendAlpha; u8 EVA, EVB; u8 EVY; diff --git a/src/version.h b/src/version.h index 7d6b68c..9435cfa 100644 --- a/src/version.h +++ b/src/version.h @@ -19,7 +19,7 @@ #ifndef VERSION_H #define VERSION_H -#define MELONDS_VERSION "0.4" +#define MELONDS_VERSION "0.5" #define MELONDS_URL "http://melonds.kuribo64.net/" |