From c5a0e861235d499d651ba7c7bfa95553efabb895 Mon Sep 17 00:00:00 2001 From: Marko Pusljar Date: Sat, 13 Mar 2010 10:29:32 +0000 Subject: [PATCH] DSPLLE - u16 aram reads (zelda type) fixed git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5192 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DSPAccelerator.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Core/DSPCore/Src/DSPAccelerator.cpp b/Source/Core/DSPCore/Src/DSPAccelerator.cpp index 4ce510b64d..946426161f 100644 --- a/Source/Core/DSPCore/Src/DSPAccelerator.cpp +++ b/Source/Core/DSPCore/Src/DSPAccelerator.cpp @@ -77,8 +77,8 @@ u16 dsp_read_aram_d3() Address++; break; case 0x6: // u16 reads - val = (DSPHost_ReadHostMemory(Address) << 8) | DSPHost_ReadHostMemory(Address + 1); - Address += 2; + val = (DSPHost_ReadHostMemory(Address*2) << 8) | DSPHost_ReadHostMemory(Address*2 + 1); + Address++; break; default: ERROR_LOG(DSPLLE, "dsp_read_aram_d3: Unseen Format %i", g_dsp.ifx_regs[DSP_FORMAT]); @@ -101,10 +101,10 @@ void dsp_write_aram_d3(u16 value) // const u32 EndAddress = (g_dsp.ifx_regs[DSP_ACEAH] << 16) | g_dsp.ifx_regs[DSP_ACEAL]; // Unused? u32 Address = (g_dsp.ifx_regs[DSP_ACCAH] << 16) | g_dsp.ifx_regs[DSP_ACCAL]; switch (g_dsp.ifx_regs[DSP_FORMAT]) { - case 0xA: // 16-bit writes - DSPHost_WriteHostMemory(value >> 8, Address); - DSPHost_WriteHostMemory(value & 0xFF, Address + 1); - Address += 2; + case 0xA: // u16 writes + DSPHost_WriteHostMemory(value >> 8, Address*2); + DSPHost_WriteHostMemory(value & 0xFF, Address*2 + 1); + Address++; break; default: ERROR_LOG(DSPLLE, "dsp_write_aram_d3: Unseen Format %i", g_dsp.ifx_regs[DSP_FORMAT]); @@ -136,13 +136,13 @@ u16 dsp_read_accelerator() val = (DSPHost_ReadHostMemory(Address*2) << 8) | DSPHost_ReadHostMemory(Address*2 + 1); g_dsp.ifx_regs[DSP_YN2] = g_dsp.ifx_regs[DSP_YN1]; g_dsp.ifx_regs[DSP_YN1] = val; - Address += 1; + Address++; break; case 0x19: // 8-bit PCM audio val = DSPHost_ReadHostMemory(Address) << 8; // probably wrong g_dsp.ifx_regs[DSP_YN2] = g_dsp.ifx_regs[DSP_YN1]; g_dsp.ifx_regs[DSP_YN1] = val; - Address += 1; + Address++; break; default: ERROR_LOG(DSPLLE, "Unknown DSP Format %x", g_dsp.ifx_regs[DSP_FORMAT]);