Re: [hatari-devel] fixed a crash when restoring a snapshot using DSP

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 03/01/2015 17:23, Nicolas Pomarède a écrit :
So, latest changes prevented the crash, but it was not correct, I will
change it do not call DSP_Init after the snapshot is loaded.

This seems to be OK now.

- DSP_Init is only called at start and doesn't modify bDspEnabled, it only inits the DSP (DSP_Init() is now called in all mode, but we don't want to enable it for STF for example)

- I added DSP_Enable / DSP_Disable to really enable/disable DSP emulation. These functions should be called when changing config instead of calling DSP_Init/DSP_UnInit.

- I also remove the call to DSP_Reset when restoring the snapshot ; from what I can see it reset some variables in dsp_core, but as dsp_core is loaded right after, the reset seems useless.

Tested with GemPlay, I can now reload a snapshot and still use the DSP and its program (but maybe some corner cases are remaining)

Nicolas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/