public ZxSpectrumCoreEmulationSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (ZXSpectrum.ZXSpectrumSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public SNESControllerSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (LibsnesCore.SnesSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public N64ControllersSetup(ISettingsAdapter settable) { _settable = settable; _syncSettings = (N64SyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public ColecoControllerSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (ColecoVision.ColecoSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public PSXControllerConfig(ISettingsAdapter settable) { _settable = settable; _syncSettings = (Octoshock.SyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public static DialogResult DoGBLPrefsDialog( Config config, IDialogParent dialogParent, IGameInfo game, IMovieSession movieSession, ISettingsAdapter settable) { var s = (GambatteLink.GambatteLinkSettings)settable.GetSettings(); var ss = (GambatteLink.GambatteLinkSyncSettings)settable.GetSyncSettings(); using var dlg = new GBLPrefs(dialogParent.DialogController, config, game, movieSession); dlg.PutSettings(s, ss); var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { dlg.GetSettings(out s, out ss); settable.PutCoreSettings(s); if (dlg.SyncSettingsChanged) { settable.PutCoreSyncSettings(ss); } } return(result); }
public A7800ControllerSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (A7800Hawk.A7800SyncSettings)settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public IntvControllerSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (Intellivision.IntvSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public ZxSpectrumJoystickSettings(IDialogController dialogController, ISettingsAdapter settable) { _settable = settable; _syncSettings = (ZXSpectrum.ZXSpectrumSyncSettings)_settable.GetSyncSettings(); DialogController = dialogController; InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; }
public N64VideoPluginConfig(ISettingsAdapter settable) { _settable = settable; _s = (N64Settings)_settable.GetSettings(); _ss = (N64SyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.MonitorIcon; }
public static DialogResult DoSettingsDialog( Config config, IDialogParent dialogParent, ISettingsAdapter settable, OctoshockDll.eVidStandard vidStandard, Size vidSize) { using PSXOptions dlg = new( config, dialogParent.DialogController, settable, (Octoshock.Settings)settable.GetSettings(), (Octoshock.SyncSettings)settable.GetSyncSettings(), vidStandard, vidSize); return(dialogParent.ShowDialogAsChild(dlg)); }
public NesControllerSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (NES.NESSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); Icon = Properties.Resources.GameControllerIcon; // TODO: use combobox extension and add descriptions to enum values comboBoxFamicom.Items.AddRange(NESControlSettings.GetFamicomExpansionValues().Cast <object>().ToArray()); comboBoxNESL.Items.AddRange(NESControlSettings.GetNesPortValues().Cast <object>().ToArray()); comboBoxNESR.Items.AddRange(NESControlSettings.GetNesPortValues().Cast <object>().ToArray()); comboBoxFamicom.SelectedItem = _syncSettings.Controls.FamicomExpPort; comboBoxNESL.SelectedItem = _syncSettings.Controls.NesLeftPort; comboBoxNESR.SelectedItem = _syncSettings.Controls.NesRightPort; checkBoxFamicom.Checked = _syncSettings.Controls.Famicom; }
private GenericCoreConfig( ISettingsAdapter settable, bool isMovieActive, bool ignoreSettings = false, bool ignoreSyncSettings = false) { InitializeComponent(); _settable = settable; if (_settable.HasSettings && !ignoreSettings) { _s = _settable.GetSettings(); } if (_settable.HasSyncSettings && !ignoreSyncSettings) { _ss = _settable.GetSyncSettings(); } if (_s != null) { propertyGrid1.SelectedObject = _s; propertyGrid1.AdjustDescriptionHeightToFit(); } else { tabControl1.TabPages.Remove(tabPage1); } if (_ss != null) { propertyGrid2.SelectedObject = _ss; propertyGrid2.AdjustDescriptionHeightToFit(); } else { tabControl1.TabPages.Remove(tabPage2); } if (isMovieActive) { propertyGrid2.Enabled = false; // disable changes to sync setting when movie, so as not to confuse user } }
public static DialogResult DoSettingsDialog(IDialogParent dialogParent, ISettingsAdapter settable) { var s = (LibsnesCore.SnesSettings)settable.GetSettings(); var ss = (LibsnesCore.SnesSyncSettings)settable.GetSyncSettings(); using var dlg = new SNESOptions { RandomizedInitialState = ss.RandomizedInitialState, AlwaysDoubleSize = s.AlwaysDoubleSize, CropSGBFrame = s.CropSGBFrame, ShowObj1 = s.ShowOBJ_0, ShowObj2 = s.ShowOBJ_1, ShowObj3 = s.ShowOBJ_2, ShowObj4 = s.ShowOBJ_3, ShowBg1 = s.ShowBG1_0, ShowBg2 = s.ShowBG2_0, ShowBg3 = s.ShowBG3_0, ShowBg4 = s.ShowBG4_0 }; var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.AlwaysDoubleSize = dlg.AlwaysDoubleSize; s.CropSGBFrame = dlg.CropSGBFrame; ss.RandomizedInitialState = dlg.RandomizedInitialState; s.ShowOBJ_0 = dlg.ShowObj1; s.ShowOBJ_1 = dlg.ShowObj2; s.ShowOBJ_2 = dlg.ShowObj3; s.ShowOBJ_3 = dlg.ShowObj4; s.ShowBG1_0 = s.ShowBG1_1 = dlg.ShowBg1; s.ShowBG2_0 = s.ShowBG2_1 = dlg.ShowBg2; s.ShowBG3_0 = s.ShowBG3_1 = dlg.ShowBg3; s.ShowBG4_0 = s.ShowBG4_1 = dlg.ShowBg4; settable.PutCoreSettings(s); settable.PutCoreSyncSettings(ss); } return(result); }
public NESSyncSettingsForm( IDialogController dialogController, ISettingsAdapter settable, bool hasMapperProperties) { _settable = settable; _syncSettings = (NES.NESSyncSettings)_settable.GetSyncSettings(); DialogController = dialogController; InitializeComponent(); HelpBtn.Image = Properties.Resources.Help; if (hasMapperProperties) { _dataTableDictionary = new DataTableDictionaryBind <string, string>(_syncSettings.BoardProperties); dataGridView1.DataSource = _dataTableDictionary.Table; InfoLabel.Visible = false; } else { BoardPropertiesGroupBox.Enabled = false; dataGridView1.DataSource = null; dataGridView1.Enabled = false; InfoLabel.Visible = true; } RegionComboBox.Items.AddRange(Enum.GetNames(typeof(NES.NESSyncSettings.Region)).Cast <object>().ToArray()); RegionComboBox.SelectedItem = Enum.GetName(typeof(NES.NESSyncSettings.Region), _syncSettings.RegionOverride); if (_syncSettings.InitialWRamStatePattern != null && _syncSettings.InitialWRamStatePattern.Any()) { var sb = new StringBuilder(); foreach (var b in _syncSettings.InitialWRamStatePattern) { sb.Append($"{b:X2}"); } RamPatternOverrideBox.Text = sb.ToString(); } }
public NesVsSettings(ISettingsAdapter settable) { _settable = settable; _settings = (NES.NESSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); }
// TODO: This doesn't really belong here, but not sure where to put it public static void PopulateWithDefaultHeaderValues( this IMovie movie, IEmulator emulator, ISettingsAdapter settable, IGameInfo game, FirmwareManager firmwareManager, string author) { movie.Author = author; movie.EmulatorVersion = VersionInfo.GetEmuVersion(); movie.OriginalEmulatorVersion = VersionInfo.GetEmuVersion(); movie.SystemID = emulator.SystemId; if (settable.HasSyncSettings) { movie.SyncSettingsJson = ConfigService.SaveWithType(settable.GetSyncSettings()); } if (game.IsNullInstance()) { movie.GameName = "NULL"; } else { movie.GameName = game.FilesystemSafeName(); movie.Hash = game.Hash; if (game.FirmwareHash != null) { movie.FirmwareHash = game.FirmwareHash; } } if (emulator.HasBoardInfo()) { movie.BoardName = emulator.AsBoardInfo().BoardName; } if (emulator.HasRegions()) { var region = emulator.AsRegionable().Region; if (region == DisplayType.PAL) { movie.HeaderEntries.Add(HeaderKeys.Pal, "1"); } } if (firmwareManager.RecentlyServed.Count != 0) { foreach (var firmware in firmwareManager.RecentlyServed) { var key = firmware.ID.MovieHeaderKey; if (!movie.HeaderEntries.ContainsKey(key)) { movie.HeaderEntries.Add(key, firmware.Hash); } } } if (emulator is NDS nds && nds.IsDSi) { movie.HeaderEntries.Add("IsDSi", "1"); if (nds.IsDSiWare) { movie.HeaderEntries.Add("IsDSiWare", "1"); } } if ((emulator is NES nes && nes.IsVS) || (emulator is SubNESHawk subnes && subnes.IsVs)) { movie.HeaderEntries.Add("IsVS", "1"); } if (emulator is IGameboyCommon gb) { if (gb.IsCGBMode()) { movie.HeaderEntries.Add(gb.IsCGBDMGMode() ? "IsCGBDMGMode" : "IsCGBMode", "1"); } } if (emulator is SMS sms) { if (sms.IsSG1000) { movie.HeaderEntries.Add("IsSGMode", "1"); } if (sms.IsGameGear) { movie.HeaderEntries.Add("IsGGMode", "1"); } } if (emulator is GPGX gpgx && gpgx.IsMegaCD) { movie.HeaderEntries.Add("IsSegaCDMode", "1"); } if (emulator is PicoDrive pico && pico.Is32XActive) { movie.HeaderEntries.Add("Is32X", "1"); } if (emulator is ICycleTiming) { movie.HeaderEntries.Add(HeaderKeys.CycleCount, "0"); movie.HeaderEntries.Add(HeaderKeys.ClockRate, "0"); } movie.Core = emulator.Attributes().CoreName; }
public AmstradCpcCoreEmulationSettings(ISettingsAdapter settable) { _settable = settable; _syncSettings = (AmstradCPC.AmstradCPCSyncSettings)_settable.GetSyncSettings(); InitializeComponent(); }
public static DialogResult DoSettingsDialog(IDialogParent dialogParent, ISettingsAdapter settable) { var s = (BsnesCore.SnesSettings)settable.GetSettings(); var ss = (BsnesCore.SnesSyncSettings)settable.GetSyncSettings(); using var dlg = new BSNESOptions { AlwaysDoubleSize = s.AlwaysDoubleSize, CropSGBFrame = s.CropSGBFrame, Entropy = ss.Entropy, RegionOverride = ss.RegionOverride, Hotfixes = ss.Hotfixes, FastPPU = ss.FastPPU, FastDSP = ss.FastDSP, FastCoprocessors = ss.FastCoprocessors, UseSGB2 = ss.UseSGB2, ShowObj1 = s.ShowOBJ_0, ShowObj2 = s.ShowOBJ_1, ShowObj3 = s.ShowOBJ_2, ShowObj4 = s.ShowOBJ_3, ShowBg1_0 = s.ShowBG1_0, ShowBg1_1 = s.ShowBG1_1, ShowBg2_0 = s.ShowBG2_0, ShowBg2_1 = s.ShowBG2_1, ShowBg3_0 = s.ShowBG3_0, ShowBg3_1 = s.ShowBG3_1, ShowBg4_0 = s.ShowBG4_0, ShowBg4_1 = s.ShowBG4_1 }; var result = dialogParent.ShowDialogAsChild(dlg); if (result == DialogResult.OK) { s.AlwaysDoubleSize = dlg.AlwaysDoubleSize; s.CropSGBFrame = dlg.CropSGBFrame; ss.Entropy = dlg.Entropy; ss.RegionOverride = dlg.RegionOverride; ss.Hotfixes = dlg.Hotfixes; ss.FastPPU = dlg.FastPPU; ss.FastDSP = dlg.FastDSP; ss.FastCoprocessors = dlg.FastCoprocessors; ss.UseSGB2 = dlg.UseSGB2; s.ShowOBJ_0 = dlg.ShowObj1; s.ShowOBJ_1 = dlg.ShowObj2; s.ShowOBJ_2 = dlg.ShowObj3; s.ShowOBJ_3 = dlg.ShowObj4; s.ShowBG1_0 = dlg.ShowBg1_0; s.ShowBG1_1 = dlg.ShowBg1_1; s.ShowBG2_0 = dlg.ShowBg2_0; s.ShowBG2_1 = dlg.ShowBg2_1; s.ShowBG3_0 = dlg.ShowBg3_0; s.ShowBG3_1 = dlg.ShowBg3_1; s.ShowBG4_0 = dlg.ShowBg4_0; s.ShowBG4_1 = dlg.ShowBg4_1; settable.PutCoreSettings(s); settable.PutCoreSyncSettings(ss); } return(result); }