diff options
| author | death2droid <death2droid@gmail.com> | 2009-05-10 21:37:20 +0000 |
|---|---|---|
| committer | death2droid <death2droid@gmail.com> | 2009-05-10 21:37:20 +0000 |
| commit | 8d19e264b9cfb77d63b3382f2310fa3f54aaae32 (patch) | |
| tree | 9979eac511ba479e695f2f9bc4b775175db3a468 | |
| parent | 55b563780869869ae16164c276ac5d57bd158ed1 (diff) | |
Cleaned up the RE0 fix a bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3195 8ced0084-cf51-0410-be5f-012b33b47a6e
| -rw-r--r-- | Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp index 648bf5002d..77d1161322 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/UCodes/UCode_AX.cpp @@ -344,25 +344,26 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize) int numupd = upd0 + upd1 + upd2 + upd3 + upd4; if(numupd > 64) numupd = 64; // prevent crazy values const u32 updaddr = (u32)(upd_hi << 16) | upd_lo; - const u16 updpar = 0; - const u16 upddata = 0; + const u16 updpar = 0; + const u16 upddata = 0; int on = false, off = false; - if(!g_Config.m_EnableRE0Fix) - { - for (int j = 0; j < numupd; j++) - { + for (int j = 0; j < numupd; j++) + { + if(!g_Config.m_EnableRE0Fix) + { const u16 updpar = Memory_Read_U16(updaddr + j); const u16 upddata = Memory_Read_U16(updaddr + j + 2); + DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : General Mail (%08x)", _uMail); } - } - else - { - const u16 updpar = Memory_Read_U16(updaddr); - const u16 upddata = Memory_Read_U16(updaddr + 2); - } - if (!g_Config.m_EnableRE0Fix || g_Config.m_EnableRE0Fix) - { + else + { + const u16 updpar = Memory_Read_U16(updaddr); + const u16 upddata = Memory_Read_U16(updaddr + 2); + DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : General Mail (%08x)", _uMail); + } + + // some safety checks, I hope it's enough if(updaddr > 0x80000000 && updaddr < 0x817fffff && updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change @@ -376,8 +377,8 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize) if (updpar == 7 && upddata == 1) on++; if (updpar == 7 && upddata == 1) off++; - // hack: if we get both an on and an off select on rather than off - if (on > 0 && off > 0) pDest[7] = 1; + // hack: if we get both an on and an off select on rather than off + if (on > 0 && off > 0) pDest[7] = 1; } } |
