cpu - Fix build errors

This commit is contained in:
madmaurice 2023-08-30 00:01:45 +02:00
parent c4a9a10e09
commit aec3c7b0e6
2 changed files with 7 additions and 7 deletions

View file

@ -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;

View file

@ -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