diff --git a/src/GPU2D.cpp b/src/GPU2D.cpp index 4ad0853a..e76e85c1 100644 --- a/src/GPU2D.cpp +++ b/src/GPU2D.cpp @@ -387,6 +387,14 @@ void Unit::Write16(u32 addr, u16 val) if (!Num) GPU.GPU3D.SetRenderXPos(val); break; + case 0x064: + CaptureCnt = (CaptureCnt & 0xFFFF0000) | (val & 0xEF3F1F1F); + return; + + case 0x066: + CaptureCnt = (CaptureCnt & 0xFFFF) | ((val << 16) & 0xEF3F1F1F); + return; + case 0x068: DispFIFO[DispFIFOWritePtr] = val; return; diff --git a/src/NDS.cpp b/src/NDS.cpp index 212521fd..5cfd167c 100644 --- a/src/NDS.cpp +++ b/src/NDS.cpp @@ -2946,6 +2946,8 @@ u16 NDS::ARM9IORead16(u32 addr) case 0x04000208: return IME[0]; case 0x04000210: return IE[0] & 0xFFFF; case 0x04000212: return IE[0] >> 16; + case 0x04000214: return IF[0] & 0xFFFF; + case 0x04000216: return IF[0] >> 16; case 0x04000240: return GPU.VRAMCNT[0] | (GPU.VRAMCNT[1] << 8); case 0x04000242: return GPU.VRAMCNT[2] | (GPU.VRAMCNT[3] << 8); @@ -3257,6 +3259,9 @@ void NDS::ARM9IOWrite16(u32 addr, u16 val) case 0x04000060: GPU.GPU3D.Write16(addr, val); return; + case 0x04000064: + case 0x04000066: GPU.GPU2D_A.Write16(addr, val); return; + case 0x04000068: case 0x0400006A: GPU.GPU2D_A.Write16(addr, val); return; @@ -3385,6 +3390,8 @@ void NDS::ARM9IOWrite16(u32 addr, u16 val) case 0x04000210: IE[0] = (IE[0] & 0xFFFF0000) | val; UpdateIRQ(0); return; case 0x04000212: IE[0] = (IE[0] & 0x0000FFFF) | (val << 16); UpdateIRQ(0); return; // TODO: what happens when writing to IF this way?? + case 0x04000214: IF[0] &= ~val; GPU.GPU3D.CheckFIFOIRQ(); UpdateIRQ(0); return; + case 0x04000216: IF[0] &= ~(val<<16); GPU.GPU3D.CheckFIFOIRQ(); UpdateIRQ(0); return; case 0x04000240: GPU.MapVRAM_AB(0, val & 0xFF);