diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-04-26 19:22:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-27 08:22:18 +1000 |
| commit | 10a2b9dca3610a759926e6be564c8813be8d8618 (patch) | |
| tree | 2bc84c2271062e6ee2226969446850b1e63438e6 | |
| parent | 3dfa4232f839ee9e1d6e00cf8dc4ba1f4b0943cf (diff) | |
Fix shadow RAM affecting MME methods (#1168)
| -rw-r--r-- | Ryujinx.Graphics.Gpu/State/GpuState.cs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/GpuState.cs b/Ryujinx.Graphics.Gpu/State/GpuState.cs index 677fed66..70c4ed61 100644 --- a/Ryujinx.Graphics.Gpu/State/GpuState.cs +++ b/Ryujinx.Graphics.Gpu/State/GpuState.cs @@ -77,15 +77,19 @@ namespace Ryujinx.Graphics.Gpu.State { int value = meth.Argument; - // TODO: Figure out what TrackWithFilter does, compared to Track. - if (shadowCtrl == ShadowRamControl.Track || - shadowCtrl == ShadowRamControl.TrackWithFilter) + // Methods < 0x80 shouldn't be affected by shadow RAM at all. + if (meth.Method >= 0x80) { - _shadow[meth.Method] = value; - } - else if (shadowCtrl == ShadowRamControl.Replay) - { - value = _shadow[meth.Method]; + // TODO: Figure out what TrackWithFilter does, compared to Track. + if (shadowCtrl == ShadowRamControl.Track || + shadowCtrl == ShadowRamControl.TrackWithFilter) + { + _shadow[meth.Method] = value; + } + else if (shadowCtrl == ShadowRamControl.Replay) + { + value = _shadow[meth.Method]; + } } Register register = _registers[meth.Method]; |
