コード例 #1
0
        public void Reset(AlternateBootType bootType)
        {
            if (System.Threading.Thread.CurrentThread ==
                _execThread)
            {
                //
                // Call is from within the execution thread
                // so we can just reset the system without worrying
                // about synchronization.
                //
                _system.Reset();
                _system.PressBootKeys(bootType);
            }
            else
            {
                //
                // Call is asynchronous, we need to stop the
                // execution thread and restart it after resetting
                // the system.
                //
                bool running = IsRunning;

                if (running)
                {
                    StopExecution();
                }
                _system.Reset();
                _system.PressBootKeys(bootType);

                if (running)
                {
                    StartExecution(AlternateBootType.None);
                }
            }
        }
コード例 #2
0
        private void StartSystem(AlternateBootType bootType)
        {
            // Disable "Start" menu item
            SystemStartMenuItem.Enabled = false;

            // Enable "Reset" menu item
            SystemResetMenuItem.Enabled = true;

            _controller.StartExecution(bootType);

            SystemStatusLabel.Text = Resources.SystemRunningText;
        }
コード例 #3
0
ファイル: AltoSystem.cs プロジェクト: shirriff/ContrAlto
        public void PressBootKeys(AlternateBootType bootType)
        {
            switch (bootType)
            {
            case AlternateBootType.Disk:
                _keyboard.PressBootKeys(Configuration.BootAddress, false);
                break;

            case AlternateBootType.Ethernet:
                _keyboard.PressBootKeys(Configuration.BootFile, true);
                break;
            }
        }
コード例 #4
0
 /// <summary>
 /// Reads the current configuration file from the app's configuration.
 ///
 /// TODO: use reflection to do this.
 /// </summary>
 public static void ReadConfiguration()
 {
     Drive0Image             = (string)Properties.Settings.Default["Drive0Image"];
     Drive1Image             = (string)Properties.Settings.Default["Drive1Image"];
     SystemType              = (SystemType)Properties.Settings.Default["SystemType"];
     HostAddress             = (byte)Properties.Settings.Default["HostAddress"];
     HostPacketInterfaceName = (string)Properties.Settings.Default["HostPacketInterfaceName"];
     HostPacketInterfaceType = (PacketInterfaceType)Properties.Settings.Default["HostPacketInterfaceType"];
     AlternateBootType       = (AlternateBootType)Properties.Settings.Default["AlternateBootType"];
     BootAddress             = (ushort)Properties.Settings.Default["BootAddress"];
     BootFile         = (ushort)Properties.Settings.Default["BootFile"];
     InterlaceDisplay = (bool)Properties.Settings.Default["InterlaceDisplay"];
     ThrottleSpeed    = (bool)Properties.Settings.Default["ThrottleSpeed"];
 }
コード例 #5
0
        public void Reset(AlternateBootType bootType)
        {
            bool running = IsRunning;

            if (running)
            {
                StopExecution();
            }
            _system.Reset();
            _system.PressBootKeys(bootType);

            if (running)
            {
                StartExecution(AlternateBootType.None);
            }
        }
コード例 #6
0
ファイル: Configuration.cs プロジェクト: andybest/ContrAlto
 private static void ReadConfigurationWindows()
 {
     AudioDACCapturePath     = Properties.Settings.Default.AudioDACCapturePath;
     Drive0Image             = Properties.Settings.Default.Drive0Image;
     Drive1Image             = Properties.Settings.Default.Drive1Image;
     SystemType              = (SystemType)Properties.Settings.Default.SystemType;
     HostAddress             = Properties.Settings.Default.HostAddress;
     HostPacketInterfaceName = Properties.Settings.Default.HostPacketInterfaceName;
     HostPacketInterfaceType = (PacketInterfaceType)Properties.Settings.Default.HostPacketInterfaceType;
     AlternateBootType       = (AlternateBootType)Properties.Settings.Default.AlternateBootType;
     BootAddress             = Properties.Settings.Default.BootAddress;
     BootFile              = Properties.Settings.Default.BootFile;
     InterlaceDisplay      = Properties.Settings.Default.InterlaceDisplay;
     ThrottleSpeed         = Properties.Settings.Default.ThrottleSpeed;
     EnableAudioDAC        = Properties.Settings.Default.EnableAudioDAC;
     EnableAudioDACCapture = Properties.Settings.Default.EnableAudioDACCapture;
     AudioDACCapturePath   = Properties.Settings.Default.AudioDACCapturePath;
 }
コード例 #7
0
 public void StartExecution(AlternateBootType bootType)
 {
     StartAltoExecutionThread();
     _system.PressBootKeys(bootType);
 }