Sanity check, this could help us to figure out the ARAM DMA crash.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4956 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx 2010-01-25 09:48:27 +00:00
parent 85c2310b03
commit efc7cd6581
1 changed files with 15 additions and 3 deletions

View File

@ -436,6 +436,12 @@ void Write16(const u16 _Value, const u32 _Address)
case AR_DMA_CNT_L:
g_arDMA.Cnt.Hex = (g_arDMA.Cnt.Hex & 0xFFFF0000) | (_Value);
if (g_arDMA.Cnt.count % 8)
{
PanicAlert("DSPINTERFACE: ARAM DMA count: %08x not aligned to 8 bytes!", g_arDMA.Cnt.Hex);
ERROR_LOG(DSPINTERFACE, "ARAM DMA count: %08x not aligned to 8 bytes!", g_arDMA.Cnt.Hex);
}
else
Do_ARAM_DMA();
break;
@ -509,6 +515,12 @@ void Write32(const u32 _iValue, const u32 _iAddress)
case AR_DMA_CNT_H:
g_arDMA.Cnt.Hex = _iValue;
if (g_arDMA.Cnt.count % 8)
{
PanicAlert("DSPINTERFACE: ARAM DMA count: %08x not aligned to 8 bytes!", g_arDMA.Cnt.Hex);
ERROR_LOG(DSPINTERFACE, "ARAM DMA count: %08x not aligned to 8 bytes!", g_arDMA.Cnt.Hex);
}
else
Do_ARAM_DMA();
break;