Cleaned up the RE0 fix a bit.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3195 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2009-05-10 21:37:20 +00:00
parent 55b5637808
commit 8d19e264b9
1 changed files with 17 additions and 16 deletions

View File

@ -348,21 +348,22 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
const u16 upddata = 0; const u16 upddata = 0;
int on = false, off = false; 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 updpar = Memory_Read_U16(updaddr + j);
const u16 upddata = Memory_Read_U16(updaddr + j + 2); const u16 upddata = Memory_Read_U16(updaddr + j + 2);
} DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : General Mail (%08x)", _uMail);
} }
else else
{ {
const u16 updpar = Memory_Read_U16(updaddr); const u16 updpar = Memory_Read_U16(updaddr);
const u16 upddata = Memory_Read_U16(updaddr + 2); const u16 upddata = Memory_Read_U16(updaddr + 2);
DEBUG_LOG(DSPHLE, " >>>> u32 MAIL : General Mail (%08x)", _uMail);
} }
if (!g_Config.m_EnableRE0Fix || g_Config.m_EnableRE0Fix)
{
// some safety checks, I hope it's enough // some safety checks, I hope it's enough
if(updaddr > 0x80000000 && updaddr < 0x817fffff if(updaddr > 0x80000000 && updaddr < 0x817fffff
&& updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change && updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change