Example #1
0
        /// <summary>
        /// This method recreates the .vmstate file for a Spectrum +3 virtual machine
        /// in Spectrum +3 startup mode
        /// </summary>
        /// <param name="vm">Virtual machine view model</param>
        /// <returns>True, if preparation successful; otherwise, true</returns>
        private async Task <bool> CreateSpectrumP3StartupP3State(MachineViewModel vm)
        {
            // --- Wait while the main menu appears
            vm.RestartVmAndRunToTerminationPoint(0, SPP3_MAIN_WAITING_LOOP);
            if (!await WaitStart())
            {
                return(false);
            }
            vm.RunVmToTerminationPoint(0, SPP3_RETURN_TO_EDITOR);

            // --- Move to Spectrum +3 mode
            QueueKeyStroke(SpectrumKeyCode.N6, SpectrumKeyCode.CShift);
            await Task.Delay(WAIT_FOR_MENU_KEY);

            QueueKeyStroke(SpectrumKeyCode.Enter);
            return(await WaitStart());
        }
Example #2
0
 /// <summary>
 /// This method recreates the .vmstate file for a Spectrum 48 virtual machine startup
 /// </summary>
 /// <param name="vm">Virtual machine view model</param>
 /// <returns>True, if preparation successful; otherwise, true</returns>
 private async Task <bool> CreateSpectrum48StartupState(MachineViewModel vm)
 {
     vm.RestartVmAndRunToTerminationPoint(0, SP48_MAIN_EXEC_ADDR);
     return(await WaitStart());
 }