diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GPU2D.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp index eb160d8..fa05e79 100644 --- a/src/GPU2D.cpp +++ b/src/GPU2D.cpp @@ -288,6 +288,13 @@ void GPU2D::Write8(u32 addr, u8 val) DispCnt = (DispCnt & 0x00FFFFFF) | (val << 24); if (Num) DispCnt &= 0xC0B1FFF7; return; + + case 0x10: + if (!Num) GPU3D::SetRenderXPos((GPU3D::RenderXPos & 0xFF00) | val); + break; + case 0x11: + if (!Num) GPU3D::SetRenderXPos((GPU3D::RenderXPos & 0x00FF) | (val << 8)); + break; } if (!Enabled) return; @@ -303,14 +310,8 @@ void GPU2D::Write8(u32 addr, u8 val) case 0x00E: BGCnt[3] = (BGCnt[3] & 0xFF00) | val; return; case 0x00F: BGCnt[3] = (BGCnt[3] & 0x00FF) | (val << 8); return; - case 0x010: - BGXPos[0] = (BGXPos[0] & 0xFF00) | val; - if (Num == 0) GPU3D::SetRenderXPos(BGXPos[0]); - return; - case 0x011: - BGXPos[0] = (BGXPos[0] & 0x00FF) | (val << 8); - if (Num == 0) GPU3D::SetRenderXPos(BGXPos[0]); - return; + case 0x010: BGXPos[0] = (BGXPos[0] & 0xFF00) | val; return; + case 0x011: BGXPos[0] = (BGXPos[0] & 0x00FF) | (val << 8); return; case 0x012: BGYPos[0] = (BGYPos[0] & 0xFF00) | val; return; case 0x013: BGYPos[0] = (BGYPos[0] & 0x00FF) | (val << 8); return; case 0x014: BGXPos[1] = (BGXPos[1] & 0xFF00) | val; return; @@ -386,6 +387,10 @@ void GPU2D::Write16(u32 addr, u16 val) if (Num) DispCnt &= 0xC0B1FFF7; return; + case 0x010: + if (!Num) GPU3D::SetRenderXPos(val); + break; + case 0x068: DispFIFO[DispFIFOWritePtr] = val; return; @@ -407,10 +412,7 @@ void GPU2D::Write16(u32 addr, u16 val) case 0x00C: BGCnt[2] = val; return; case 0x00E: BGCnt[3] = val; return; - case 0x010: - BGXPos[0] = val; - if (Num == 0) GPU3D::SetRenderXPos(BGXPos[0]); - return; + case 0x010: BGXPos[0] = val; return; case 0x012: BGYPos[0] = val; return; case 0x014: BGXPos[1] = val; return; case 0x016: BGYPos[1] = val; return; |