mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-27 08:10:13 -06:00
DSP: Remove all mentions of the mysterious DROM. Write protect the ROMs and IRAM as much as possible while loaded (to make sure they don't get corrupted by some memory overwrite or whatever). Make instruction reads stricter - iram and irom don't wrap anymore (not 100% sure about this one). Misc cleanup + changes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2904 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -336,9 +336,27 @@ dspInstFunc opTable[OPTABLE_SIZE];
|
||||
dspInstFunc prologueTable[OPTABLE_SIZE];
|
||||
dspInstFunc epilogueTable[OPTABLE_SIZE];
|
||||
|
||||
const DSPOPCTemplate *GetOpTemplate(const UDSPInstruction &inst)
|
||||
{
|
||||
for (int i = 0; i < opcodes_size; i++)
|
||||
{
|
||||
u16 mask = opcodes[i].opcode_mask;
|
||||
if (opcodes[i].size & P_EXT) {
|
||||
// Ignore extension bits.
|
||||
mask &= 0xFF00;
|
||||
}
|
||||
if ((mask & inst.hex) == opcodes[i].opcode)
|
||||
return &opcodes[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
// This function could use the above GetOpTemplate, but then we'd lose the
|
||||
// nice property that it catches colliding op masks.
|
||||
void InitInstructionTable()
|
||||
{
|
||||
for (u32 i = 0; i < OPTABLE_SIZE; i++)
|
||||
for (int i = 0; i < OPTABLE_SIZE; i++)
|
||||
{
|
||||
opTable[i] = DSPInterpreter::unknown;
|
||||
prologueTable[i] = NULL;
|
||||
@ -346,7 +364,7 @@ void InitInstructionTable()
|
||||
opSize[i] = 0;
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < OPTABLE_SIZE; i++)
|
||||
for (int i = 0; i < OPTABLE_SIZE; i++)
|
||||
{
|
||||
for (u32 j = 0; j < opcodes_size; j++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user