DSP: Fix sln file now that old LLE is dead. Add preliminary DSPAnalyzer, which looks for idle skip opportunities.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2930 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2009-04-08 17:58:58 +00:00
parent 5c56066519
commit 541832e4f0
10 changed files with 209 additions and 67 deletions

View File

@ -27,6 +27,7 @@
#include <stdlib.h>
#include "DSPTables.h"
#include "DSPAnalyzer.h"
#include "gdsp_interface.h"
#include "gdsp_opcodes_helper.h"
@ -80,15 +81,16 @@ void gdsp_init()
}
}
// Fill memories with junk.
// Fill IRAM with HALT opcodes.
for (int i = 0; i < DSP_IRAM_SIZE; i++)
{
g_dsp.iram[i] = 0x0021; // HALT opcode
}
// Just zero out DRAM.
for (int i = 0; i < DSP_DRAM_SIZE; i++)
{
g_dsp.dram[i] = 0x0021; // HALT opcode
g_dsp.dram[i] = 0x0021;
}
// copied from a real console after the custom UCode has been loaded
@ -105,6 +107,7 @@ void gdsp_init()
// Mostly keep IRAM write protected. We unprotect only when DMA-ing
// in new ucodes.
WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false);
DSPAnalyzer::Analyze();
}
void gdsp_shutdown()