From d5e60af439adecdcf4bede3acb48c30d95199c65 Mon Sep 17 00:00:00 2001 From: refraction Date: Mon, 29 Nov 2010 20:33:22 +0000 Subject: [PATCH] DMA: Disallow MADR/QWC/TADR writes while the DMA is busy, solves the Mana Khemia voodooness git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4061 96395faa-99c1-11dd-bbfe-3dabce05a288 --- pcsx2/ps2/LegacyDmac.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pcsx2/ps2/LegacyDmac.cpp b/pcsx2/ps2/LegacyDmac.cpp index 51e1a1db70..d40f588aa6 100644 --- a/pcsx2/ps2/LegacyDmac.cpp +++ b/pcsx2/ps2/LegacyDmac.cpp @@ -413,6 +413,16 @@ __fi bool dmacWrite32( u32 mem, mem32_t& value ) } } + //DMA Writes are invalid to everything except the STR on CHCR when it is busy + if((mem & 0xf0)) + { + if((psHu32(mem & ~0xff) & 0x100) && dmacRegs.ctrl.DMAE && !psHu8(DMAC_ENABLER+2)) + { + DevCon.Warning("Write to DMA addr %x while STR is busy! Ignoring", mem); + return false; + } + } + // fall-through: use the default writeback provided by caller. return true; }