Пример #1
0
        public MainForm()
        {
            InitializeComponent();

            _programNameVersion = $"{Application.ProductName} {Application.ProductVersion}";

            _stopwatchFrequency = Stopwatch.Frequency;

            _config = PluginfunConfig.Load();

            _emulatedSystem = new EmulatedSystem();

            _emulationInitialised = new NotifyValue <bool>(false);
            _emulationPaused      = new NotifyValue <bool>(false);

            LoadDynamicComponents();

            PrepareUserInterface();
            PrepareDataBindings();

            InitBitmaps();

            Application.Idle += (s, ev) => { while (_emulationInitialised && !_emulationPaused && ApplicationStillIdle)
                                             {
                                                 RunFrame();
                                             }
            };
        }
Пример #2
0
        public ConfigForm(IEmulatedSystem emulatedSystem)
        {
            InitializeComponent();

            Text = $"{emulatedSystem.Name} Configuration";

            Configuration = emulatedSystem.Configuration.Copy();

            PrepareUserInterface();
        }
Пример #3
0
        public void Load(IWorkspace workspace)
        {
            // grab a reference to the system
            this._system = workspace.RuntimeManager.System;

            // create a new WebDevice (default parameters)
            this._webDevice = new WebDevice();

            // register the device with the controllers
            this._system.MemoryController.RegisterMemoryDevice(this._webDevice);
        }
Пример #4
0
        public void Initialise(IEmulatedSystem system)
        {
            this._system = system;

            // load default data
            this._lastBorderColourIndex = -1;
            this._bootScreen = Resources.ResourceHelper.Boot;
            this._fontData = LoadFontFromImage(Resources.ResourceHelper.Font);
            this._paletteData = CreateDefaultPalette().ToArray();

            // hook up rendering stuff
            this._workspace.RuntimeManager.UI.AddDisplayContentProvider(this);
            this._writeableBitmap = new WriteableBitmap(128, 96, 96, 96, PixelFormats.Bgr32, null);
            CompositionTarget.Rendering += RenderCallback;
        }
Пример #5
0
 public void Initialise(IEmulatedSystem system)
 {
     this._system = system;
     this._workspace.RuntimeManager.UI.KeyEvent += UiOnKeyEvent;
 }
Пример #6
0
 public void Initialise(IEmulatedSystem system)
 {
     this._system = system;
     this._workspace.RuntimeManager.UI.AddDisplayContentProvider(this);
 }
Пример #7
0
 public void Initialise(IEmulatedSystem system)
 {
     this._system = system;
 }