mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
DSP: Fix broken disassembly (deleted some remaining byteswaps). Don't check for external interrupts every cycle. Loop endpoint detector added to Analyzer (this will be useful for a future JIT).
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2940 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -103,11 +103,10 @@ u16 gdsp_mbox_read_h(u8 mbx)
|
||||
|
||||
u16 gdsp_mbox_read_l(u8 mbx)
|
||||
{
|
||||
u16 val;
|
||||
if (g_dspInitialize.bOnThread)
|
||||
g_CriticalSection.Enter();
|
||||
|
||||
val = gdsp_mbox[mbx][1];
|
||||
u16 val = gdsp_mbox[mbx][1];
|
||||
gdsp_mbox[mbx][0] &= ~0x8000;
|
||||
|
||||
DEBUG_LOG(DSPLLE, "- DSP reads mail from mbx %i: %08x (pc=0x%04x)", mbx, gdsp_mbox_peek(mbx), g_dsp.pc);
|
||||
@ -198,7 +197,7 @@ u16 gdsp_ifx_read(u16 addr)
|
||||
break;
|
||||
}
|
||||
|
||||
return(val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
@ -208,9 +207,9 @@ void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
||||
|
||||
u8* dst = ((u8*)g_dsp.iram);
|
||||
for (u32 i = 0; i < size; i += 2)
|
||||
{
|
||||
{
|
||||
// TODO : this may be different on Wii.
|
||||
*(u16*)&dst[dsp_addr + i] = Common::swap16(*(u16*)&g_dsp.cpu_ram[(addr + i) & 0x0fffffff]);
|
||||
*(u16*)&dst[dsp_addr + i] = Common::swap16(*(const u16*)&g_dsp.cpu_ram[(addr + i) & 0x0fffffff]);
|
||||
}
|
||||
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
||||
|
||||
@ -241,7 +240,7 @@ void gdsp_ddma_in(u16 dsp_addr, u32 addr, u32 size)
|
||||
|
||||
for (u32 i = 0; i < size; i += 2)
|
||||
{
|
||||
*(u16*)&dst[dsp_addr + i] = Common::swap16(*(u16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF]);
|
||||
*(u16*)&dst[dsp_addr + i] = Common::swap16(*(const u16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF]);
|
||||
}
|
||||
|
||||
INFO_LOG(DSPLLE, "*** ddma_in RAM (0x%08x) -> DRAM_DSP (0x%04x) : size (0x%08x)\n", addr, dsp_addr / 2, size);
|
||||
@ -256,11 +255,11 @@ void gdsp_ddma_out(u16 dsp_addr, u32 addr, u32 size)
|
||||
return;
|
||||
}
|
||||
|
||||
u8* src = ((u8*)g_dsp.dram);
|
||||
const u8* src = ((const u8*)g_dsp.dram);
|
||||
|
||||
for (u32 i = 0; i < size; i += 2)
|
||||
{
|
||||
*(u16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF] = Common::swap16(*(u16*)&src[dsp_addr + i]);
|
||||
*(u16*)&g_dsp.cpu_ram[(addr + i) & 0x7FFFFFFF] = Common::swap16(*(const u16*)&src[dsp_addr + i]);
|
||||
}
|
||||
|
||||
INFO_LOG(DSPLLE, "*** ddma_out DRAM_DSP (0x%04x) -> RAM (0x%08x) : size (0x%08x)\n", dsp_addr / 2, addr, size);
|
||||
|
Reference in New Issue
Block a user