aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2020-12-11 18:06:26 +0100
committerArisotura <thetotalworm@gmail.com>2020-12-11 18:06:26 +0100
commit49317e9165263ba01df5d875f07081786a51241e (patch)
tree50b6eab4fcb378720858ce02253f5c5ef5b1e8ab /src
parentaac843c7deddae52ce46275f8c828bcac42b4693 (diff)
don't axe error bits when writing to IPCFIFOCNT. fixes #801
Diffstat (limited to 'src')
-rw-r--r--src/NDS.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/NDS.cpp b/src/NDS.cpp
index b8b83f7..8b49328 100644
--- a/src/NDS.cpp
+++ b/src/NDS.cpp
@@ -3245,7 +3245,7 @@ void ARM9IOWrite16(u32 addr, u16 val)
SetIRQ(0, IRQ_IPCRecv);
if (val & 0x4000)
IPCFIFOCnt9 &= ~0x4000;
- IPCFIFOCnt9 = val & 0x8404;
+ IPCFIFOCnt9 = (val & 0x8404) | (IPCFIFOCnt9 & 0x4000);
return;
case 0x04000188:
@@ -3848,7 +3848,7 @@ void ARM7IOWrite16(u32 addr, u16 val)
SetIRQ(1, IRQ_IPCRecv);
if (val & 0x4000)
IPCFIFOCnt7 &= ~0x4000;
- IPCFIFOCnt7 = val & 0x8404;
+ IPCFIFOCnt7 = (val & 0x8404) | (IPCFIFOCnt7 & 0x4000);
return;
case 0x04000188: