added IE and IME check to interrupts

This commit is contained in:
mightymax 2007-01-13 19:08:58 +00:00
parent 86ba586d00
commit 2ccfbdf116
1 changed files with 12 additions and 6 deletions

View File

@ -181,17 +181,23 @@ extern armcpu_t NDS_ARM9;
static INLINE void NDS_makeARM9Int(u32 num)
{
MMU.reg_IF[0] |= (1<<num);// & (MMU.reg_IME[0] << num);//& (MMU.reg_IE[0] & (1<<num));
if ((MMU.reg_IE[0] & (1 << num)) && MMU.reg_IME[0])
{
MMU.reg_IF[0] |= (1<<num);
NDS_ARM9.wIRQ = TRUE;
NDS_ARM9.waitIRQ = FALSE;
}
}
static INLINE void NDS_makeARM7Int(u32 num)
{
MMU.reg_IF[1] |= (1<<num);// & (MMU.reg_IME[1] << num);// (MMU.reg_IE[1] & (1<<num));
if ((MMU.reg_IE[1] & (1 << num)) && MMU.reg_IME[1])
{
MMU.reg_IF[1] |= (1<<num);
NDS_ARM7.wIRQ = TRUE;
NDS_ARM7.waitIRQ = FALSE;
}
}
#ifdef __cplusplus
}