public MainForm() { synchronizationContext = SynchronizationContext.Current; speedUpdateStopwatch = Stopwatch.StartNew(); InitializeComponent(); ScaleStatusStrip(CurrentAutoScaleDimensions.Height / 96F); // In DPI scaling mode, CurrentAutoScaleDimensions is the current screen DPI. if (components == null) { components = new System.ComponentModel.Container(); } emulatedGameBoy = new EmulatedGameBoy(components); emulatedGameBoy.TryUsingBootRom = Settings.Default.UseBootstrapRom; emulatedGameBoy.EnableFramerateLimiter = Settings.Default.LimitSpeed; emulatedGameBoy.RomChanged += OnRomChanged; emulatedGameBoy.AfterReset += OnAfterReset; emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChanged; emulatedGameBoy.NewFrame += OnNewFrame; emulatedGameBoy.BorderChanged += OnBorderChanged; try { emulatedGameBoy.Reset(Settings.Default.HardwareType); } catch (ArgumentOutOfRangeException) { Settings.Default.HardwareType = emulatedGameBoy.HardwareType; } AdjustSize(Settings.Default.ContentSize); UpdateEmulationStatus(); UpdateSpeed(); SetStatusTextHandler(); CreateRendererMenuItems(); }
public RomInformationForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); backgroundColorPaletteTableLayoutPanel.Tag = _backgroundColors; object0ColorPaletteTableLayoutPanel.Tag = _object0Colors; object1ColorPaletteTableLayoutPanel.Tag = _object1Colors; }
public TileViewerForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); tileSet0Bitmap = new Bitmap(128, 192); tileSet1Bitmap = new Bitmap(128, 192); tileSet0Panel.Bitmap = tileSet0Bitmap; tileSet1Panel.Bitmap = tileSet1Bitmap; }
public TileViewerForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); tileSet0Bitmap = new Bitmap(128, 192); tileSet1Bitmap = new Bitmap(128, 192); tileSet0Panel.Bitmap = tileSet0Bitmap; tileSet1Panel.Bitmap = tileSet1Bitmap; }
public EmulatorForm(EmulatedGameBoy emulatedGameBoy) { EmulatedGameBoy = emulatedGameBoy ?? throw new ArgumentNullException(nameof(emulatedGameBoy)); EmulatedGameBoy.AfterReset += OnAfterResetInternal; EmulatedGameBoy.RomChanged += OnRomChangedInternal; EmulatedGameBoy.Paused += OnPausedInternal; EmulatedGameBoy.Break += OnBreakInternal; EmulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChangedInternal; EmulatedGameBoy.NewFrame += OnNewFrameInternal; }
public EmulatorForm(EmulatedGameBoy emulatedGameBoy) { if (emulatedGameBoy == null) throw new ArgumentNullException("emulatedGameBoy"); this.emulatedGameBoy = emulatedGameBoy; this.emulatedGameBoy.AfterReset += OnAfterResetInternal; this.emulatedGameBoy.RomChanged += OnRomChangedInternal; this.emulatedGameBoy.Paused += OnPausedInternal; this.emulatedGameBoy.Break += OnBreakInternal; this.emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChangedInternal; this.emulatedGameBoy.NewFrame += OnNewFrameInternal; }
public DebuggerForm(EmulatedGameBoy EmulatedGameBoy) : base(EmulatedGameBoy) { InitializeComponent(); OnRomChanged(EventArgs.Empty); #if !WITH_DEBUGGING || !DEBUG_CYCLE_COUNTER cycleCounterGroupBox.Visible = false; #endif #if !WITH_DEBUGGING breakpointsGroupBox.Visible = false; #endif }
public DebuggerForm(EmulatedGameBoy EmulatedGameBoy) : base(EmulatedGameBoy) { InitializeComponent(); OnRomChanged(EventArgs.Empty); #if !WITH_DEBUGGING || !DEBUG_CYCLE_COUNTER cycleCounterGroupBox.Visible = false; #endif #if !WITH_DEBUGGING breakpointsGroupBox.Visible = false; #endif }
public MapViewerForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); backgroundMapBitmap = new Bitmap(256, 256); windowMapBitmap = new Bitmap(256, 256); customMapBitmap = new Bitmap(256, 256); backgroundMapPanel.Bitmap = backgroundMapBitmap; windowMapPanel.Bitmap = windowMapBitmap; customMapPanel.Bitmap = customMapBitmap; colors = new uint[32]; // 8 palettes of 4 colors each }
public MapViewerForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); _backgroundMapBitmap = new Bitmap(256, 256); _windowMapBitmap = new Bitmap(256, 256); _customMapBitmap = new Bitmap(256, 256); backgroundMapPanel.Bitmap = _backgroundMapBitmap; windowMapPanel.Bitmap = _windowMapBitmap; customMapPanel.Bitmap = _customMapBitmap; _colors = new uint[32]; // 8 palettes of 4 colors each }
public EmulatorForm(EmulatedGameBoy emulatedGameBoy) { if (emulatedGameBoy == null) { throw new ArgumentNullException("emulatedGameBoy"); } this.emulatedGameBoy = emulatedGameBoy; this.emulatedGameBoy.AfterReset += OnAfterResetInternal; this.emulatedGameBoy.RomChanged += OnRomChangedInternal; this.emulatedGameBoy.Paused += OnPausedInternal; this.emulatedGameBoy.Break += OnBreakInternal; this.emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChangedInternal; this.emulatedGameBoy.NewFrame += OnNewFrameInternal; }
public MainForm() { InitializeComponent(); if (components == null) components = new System.ComponentModel.Container(); emulatedGameBoy = new EmulatedGameBoy(components); emulatedGameBoy.TryUsingBootRom = Settings.Default.UseBootstrapRom; emulatedGameBoy.EnableFramerateLimiter = Settings.Default.LimitSpeed; emulatedGameBoy.RomChanged += OnRomChanged; emulatedGameBoy.AfterReset += OnAfterReset; emulatedGameBoy.EmulationStatusChanged += OnEmulationStatusChanged; emulatedGameBoy.NewFrame += OnNewFrame; emulatedGameBoy.BorderChanged += OnBorderChanged; try { emulatedGameBoy.Reset(Settings.Default.HardwareType); } catch (ArgumentOutOfRangeException) { Settings.Default.HardwareType = emulatedGameBoy.HardwareType; } AdjustSize(Settings.Default.ContentSize); UpdateEmulationStatus(); UpdateFrameRate(); SetStatusTextHandler(); CreateRendererMenuItems(); }
public RomInformationForm(EmulatedGameBoy emulatedGameBoy) : base(emulatedGameBoy) { InitializeComponent(); }
private void runButton_Click(object sender, EventArgs e) { EmulatedGameBoy.Run(); }
private void stepButton_Click(object sender, EventArgs e) { EmulatedGameBoy.Step(); }