emufreak / iAmiga

iAmiga sources
45 stars 17 forks source link

1.1.0b1 drivestate #7

Closed simontoens closed 9 years ago

simontoens commented 9 years ago

Hi @emufreak,

I am happy to send you the final pull request related to saving and restoring states.

This pull request has the following changes:

1) Restoring a state now correctly also restores the disks inserted into the disk drives. I have tested this by playing through Maniac Mansion and using the save/restore state functionality instead of F5 to save the game's progress. The only issue I have seen is that if you start iUAE and restore a state right away while the rom is loading, the guru starts meditating.
2) The Settings' df0: and df1: labels are now populated directly from the content of the emulated disk drives, instead of looking at the "insertedfloppies" settings. This was a necessary refactor for 1) above because the information about the inserted floppies is stored by the emulator in the state file and we have no easy access to it. 3) Fix for the "autoload config" toggle - when enabled, the persisted floppies from the "insertedfloppies" setting are now correctly inserted when iUAE starts. 4) Fix for crash when quitting iUAE (using the "home" button) while in settings in then starting iUAE again.

Code level changes/refactoring: 1) Common settings are now properties on the Settings class - this is somewhat nicer than hardcoding the property names (such as "insertedfloppies") in multiple places. 2) Interactions with floppy drives now live in "DiskDriveService". 3) I removed references to rom/adfs from the project file - let's not commit these references to GitHub so that anybody can easily build iUAE...

I have done a fair amount of testing so I am fairly confident I did not break anything. Please let me know right away if you see some strange behaviour and I will fix asap.

Regards - Simon