mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
DSPLLE minor cleanup nothing important
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3789 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
fda61d91d5
commit
c6b3c6a69b
@ -121,7 +121,6 @@ bool DSPCore_Init(const char *irom_filename, const char *coef_filename)
|
|||||||
|
|
||||||
g_dsp.cr = 0x804;
|
g_dsp.cr = 0x804;
|
||||||
gdsp_ifx_init();
|
gdsp_ifx_init();
|
||||||
|
|
||||||
// Mostly keep IRAM write protected. We unprotect only when DMA-ing
|
// Mostly keep IRAM write protected. We unprotect only when DMA-ing
|
||||||
// in new ucodes.
|
// in new ucodes.
|
||||||
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
||||||
|
@ -236,7 +236,6 @@ u16 gdsp_ifx_read(u16 addr)
|
|||||||
|
|
||||||
void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
||||||
{
|
{
|
||||||
static bool reset = true;
|
|
||||||
UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
||||||
|
|
||||||
u8* dst = ((u8*)g_dsp.iram);
|
u8* dst = ((u8*)g_dsp.iram);
|
||||||
@ -246,17 +245,12 @@ void gdsp_idma_in(u16 dsp_addr, u32 addr, u32 size)
|
|||||||
*(u16*)&dst[dsp_addr + i] = Common::swap16(*(const 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);
|
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
|
||||||
|
|
||||||
|
g_dsp.iram_crc = DSPHost_CodeLoaded(g_dsp.cpu_ram + (addr & 0x0fffffff), size);
|
||||||
|
|
||||||
NOTICE_LOG(DSPLLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)", addr, dsp_addr, g_dsp.iram_crc);
|
NOTICE_LOG(DSPLLE, "*** Copy new UCode from 0x%08x to 0x%04x (crc: %8x)", addr, dsp_addr, g_dsp.iram_crc);
|
||||||
g_dsp.iram_crc = DSPHost_CodeLoaded(g_dsp.cpu_ram + (addr & 0x0fffffff), size);
|
|
||||||
DSPAnalyzer::Analyze();
|
|
||||||
|
|
||||||
if (reset) {
|
DSPAnalyzer::Analyze();
|
||||||
// This calls the reset functions, but it get some games stuck
|
|
||||||
// uncomment it to help with debugging
|
|
||||||
// DSPCore_SetException(EXP_RESET);
|
|
||||||
reset = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -321,7 +315,9 @@ void gdsp_do_dma()
|
|||||||
ERROR_LOG(DSPLLE, "DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
|
ERROR_LOG(DSPLLE, "DMA ERROR pc: %04x ctl: %04x addr: %08x da: %04x size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_EXP
|
||||||
|
NOTICE_LOG(DSPLLE, "DMA pc: %04x ctl: %04x addr: %08x da: %04x size: %04x", g_dsp.pc, ctl, addr, dsp_addr, len);
|
||||||
|
#endif
|
||||||
switch (ctl & 0x3)
|
switch (ctl & 0x3)
|
||||||
{
|
{
|
||||||
case (DSP_CR_DMEM | DSP_CR_TO_CPU):
|
case (DSP_CR_DMEM | DSP_CR_TO_CPU):
|
||||||
|
@ -75,9 +75,9 @@ void Step()
|
|||||||
{
|
{
|
||||||
DSPCore_CheckExceptions();
|
DSPCore_CheckExceptions();
|
||||||
|
|
||||||
|
#if PROFILE
|
||||||
g_dsp.step_counter++;
|
g_dsp.step_counter++;
|
||||||
|
|
||||||
#if PROFILE
|
|
||||||
g_dsp.err_pc = g_dsp.pc;
|
g_dsp.err_pc = g_dsp.pc;
|
||||||
|
|
||||||
ProfilerAddDelta(g_dsp.err_pc, 1);
|
ProfilerAddDelta(g_dsp.err_pc, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user