added IE and IME check to interrupts
This commit is contained in:
parent
86ba586d00
commit
2ccfbdf116
|
@ -181,16 +181,22 @@ 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));
|
||||
NDS_ARM9.wIRQ = TRUE;
|
||||
NDS_ARM9.waitIRQ = FALSE;
|
||||
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));
|
||||
NDS_ARM7.wIRQ = TRUE;
|
||||
NDS_ARM7.waitIRQ = FALSE;
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue