cpu/cpu - Fix build errors
This commit is contained in:
parent
5d5f1803b2
commit
3f1a23b7e5
1 changed files with 6 additions and 6 deletions
12
cpu/cpu.cpp
12
cpu/cpu.cpp
|
@ -251,16 +251,16 @@ bool Cpu::handleInterrupts()
|
||||||
|
|
||||||
if (state.IME == IME_SCHEDULED)
|
if (state.IME == IME_SCHEDULED)
|
||||||
state.IME = IME_ON;
|
state.IME = IME_ON;
|
||||||
else if (state.IME == IME_ON && si != 0)
|
else if (state.IME == IME_ON && state.SI() != 0)
|
||||||
{
|
{
|
||||||
u16 isr;
|
u16 isr;
|
||||||
InterruptType it;
|
InterruptType it;
|
||||||
|
|
||||||
if (si & INT_VBlank) { it = INT_VBlank; isr = 0x40; }
|
if (state.SI() & INT_VBlank) { it = INT_VBlank; isr = 0x40; }
|
||||||
else if (si & INT_LCDSTAT) { it = INT_LCDSTAT; isr = 0x48; }
|
else if (state.SI() & INT_LCDSTAT) { it = INT_LCDSTAT; isr = 0x48; }
|
||||||
else if (si & INT_Timer) { it = INT_Timer; isr = 0x50; }
|
else if (state.SI() & INT_Timer) { it = INT_Timer; isr = 0x50; }
|
||||||
else if (si & INT_Serial) { it = INT_Serial; isr = 0x58; }
|
else if (state.SI() & INT_Serial) { it = INT_Serial; isr = 0x58; }
|
||||||
else if (si & INT_Joypad) { it = INT_Joypad; isr = 0x60; }
|
else if (state.SI() & INT_Joypad) { it = INT_Joypad; isr = 0x60; }
|
||||||
else panic("Can't find pending interrupt IE=%02x IF=%02x\n", state.IE, state.IF);
|
else panic("Can't find pending interrupt IE=%02x IF=%02x\n", state.IE, state.IF);
|
||||||
|
|
||||||
state.IME = IME_OFF; // Disable IME
|
state.IME = IME_OFF; // Disable IME
|
||||||
|
|
Loading…
Reference in a new issue