aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/MacroInterpreter.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-01-21 22:11:43 -0300
committerThog <me@thog.eu>2020-01-22 02:11:43 +0100
commit532ccf929a5781668f8ae6c0552023909a771128 (patch)
tree47102ca677ff0b05d3068c2dcf4ce94a88840a9e /Ryujinx.Graphics.Gpu/MacroInterpreter.cs
parentd6b9babe1d73a78e963455a5a6ea3e7431a44ece (diff)
Ignore exit flag on branch delay slot (#899)
Diffstat (limited to 'Ryujinx.Graphics.Gpu/MacroInterpreter.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/MacroInterpreter.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/MacroInterpreter.cs b/Ryujinx.Graphics.Gpu/MacroInterpreter.cs
index c853da73..4287f055 100644
--- a/Ryujinx.Graphics.Gpu/MacroInterpreter.cs
+++ b/Ryujinx.Graphics.Gpu/MacroInterpreter.cs
@@ -58,6 +58,8 @@ namespace Ryujinx.Graphics.Gpu
private int _pipeOp;
+ private bool _ignoreExitFlag;
+
private int _pc;
/// <summary>
@@ -232,12 +234,19 @@ namespace Ryujinx.Graphics.Gpu
{
FetchOpCode(mme);
}
+ else
+ {
+ // The delay slot instruction exit flag should be ignored.
+ _ignoreExitFlag = true;
+ }
return true;
}
}
- bool exit = (_opCode & 0x80) != 0;
+ bool exit = (_opCode & 0x80) != 0 && !_ignoreExitFlag;
+
+ _ignoreExitFlag = false;
return !exit;
}