--- previous/src/dsp/dsp.c 2018/04/24 19:30:25 1.1 +++ previous/src/dsp/dsp.c 2018/04/24 19:33:52 1.1.1.3 @@ -25,7 +25,6 @@ #include "main.h" #include "sysdeps.h" #include "newcpu.h" -#include "memorySnapShot.h" #include "ioMem.h" #include "dsp.h" #include "configuration.h" @@ -135,9 +134,9 @@ void DSP_SetIRQB(void) /** * Handling DMA transfers. */ -void DSP_HandleDMA(void) -{ #if ENABLE_DSP_EMU +static void DSP_HandleDMA(void) +{ if (dsp_core.dma_mode && dsp_core.dma_request && dma_dsp_ready()) { /* Set the counter according to selected DMA mode */ if (dsp_core.dma_address_counter==0) { @@ -166,8 +165,8 @@ void DSP_HandleDMA(void) return; } } -#endif } +#endif /** @@ -226,6 +225,7 @@ void DSP_UnInit(void) */ void DSP_Reset(void) { +#if ENABLE_DSP_EMU //LogTraceFlags = TRACE_DSP_ALL; if (ConfigureParams.System.bDSPMemoryExpansion) { DSP_RAMSIZE = DSP_RAMSIZE_96kB; @@ -238,7 +238,7 @@ void DSP_Reset(void) bDspEmulated = false; } Statusbar_SetDspLed(false); -#if ENABLE_DSP_EMU + dsp_core_reset(); save_cycles = 0; #endif @@ -259,35 +259,13 @@ void DSP_Start(Uint8 mode) #endif } - -/** - * Save/Restore snapshot of CPU variables ('MemorySnapShot_Store' handles type) - */ -void DSP_MemorySnapShot_Capture(bool bSave) -{ -#if ENABLE_DSP_EMU - if (!bSave) - DSP_Reset(); - - MemorySnapShot_Store(&bDspEnabled, sizeof(bDspEnabled)); - MemorySnapShot_Store(&dsp_core, sizeof(dsp_core)); - MemorySnapShot_Store(&save_cycles, sizeof(save_cycles)); -#endif -} - /** * Run DSP for certain cycles */ void DSP_Run(int nHostCycles) { #if ENABLE_DSP_EMU - if (dsp_core.running == 0) - return; - save_cycles += nHostCycles * 2; - - if (save_cycles <= 0) - return; while (save_cycles > 0) {