mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 12:35:27 +00:00
DSP: fix IF_CC - could end up in the middle of ops if they were multiword!
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2882 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4913912dbb
commit
40a7cd15ad
@ -32,8 +32,7 @@ namespace DSPInterpreter {
|
||||
void unknown(const UDSPInstruction& opc)
|
||||
{
|
||||
//_assert_msg_(MASTER_LOG, !g_dsp.exception_in_progress_hack, "assert while exception");
|
||||
ERROR_LOG(DSPHLE, "LLE: Unrecognized opcode 0x%04x, pc 0x%04x", opc.hex, g_dsp.pc - 1);
|
||||
//g_dsp.pc = g_dsp.err_pc;
|
||||
ERROR_LOG(DSPHLE, "LLE: Unrecognized opcode 0x%04x, pc 0x%04x", opc.hex, g_dsp.err_pc);
|
||||
}
|
||||
|
||||
// Generic call implementation
|
||||
@ -68,7 +67,8 @@ void ifcc(const UDSPInstruction& opc)
|
||||
{
|
||||
if (!CheckCondition(opc.hex & 0xf))
|
||||
{
|
||||
dsp_fetch_code(); // skip the next opcode
|
||||
// skip the next opcode - we have to lookup its size.
|
||||
g_dsp.pc += opSize[dsp_peek_code()];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,6 +315,7 @@ DSPOPCTemplate opcodes_ext[] =
|
||||
const u32 opcodes_size = sizeof(opcodes) / sizeof(DSPOPCTemplate);
|
||||
const u32 opcodes_ext_size = sizeof(opcodes_ext) / sizeof(DSPOPCTemplate);
|
||||
|
||||
u8 opSize[OPTABLE_SIZE];
|
||||
dspInstFunc opTable[OPTABLE_SIZE];
|
||||
dspInstFunc prologueTable[OPTABLE_SIZE];
|
||||
dspInstFunc epilogueTable[OPTABLE_SIZE];
|
||||
@ -332,6 +333,7 @@ void InitInstructionTable()
|
||||
if ((opcodes[j].opcode_mask & i) == opcodes[j].opcode) {
|
||||
if (opTable[i] == DSPInterpreter::unknown) {
|
||||
opTable[i] = opcodes[j].interpFunc;
|
||||
opSize[i] = opcodes[j].size;
|
||||
prologueTable[i] = opcodes[j].prologue;
|
||||
epilogueTable[i] = opcodes[j].epilogue;
|
||||
} else {
|
||||
|
@ -110,6 +110,7 @@ extern DSPOPCTemplate opcodes[];
|
||||
extern const u32 opcodes_size;
|
||||
extern DSPOPCTemplate opcodes_ext[];
|
||||
extern const u32 opcodes_ext_size;
|
||||
extern u8 opSize[OPTABLE_SIZE];
|
||||
|
||||
extern dspInstFunc opTable[];
|
||||
|
||||
|
@ -73,11 +73,6 @@ void UpdateCachedCR()
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
|
||||
void dbg_error(char* err_msg)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void gdsp_init()
|
||||
{
|
||||
// Why do we have DROM? Does it exist? Has it been dumped?
|
||||
@ -242,6 +237,9 @@ void gdsp_loop_step()
|
||||
|
||||
u16 HLE_ROM_80E7_81F8();
|
||||
void hacks();
|
||||
|
||||
|
||||
|
||||
void gdsp_step()
|
||||
{
|
||||
g_dsp.step_counter++;
|
||||
|
@ -77,12 +77,6 @@ void (*dsp_op[])(uint16 opc) =
|
||||
dsp_opcd, dsp_opcd, dsp_ope, dsp_opf,
|
||||
};
|
||||
|
||||
void dbg_error(char* err_msg)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void gdsp_init()
|
||||
{
|
||||
g_dsp.irom = (uint16*)malloc(DSP_IROM_SIZE * sizeof(uint16));
|
||||
|
Loading…
x
Reference in New Issue
Block a user