cpu - Fix build errors
This commit is contained in:
parent
c4a9a10e09
commit
aec3c7b0e6
2 changed files with 7 additions and 7 deletions
10
cpu/cpu.cpp
10
cpu/cpu.cpp
|
@ -54,11 +54,11 @@ Cpu::Cpu(Mem_device* bus)
|
|||
|
||||
void Cpu::step()
|
||||
{
|
||||
if(stopped) return;
|
||||
if(state.stopped) return;
|
||||
|
||||
if(!handleInterrupts()) // if no isr has been called, decode an instruction
|
||||
{
|
||||
if (halted)
|
||||
if (state.halted)
|
||||
processed_mcycles += 4;
|
||||
else
|
||||
executeInstruction();
|
||||
|
@ -83,8 +83,8 @@ void Cpu::reset()
|
|||
state.IE = 0;
|
||||
state.IF = 0;
|
||||
|
||||
halted = false;
|
||||
stopped = false;
|
||||
state.halted = false;
|
||||
state.stopped = false;
|
||||
}
|
||||
|
||||
u8 Cpu::readPC8()
|
||||
|
@ -235,7 +235,7 @@ bool Cpu::handleInterrupts()
|
|||
|
||||
// Once there's an interrupt we exit halt mode
|
||||
if (si)
|
||||
halted = false;
|
||||
state.halted = false;
|
||||
|
||||
if (state.IME == IME_SCHEDULED)
|
||||
state.IME = IME_ON;
|
||||
|
|
|
@ -472,11 +472,11 @@ void Cpu::executeInstruction()
|
|||
break;
|
||||
|
||||
case 0x76: // HALT
|
||||
halted = true;
|
||||
state.halted = true;
|
||||
break;
|
||||
case 0x10: // STOP n8
|
||||
(void)readPC8();
|
||||
stopped = true;
|
||||
state.stopped = true;
|
||||
break;
|
||||
|
||||
case 0xE8: // ADD SP, e8
|
||||
|
|
Loading…
Reference in a new issue