DSPLLE - u16 aram reads (zelda type) fixed

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5192 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marko Pusljar 2010-03-13 10:29:32 +00:00
parent 34d1d7a41e
commit c5a0e86123
1 changed files with 8 additions and 8 deletions

View File

@ -77,8 +77,8 @@ u16 dsp_read_aram_d3()
Address++; Address++;
break; break;
case 0x6: // u16 reads case 0x6: // u16 reads
val = (DSPHost_ReadHostMemory(Address) << 8) | DSPHost_ReadHostMemory(Address + 1); val = (DSPHost_ReadHostMemory(Address*2) << 8) | DSPHost_ReadHostMemory(Address*2 + 1);
Address += 2; Address++;
break; break;
default: default:
ERROR_LOG(DSPLLE, "dsp_read_aram_d3: Unseen Format %i", g_dsp.ifx_regs[DSP_FORMAT]); 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? // 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]; u32 Address = (g_dsp.ifx_regs[DSP_ACCAH] << 16) | g_dsp.ifx_regs[DSP_ACCAL];
switch (g_dsp.ifx_regs[DSP_FORMAT]) { switch (g_dsp.ifx_regs[DSP_FORMAT]) {
case 0xA: // 16-bit writes case 0xA: // u16 writes
DSPHost_WriteHostMemory(value >> 8, Address); DSPHost_WriteHostMemory(value >> 8, Address*2);
DSPHost_WriteHostMemory(value & 0xFF, Address + 1); DSPHost_WriteHostMemory(value & 0xFF, Address*2 + 1);
Address += 2; Address++;
break; break;
default: default:
ERROR_LOG(DSPLLE, "dsp_write_aram_d3: Unseen Format %i", g_dsp.ifx_regs[DSP_FORMAT]); 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); 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_YN2] = g_dsp.ifx_regs[DSP_YN1];
g_dsp.ifx_regs[DSP_YN1] = val; g_dsp.ifx_regs[DSP_YN1] = val;
Address += 1; Address++;
break; break;
case 0x19: // 8-bit PCM audio case 0x19: // 8-bit PCM audio
val = DSPHost_ReadHostMemory(Address) << 8; // probably wrong val = DSPHost_ReadHostMemory(Address) << 8; // probably wrong
g_dsp.ifx_regs[DSP_YN2] = g_dsp.ifx_regs[DSP_YN1]; g_dsp.ifx_regs[DSP_YN2] = g_dsp.ifx_regs[DSP_YN1];
g_dsp.ifx_regs[DSP_YN1] = val; g_dsp.ifx_regs[DSP_YN1] = val;
Address += 1; Address++;
break; break;
default: default:
ERROR_LOG(DSPLLE, "Unknown DSP Format %x", g_dsp.ifx_regs[DSP_FORMAT]); ERROR_LOG(DSPLLE, "Unknown DSP Format %x", g_dsp.ifx_regs[DSP_FORMAT]);