remove non-implemented stella settings/sync settings

This commit is contained in:
CasualPokePlayer 2024-09-16 00:29:35 -07:00
parent e06997dd4c
commit 4c4ffca2bc
2 changed files with 6 additions and 140 deletions

View File

@ -1,29 +1,22 @@
using System.ComponentModel;
using System.Drawing;
using Newtonsoft.Json;
using BizHawk.Emulation.Common;
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Atari.Stella
{
public partial class Stella : ISettable<Stella.A2600Settings, Stella.A2600SyncSettings>
public partial class Stella : ISettable<object, Stella.A2600SyncSettings>
{
private A2600Settings _settings;
private A2600SyncSettings _syncSettings;
public A2600Settings GetSettings()
=> _settings.Clone();
public object GetSettings()
=> null;
public A2600SyncSettings GetSyncSettings()
=> _syncSettings.Clone();
public PutSettingsDirtyBits PutSettings(A2600Settings o)
{
_settings = o;
return PutSettingsDirtyBits.None;
}
public PutSettingsDirtyBits PutSettings(object o)
=> PutSettingsDirtyBits.None;
public PutSettingsDirtyBits PutSyncSettings(A2600SyncSettings o)
{
@ -32,110 +25,6 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
return ret ? PutSettingsDirtyBits.RebootCore : PutSettingsDirtyBits.None;
}
[CoreSettings]
public class A2600Settings
{
[JsonIgnore]
private int _ntscTopLine;
[JsonIgnore]
private int _ntscBottomLine;
[JsonIgnore]
private int _palTopLine;
[JsonIgnore]
private int _palBottomLine;
[DisplayName("Show Background")]
[Description("Sets whether or not the Background layer will be displayed")]
[DefaultValue(true)]
public bool ShowBG { get; set; }
[DisplayName("Show Player 1")]
[Description("Sets whether or not the Player 1 layer will be displayed")]
[DefaultValue(true)]
public bool ShowPlayer1 { get; set; }
[DisplayName("Show Player 2")]
[Description("Sets whether or not the Player 2 layer will be displayed")]
[DefaultValue(true)]
public bool ShowPlayer2 { get; set; }
[DisplayName("Show Missle 1")]
[Description("Sets whether or not the Missle 1 layer will be displayed")]
[DefaultValue(true)]
public bool ShowMissle1 { get; set; }
[DisplayName("Show Missle 2")]
[Description("Sets whether or not the Missle 2 layer will be displayed")]
[DefaultValue(true)]
public bool ShowMissle2 { get; set; }
[DisplayName("Show Ball")]
[Description("Sets whether or not the Ball layer will be displayed")]
[DefaultValue(true)]
public bool ShowBall { get; set; }
[DisplayName("Show Playfield")]
[Description("Sets whether or not the Playfield layer will be displayed")]
[DefaultValue(true)]
public bool ShowPlayfield { get; set; }
[DisplayName("SECAM Colors")]
[Description("If true, PAL mode will show with SECAM (French) colors.")]
[DefaultValue(false)]
public bool SECAMColors { get; set; }
[DisplayName("NTSC Top Line")]
[Description("First line of the video image to display in NTSC mode.")]
[DefaultValue(24)]
public int NTSCTopLine
{
get => _ntscTopLine;
set => _ntscTopLine = Math.Min(64, Math.Max(value, 0));
}
[DisplayName("NTSC Bottom Line")]
[Description("Last line of the video image to display in NTSC mode.")]
[DefaultValue(248)]
public int NTSCBottomLine
{
get => _ntscBottomLine;
set => _ntscBottomLine = Math.Min(260, Math.Max(value, 192));
}
[DisplayName("PAL Top Line")]
[Description("First line of the video image to display in PAL mode.")]
[DefaultValue(24)]
public int PALTopLine
{
get => _palTopLine;
set => _palTopLine = Math.Min(64, Math.Max(value, 0));
}
[DisplayName("PAL Bottom Line")]
[Description("Last line of the video image to display in PAL mode.")]
[DefaultValue(296)]
public int PALBottomLine
{
get => _palBottomLine;
set => _palBottomLine = Math.Min(310, Math.Max(value, 192));
}
[DisplayName("Background Color")]
[DefaultValue(typeof(Color), "Black")]
public Color BackgroundColor { get; set; }
public A2600Settings Clone()
=> (A2600Settings)MemberwiseClone();
public A2600Settings()
{
SettingsUtil.SetDefaultValues(this);
}
}
[CoreSettings]
public class A2600SyncSettings
{
@ -151,26 +40,6 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
[TypeConverter(typeof(DescribableEnumConverter))]
public Atari2600ControllerTypes Port2 { get; set; } = Atari2600ControllerTypes.Joystick;
[DisplayName("Black and White Mode")]
[Description("Set the TV Type switch on the console to B&W or Color. This only affects the displayed image if the game supports it.")]
[DefaultValue(false)]
public bool BW { get; set; }
[DisplayName("Left Difficulty")]
[Description("Set the Left Difficulty switch on the console")]
[DefaultValue(true)]
public bool LeftDifficulty { get; set; }
[DisplayName("Right Difficulty")]
[Description("Set the Right Difficulty switch on the console")]
[DefaultValue(true)]
public bool RightDifficulty { get; set; }
[DisplayName("Super Charger BIOS Skip")]
[Description("On Super Charger carts, this will skip the BIOS intro")]
[DefaultValue(false)]
public bool FastScBios { get; set; }
public CInterface.InitSettings GetNativeSettings(GameInfo game)
{
return new CInterface.InitSettings

View File

@ -18,12 +18,11 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
public partial class Stella : IRomInfo, IRegionable
{
[CoreConstructor(VSystemID.Raw.A26)]
public Stella(CoreLoadParameters<A2600Settings, A2600SyncSettings> lp)
public Stella(CoreLoadParameters<object, A2600SyncSettings> lp)
{
var ser = new BasicServiceProvider(this);
ServiceProvider = ser;
_syncSettings = lp.SyncSettings ?? new A2600SyncSettings();
_settings = lp.Settings ?? new A2600Settings();
_controllerDeck = new Atari2600ControllerDeck(_syncSettings.Port1, _syncSettings.Port2);
_elf = new WaterboxHost(new WaterboxOptions
@ -52,8 +51,6 @@ namespace BizHawk.Emulation.Cores.Atari.Stella
using (_elf.EnterExit())
{
Core = BizInvoker.GetInvoker<CInterface>(_elf, _elf, callingConventionAdapter);
_syncSettings = lp.SyncSettings ?? new A2600SyncSettings();
_settings = lp.Settings ?? new A2600Settings();
_romfile = lp.Roms[0].RomData;
var initResult = Core.stella_init("rom.a26", _loadCallback, _syncSettings.GetNativeSettings(lp.Game));