service interrupts when halted
This commit is contained in:
parent
8ef947d54a
commit
f518e390fa
|
@ -114,7 +114,7 @@ impl CPU {
|
|||
}
|
||||
|
||||
fn handle_interrupts(&mut self) -> u8 {
|
||||
if self.memory.ime {
|
||||
if self.memory.ime || self.halted {
|
||||
let req_and_enabled = self.memory.get(0xFF0F) & self.memory.get(0xFFFF);
|
||||
// all interrupts should last 5 cycles?
|
||||
if get_bit(req_and_enabled, 0) {
|
||||
|
|
Loading…
Reference in a new issue