diff options
| author | Arisotura <thetotalworm@gmail.com> | 2020-12-10 19:34:31 +0100 | 
|---|---|---|
| committer | Arisotura <thetotalworm@gmail.com> | 2020-12-10 19:34:31 +0100 | 
| commit | 8530c099bca52e95a3ee5da12c43fc57b944bf5e (patch) | |
| tree | f2b3301a5d1b0fca559275f46ceb406260652f00 /src | |
| parent | 66cec85a9a1e95c8fa76ac6ebf9f718cfafdf5bf (diff) | |
GPU: make sure to always pass BG0HOFS to the 3D engine, even if the 2D engine is disabled.
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;  |