2017-11-23 17:26:15 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
using BizHawk.Common;
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|
|
|
|
{
|
|
|
|
|
public partial class ZXSpectrum : ISettable<ZXSpectrum.ZXSpectrumSettings, ZXSpectrum.ZXSpectrumSyncSettings>
|
|
|
|
|
{
|
|
|
|
|
internal ZXSpectrumSettings Settings = new ZXSpectrumSettings();
|
|
|
|
|
internal ZXSpectrumSyncSettings SyncSettings = new ZXSpectrumSyncSettings();
|
|
|
|
|
|
|
|
|
|
public ZXSpectrumSettings GetSettings()
|
|
|
|
|
{
|
|
|
|
|
return Settings.Clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ZXSpectrumSyncSettings GetSyncSettings()
|
|
|
|
|
{
|
|
|
|
|
return SyncSettings.Clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool PutSettings(ZXSpectrumSettings o)
|
|
|
|
|
{
|
2017-12-07 13:09:53 +00:00
|
|
|
|
if (SoundMixer != null)
|
|
|
|
|
SoundMixer.Stereo = o.StereoSound;
|
|
|
|
|
|
2017-11-23 17:26:15 +00:00
|
|
|
|
Settings = o;
|
2017-12-07 13:09:53 +00:00
|
|
|
|
|
2017-11-23 17:26:15 +00:00
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool PutSyncSettings(ZXSpectrumSyncSettings o)
|
|
|
|
|
{
|
2017-12-04 15:40:27 +00:00
|
|
|
|
bool ret = ZXSpectrumSyncSettings.NeedsReboot(SyncSettings, o);
|
2017-11-23 17:26:15 +00:00
|
|
|
|
SyncSettings = o;
|
2017-12-04 15:40:27 +00:00
|
|
|
|
return ret;
|
2017-11-23 17:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class ZXSpectrumSettings
|
|
|
|
|
{
|
2017-12-07 13:09:53 +00:00
|
|
|
|
[DisplayName("Stereo Sound")]
|
|
|
|
|
[Description("Turn stereo sound on or off")]
|
2017-12-04 15:40:27 +00:00
|
|
|
|
[DefaultValue(true)]
|
2017-12-07 13:09:53 +00:00
|
|
|
|
public bool StereoSound { get; set; }
|
|
|
|
|
|
2018-03-05 13:29:34 +00:00
|
|
|
|
[DisplayName("Core OSD Message Verbosity")]
|
|
|
|
|
[Description("Full: Display all GUI messages\nMedium: Display only emulator/device generated messages\nNone: Show no messages")]
|
|
|
|
|
[DefaultValue(OSDVerbosity.Medium)]
|
|
|
|
|
public OSDVerbosity OSDMessageVerbosity { get; set; }
|
|
|
|
|
|
2017-11-23 17:26:15 +00:00
|
|
|
|
|
|
|
|
|
public ZXSpectrumSettings Clone()
|
|
|
|
|
{
|
|
|
|
|
return (ZXSpectrumSettings)MemberwiseClone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ZXSpectrumSettings()
|
|
|
|
|
{
|
|
|
|
|
BizHawk.Common.SettingsUtil.SetDefaultValues(this);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ZXSpectrumSyncSettings
|
|
|
|
|
{
|
2017-12-04 15:40:27 +00:00
|
|
|
|
[DisplayName("Spectrum model")]
|
|
|
|
|
[Description("The model of spectrum to be emulated")]
|
|
|
|
|
[DefaultValue(MachineType.ZXSpectrum48)]
|
|
|
|
|
public MachineType MachineType { get; set; }
|
|
|
|
|
|
|
|
|
|
[DisplayName("Border type")]
|
|
|
|
|
[Description("Select how to show the border area")]
|
|
|
|
|
[DefaultValue(BorderType.Full)]
|
|
|
|
|
public BorderType BorderType { get; set; }
|
|
|
|
|
|
2017-11-28 19:28:22 +00:00
|
|
|
|
[DisplayName("Tape Load Speed")]
|
|
|
|
|
[Description("Select how fast the spectrum loads the game from tape")]
|
|
|
|
|
[DefaultValue(TapeLoadSpeed.Accurate)]
|
|
|
|
|
public TapeLoadSpeed TapeLoadSpeed { get; set; }
|
|
|
|
|
|
2017-12-07 13:09:53 +00:00
|
|
|
|
[DisplayName("Auto-load tape")]
|
|
|
|
|
[Description("Auto or manual tape operation")]
|
|
|
|
|
[DefaultValue(true)]
|
|
|
|
|
public bool AutoLoadTape { get; set; }
|
|
|
|
|
|
2017-11-23 17:26:15 +00:00
|
|
|
|
public ZXSpectrumSyncSettings Clone()
|
|
|
|
|
{
|
|
|
|
|
return (ZXSpectrumSyncSettings)MemberwiseClone();
|
|
|
|
|
}
|
2017-12-04 15:40:27 +00:00
|
|
|
|
|
|
|
|
|
public ZXSpectrumSyncSettings()
|
|
|
|
|
{
|
|
|
|
|
SettingsUtil.SetDefaultValues(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool NeedsReboot(ZXSpectrumSyncSettings x, ZXSpectrumSyncSettings y)
|
|
|
|
|
{
|
|
|
|
|
return !DeepEquality.DeepEquals(x, y);
|
|
|
|
|
}
|
2017-11-23 17:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-05 13:29:34 +00:00
|
|
|
|
public enum OSDVerbosity
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Show all OSD messages
|
|
|
|
|
/// </summary>
|
|
|
|
|
Full,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Only show machine/device generated messages
|
|
|
|
|
/// </summary>
|
|
|
|
|
Medium,
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// No core-driven OSD messages
|
|
|
|
|
/// </summary>
|
|
|
|
|
None
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-23 17:26:15 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The size of the Spectrum border
|
|
|
|
|
/// </summary>
|
|
|
|
|
public enum BorderType
|
|
|
|
|
{
|
2017-12-07 17:34:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// How it was originally back in the day
|
|
|
|
|
/// </summary>
|
2017-11-23 17:26:15 +00:00
|
|
|
|
Full,
|
2017-12-07 17:34:02 +00:00
|
|
|
|
|
2017-12-11 16:05:36 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// All borders 24px
|
|
|
|
|
/// </summary>
|
|
|
|
|
Medium,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// All borders 10px
|
|
|
|
|
/// </summary>
|
|
|
|
|
Small,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// No border at all
|
|
|
|
|
/// </summary>
|
|
|
|
|
None,
|
|
|
|
|
|
2017-12-07 17:34:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Top and bottom border removed so that the result is *almost* 16:9
|
|
|
|
|
/// </summary>
|
2017-12-07 17:24:30 +00:00
|
|
|
|
Widescreen,
|
2017-11-23 17:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The speed at which the tape is loaded
|
2017-12-11 09:05:12 +00:00
|
|
|
|
/// NOT IN USE YET
|
2017-11-23 17:26:15 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
public enum TapeLoadSpeed
|
|
|
|
|
{
|
|
|
|
|
Accurate,
|
2018-02-12 17:22:03 +00:00
|
|
|
|
//Fast,
|
|
|
|
|
//Fastest
|
2017-11-23 17:26:15 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|