Bug 1681415 fix: flag interrupt sources correctly.
This commit is contained in:
parent
67c9329cbe
commit
0a0181bf3a
|
@ -182,9 +182,12 @@ extern armcpu_t NDS_ARM9;
|
||||||
|
|
||||||
static INLINE void NDS_makeARM9Int(u32 num)
|
static INLINE void NDS_makeARM9Int(u32 num)
|
||||||
{
|
{
|
||||||
|
/* flag the interrupt request source */
|
||||||
|
MMU.reg_IF[0] |= (1<<num);
|
||||||
|
|
||||||
|
/* generate the interrupt if enabled */
|
||||||
if ((MMU.reg_IE[0] & (1 << num)) && MMU.reg_IME[0])
|
if ((MMU.reg_IE[0] & (1 << num)) && MMU.reg_IME[0])
|
||||||
{
|
{
|
||||||
MMU.reg_IF[0] |= (1<<num);
|
|
||||||
NDS_ARM9.wIRQ = TRUE;
|
NDS_ARM9.wIRQ = TRUE;
|
||||||
NDS_ARM9.waitIRQ = FALSE;
|
NDS_ARM9.waitIRQ = FALSE;
|
||||||
}
|
}
|
||||||
|
@ -192,9 +195,12 @@ static INLINE void NDS_makeARM9Int(u32 num)
|
||||||
|
|
||||||
static INLINE void NDS_makeARM7Int(u32 num)
|
static INLINE void NDS_makeARM7Int(u32 num)
|
||||||
{
|
{
|
||||||
|
/* flag the interrupt request source */
|
||||||
|
MMU.reg_IF[1] |= (1<<num);
|
||||||
|
|
||||||
|
/* generate the interrupt if enabled */
|
||||||
if ((MMU.reg_IE[1] & (1 << num)) && MMU.reg_IME[1])
|
if ((MMU.reg_IE[1] & (1 << num)) && MMU.reg_IME[1])
|
||||||
{
|
{
|
||||||
MMU.reg_IF[1] |= (1<<num);
|
|
||||||
NDS_ARM7.wIRQ = TRUE;
|
NDS_ARM7.wIRQ = TRUE;
|
||||||
NDS_ARM7.waitIRQ = FALSE;
|
NDS_ARM7.waitIRQ = FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue