From 4db203de481dbd1834e8ec1e5945fea2bcf4c39e Mon Sep 17 00:00:00 2001 From: Adrian Conlon <98398945+AdrianConlon@users.noreply.github.com> Date: Thu, 27 Mar 2025 11:13:41 +0000 Subject: [PATCH] All interrupt handling state tests to work --- LR35902/SM83.HarteTest/Checker.cs | 6 +++++- LR35902/SM83.HarteTest/State.cs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/LR35902/SM83.HarteTest/Checker.cs b/LR35902/SM83.HarteTest/Checker.cs index 614a357..50c2fea 100644 --- a/LR35902/SM83.HarteTest/Checker.cs +++ b/LR35902/SM83.HarteTest/Checker.cs @@ -206,7 +206,11 @@ var e_good = this.Check("E", final.E, cpu.E); var h_good = this.Check("H", final.H, cpu.H); var l_good = this.Check("L", final.L, cpu.L); - var ime_good = this.Check("IME", final.IME, (byte)(cpu.IME ? 1 : 0)); + var ime_good = true; + if (final.EI is not null) + { + ime_good = this.Check("IME", final.EI.Value, (byte)(cpu.IME ? 1 : 0)); + } if (!f_good) { diff --git a/LR35902/SM83.HarteTest/State.cs b/LR35902/SM83.HarteTest/State.cs index e060634..88395e1 100644 --- a/LR35902/SM83.HarteTest/State.cs +++ b/LR35902/SM83.HarteTest/State.cs @@ -20,6 +20,7 @@ public byte IME { get; set; } public byte IE { get; set; } + public byte? EI { get; set; } public int[][]? RAM { get; set; } }