diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-01-17 05:29:38 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-01-17 05:29:38 +0100 |
commit | b10a0d64a2161a9efaf7548f7bf9942ac829d660 (patch) | |
tree | ea80b4505b300db7e13bb39893978fc5d9a9b1b3 | |
parent | 8ea2aaad5af82c4141e876efba3d2066a9685565 (diff) |
fix bug with IPC FIFO IRQs
-rw-r--r-- | NDS.cpp | 6 | ||||
-rw-r--r-- | melonDS.depend | 2 |
2 files changed, 5 insertions, 3 deletions
@@ -1433,8 +1433,9 @@ void ARM9IOWrite32(u32 addr, u32 val) IPCFIFOCnt9 |= 0x4000; else { + bool wasempty = IPCFIFO9->IsEmpty(); IPCFIFO9->Write(val); - if (IPCFIFOCnt7 & 0x0400) + if ((IPCFIFOCnt7 & 0x0400) && wasempty) TriggerIRQ(1, IRQ_IPCRecv); } } @@ -1736,8 +1737,9 @@ void ARM7IOWrite32(u32 addr, u32 val) IPCFIFOCnt7 |= 0x4000; else { + bool wasempty = IPCFIFO7->IsEmpty(); IPCFIFO7->Write(val); - if (IPCFIFOCnt9 & 0x0400) + if ((IPCFIFOCnt9 & 0x0400) && wasempty) TriggerIRQ(0, IRQ_IPCRecv); } } diff --git a/melonDS.depend b/melonDS.depend index 3e315d8..32c870b 100644 --- a/melonDS.depend +++ b/melonDS.depend @@ -67,7 +67,7 @@ 1481037554 c:\documents\sources\melonds\cp15.h -1484524458 source:c:\documents\sources\melonds\cp15.cpp +1484616493 source:c:\documents\sources\melonds\cp15.cpp <stdio.h> "NDS.h" "ARM.h" |