diff --git a/Source/Core/DSPCore/Src/DSPTables.cpp b/Source/Core/DSPCore/Src/DSPTables.cpp index 80da03c190..2b8adff836 100644 --- a/Source/Core/DSPCore/Src/DSPTables.cpp +++ b/Source/Core/DSPCore/Src/DSPTables.cpp @@ -37,7 +37,7 @@ const DSPOPCTemplate opcodes[] = {"DAR", 0x0004, 0xfffc, DSPInterpreter::dar, &DSPEmitter::dar, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false}, {"IAR", 0x0008, 0xfffc, DSPInterpreter::iar, &DSPEmitter::iar, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false}, - {"SUBARN", 0x000c, 0xfffc, DSPInterpreter::subarn, &DSPEmitter::subarn, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false}, + {"SUBARN", 0x000c, 0xfffc, NULL/*DSPInterpreter::subarn*/, &DSPEmitter::subarn, 1, 1, {{P_REG, 1, 0, 0, 0x0003}}, false, false, false, false, false}, // TODO: Breaks NTSC IPL {"ADDARN", 0x0010, 0xfff0, DSPInterpreter::addarn, &DSPEmitter::addarn, 1, 2, {{P_REG, 1, 0, 0, 0x0003}, {P_REG04, 1, 0, 2, 0x000c}}, false, false, false, false, false}, {"HALT", 0x0021, 0xffff, DSPInterpreter::halt, &DSPEmitter::halt, 1, 0, {}, false, true, true, false, false}, diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index 034fcead10..60e4286bfb 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -169,16 +169,15 @@ void DoState(unsigned char **ptr, int mode) PointerWrap p(ptr, mode); p.Do(g_InitMixer); -// Enable this when the HLE is fixed to save/load the same amount of data, -// no matter how bogus, so that one can switch LLE->HLE. The other way is unlikely to work very well. -#if 0 p.Do(g_dsp.r); p.Do(g_dsp.pc); +#if PROFILE p.Do(g_dsp.err_pc); +#endif p.Do(g_dsp.cr); p.Do(g_dsp.reg_stack_ptr); p.Do(g_dsp.exceptions); - p.Do(g_dsp.exceptions_in_progress); + p.Do(g_dsp.external_interrupt_waiting); for (int i = 0; i < 4; i++) { p.Do(g_dsp.reg_stack[i]); } @@ -187,9 +186,12 @@ void DoState(unsigned char **ptr, int mode) p.Do(g_dsp.ifx_regs); p.Do(g_dsp.mbox[0]); p.Do(g_dsp.mbox[1]); - p.DoArray(g_dsp.iram, DSP_IRAM_BYTE_SIZE); - p.DoArray(g_dsp.dram, DSP_DRAM_BYTE_SIZE); -#endif + UnWriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false); + p.DoArray(g_dsp.iram, DSP_IRAM_SIZE); + WriteProtectMemory(g_dsp.iram, DSP_IRAM_BYTE_SIZE, false); + p.DoArray(g_dsp.dram, DSP_DRAM_SIZE); + p.Do(cyclesLeft); + p.Do(cycle_count); } void EmuStateChange(PLUGIN_EMUSTATE newState)