[hatari-devel] Issues after restoring a memory snapshot

Eero Tamminen oak at helsinkinet.fi
Thu Jan 20 21:14:26 CET 2011


Hi,

On keskiviikko 19 tammikuu 2011, Nicolas Pomarède wrote:
>> ->  When user saves the memory snapshot from SDL UI or through shortcut,
>>      there's no INTERRUPT_IKBD_AUTOSEND and that state is restore when
>>      the memory snapshot is loaded.
>> 
>> If restore was done from the UI, this interrupt will be added before
>> exiting from this function, but if it's done from command line, that
>> naturally doesn't happen.
>> 
>> I see two possible ways to fix this:
>> * Acknowledge the interrupt only after Main_EventHandler() call, or
>> * Make sure in IKBD_MemorySnapShot_Capture() that after restore
>>    there is (one) INTERRUPT_IKBD_AUTOSEND interrupt.
> 
> I agree with your analysis, in some cases (not always, else it would
> have been seen earlier), INTERRUPT_IKBD_AUTOSEND is saved in a state
> where it was just disabled due to the call to
> CycInt_AcknowledgeInterrupt().
> 
> I think the simplest way to fix this is to move
> CycInt_AddRelativeInterrupt just before the call to Main_EventHandler,
> this way we will save an enabled interrupt.
> 
> As it seems to happen more often to you than to me, 

From reading the code I would assume it to happen always when memory
snapshot is saved from the UI and restored from the command line.


> can you see if moving this line is fixing the problem for you ?

It worked so I commited the fix.


Btw. It seems that Falcon sound doesn't work for Mahabharata after restoring
a memory snapshot.  One needs to reset the emulation to get the sound
working again.

As the DSP restore was just fixed, I guess this is about Crossbar...
Laurent?


	- Eero



More information about the hatari-devel mailing list