On Oct 6, 2016, at 11:49 AM, Paolo Bonzini wrote: > > > On 06/10/2016 17:48, Programmingkid wrote: >> >> On Oct 6, 2016, at 11:35 AM, Paolo Bonzini wrote: >> >>> >>> >>> On 06/10/2016 16:42, Programmingkid wrote: >>>> >>>> On Oct 6, 2016, at 10:28 AM, Peter Maydell wrote: >>>> >>>>> On 6 October 2016 at 15:22, Programmingkid <programmingk...@gmail.com> >>>>> wrote: >>>>>> Would you accept a patch that added "Save State" and >>>>>> "Restore State" menu items to the cocoa interface? They would >>>>>> allow the user to save the running state of the emulator. >>>>> >>>>> If you can get consensus on first adding those to one of the other >>>>> UI frontends that's better maintained than the cocoa UI, >>>>> then I would accept a cocoa UI patch that added them second. >>>> >>>> >>>> Ok, I will ask around. >>>> >>>> Does anyone else like the idea of having a "Save State" and >>>> "Restore State" menu items added to QEMU's gui? >>> >>> What would they do exactly? >> >> "Save State" would save the current running state of the emulator to >> file. "Restore State" would restore the saved running state. This >> feature is really good for cheating at video games and saving your >> work exactly as you left it. > > Yes, but what would they do in QEMU terms? What would they call, when > would they be available, and how would the GUI behave?
In the Machine menu, you would see these three additional menu items: ----------------------- Save State... Restore State... Manage Save States... ------------------------ 'Save State...' would call something equivalent to the monitor command savevm. It would display a dialog box asking to give a name to this save. The default name would probably be "save state mm-dd-yyyy - n". The m,d,y stand for month, day, and year respectively. The n would be the save state count for that day. 'Restore state...' would probably display a dialog box with all the save states displayed in a list. The user could select one of them and QEMU would restore that state. 'Manage Save States...' would display a dialog box with all the saves states displayed in a list. There would be buttons on the bottom called "Delete", "Rename", and "Duplicate". They would give the user the options that can be done to each save state. The Delete button would correspond to the monitor command delvm "name". Rename and Duplicate would have to be researched a little more before I can say how they would be implemented. Code in the gui would detect if the hard drive image was in a format that supported save states. The menu items would probably be grayed out if save states could not work with the current HD image file.