From 77c7c610d0bb7b555d92f4aa9511a31fef16400a Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Mon, 5 Apr 2021 00:53:46 -0500 Subject: [PATCH] chore(cpu): rename ImeSet to ImeEnabled --- src/cpu.rs | 4 ++-- src/instruction.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpu.rs b/src/cpu.rs index a0143e2..dc957dc 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -96,7 +96,7 @@ impl Cpu { use HaltState::*; match state { - ImeSet | NonePending => Cycle::new(4), + ImeEnabled | NonePending => Cycle::new(4), SomePending => todo!("Implement HALT bug"), } } @@ -470,7 +470,7 @@ impl From for Flags { #[derive(Debug, Clone, Copy)] pub enum HaltState { - ImeSet, + ImeEnabled, NonePending, SomePending, } diff --git a/src/instruction.rs b/src/instruction.rs index a20d901..2e7897c 100644 --- a/src/instruction.rs +++ b/src/instruction.rs @@ -612,7 +612,7 @@ impl Instruction { let enabled = cpu.read_byte(0xFFFF); let halt_state = if let ImeState::Enabled = cpu.ime() { - ImeSet + ImeEnabled } else if req & enabled != 0 { SomePending } else {