chore(cpu): rename ImeSet to ImeEnabled

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-04-05 00:53:46 -05:00
parent a15a6a25b6
commit 77c7c610d0
2 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ impl Cpu {
use HaltState::*; use HaltState::*;
match state { match state {
ImeSet | NonePending => Cycle::new(4), ImeEnabled | NonePending => Cycle::new(4),
SomePending => todo!("Implement HALT bug"), SomePending => todo!("Implement HALT bug"),
} }
} }
@ -470,7 +470,7 @@ impl From<u8> for Flags {
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
pub enum HaltState { pub enum HaltState {
ImeSet, ImeEnabled,
NonePending, NonePending,
SomePending, SomePending,
} }

View File

@ -612,7 +612,7 @@ impl Instruction {
let enabled = cpu.read_byte(0xFFFF); let enabled = cpu.read_byte(0xFFFF);
let halt_state = if let ImeState::Enabled = cpu.ime() { let halt_state = if let ImeState::Enabled = cpu.ime() {
ImeSet ImeEnabled
} else if req & enabled != 0 { } else if req & enabled != 0 {
SomePending SomePending
} else { } else {