2017-01-27 16:42:24 -08:00
|
|
|
|
using System;
|
2020-09-07 14:47:27 -07:00
|
|
|
|
using System.Xml.Serialization;
|
2020-06-11 11:44:46 -07:00
|
|
|
|
|
2020-12-08 13:23:59 -08:00
|
|
|
|
using SabreTools.Core;
|
2020-08-21 17:27:11 -07:00
|
|
|
|
using Newtonsoft.Json;
|
2020-08-24 13:53:53 -07:00
|
|
|
|
using Newtonsoft.Json.Converters;
|
2017-01-08 22:48:19 -08:00
|
|
|
|
|
2020-12-08 15:15:41 -08:00
|
|
|
|
namespace SabreTools.DatItems
|
2016-10-24 12:58:57 -07:00
|
|
|
|
{
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents the information specific to a set/game/machine
|
|
|
|
|
|
/// </summary>
|
2020-09-08 10:12:41 -07:00
|
|
|
|
[JsonObject("machine"), XmlRoot("machine")]
|
2019-01-08 12:11:55 -08:00
|
|
|
|
public class Machine : ICloneable
|
|
|
|
|
|
{
|
2020-08-20 13:17:14 -07:00
|
|
|
|
#region Fields
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region Common
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Name of the machine
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Include)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("name")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Name { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Additional notes
|
|
|
|
|
|
/// </summary>
|
2020-08-20 15:39:32 -07:00
|
|
|
|
/// <remarks>Known as "Extra" in AttractMode</remarks>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("comment", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("comment")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Comment { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Extended description
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("description", DefaultValueHandling = DefaultValueHandling.Include)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("description")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Description { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Year(s) of release/manufacture
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("year", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("year")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Year { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Manufacturer, if available
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("manufacturer", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("manufacturer")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Manufacturer { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Publisher, if available
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("publisher", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("publisher")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Publisher { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
2020-07-18 21:35:17 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Category, if available
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("category", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("category")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Category { get; set; } = null;
|
2020-07-18 21:35:17 -07:00
|
|
|
|
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// fomof parent
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("romof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("romof")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string RomOf { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// cloneof parent
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("cloneof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("cloneof")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string CloneOf { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// sampleof parent
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("sampleof", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("sampleof")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string SampleOf { get; set; } = null;
|
|
|
|
|
|
|
2020-08-20 15:39:32 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Type of the machine
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("type", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-08-24 13:53:53 -07:00
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("type")]
|
2020-08-31 15:33:05 -07:00
|
|
|
|
public MachineType MachineType { get; set; } = 0x0;
|
2020-08-20 15:39:32 -07:00
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public bool MachineTypeSpecified { get { return MachineType != 0x0 && MachineType != MachineType.NULL; } }
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region AttractMode
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Player count
|
|
|
|
|
|
/// </summary>
|
2020-08-20 22:42:04 -07:00
|
|
|
|
/// <remarks>Also in Logiqx EmuArc</remarks>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("players", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("players")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Players { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Screen rotation
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("rotation", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("rotation")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Rotation { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Control method
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("control", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("control")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Control { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Support status
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("status", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("status")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Status { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-20 14:36:36 -07:00
|
|
|
|
/// Display count
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("displaycount", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("displaycount")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string DisplayCount { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-20 14:36:36 -07:00
|
|
|
|
/// Display type
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("displaytype", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("displaytype")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string DisplayType { get; set; } = null;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2020-08-20 14:36:36 -07:00
|
|
|
|
/// Number of input buttons
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("buttons", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("buttons")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Buttons { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region ListXML
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
2020-12-28 10:22:40 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// History.dat entry for the machine
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[JsonProperty("history", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
|
|
|
|
[XmlElement("history")]
|
|
|
|
|
|
public string History { get; set; } = null;
|
|
|
|
|
|
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// <summary>
|
2020-08-20 14:36:36 -07:00
|
|
|
|
/// Emulator source file related to the machine
|
2019-01-08 12:11:55 -08:00
|
|
|
|
/// </summary>
|
2020-08-20 15:39:32 -07:00
|
|
|
|
/// <remarks>Also in Logiqx</remarks>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("sourcefile", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("sourcefile")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string SourceFile { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Machine runnable status
|
|
|
|
|
|
/// </summary>
|
2020-08-20 15:39:32 -07:00
|
|
|
|
/// <remarks>Also in Logiqx</remarks>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("runnable", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("runnable")]
|
2020-08-23 15:34:42 -07:00
|
|
|
|
public Runnable Runnable { get; set; } = Runnable.NULL;
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public bool RunnableSpecified { get { return Runnable != Runnable.NULL; } }
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region Logiqx
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Machine board name
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("board", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("board")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string Board { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Rebuild location if different than machine name
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("rebuildto", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[XmlElement("rebuildto")]
|
2020-08-20 14:36:36 -07:00
|
|
|
|
public string RebuildTo { get; set; } = null;
|
|
|
|
|
|
|
2023-03-26 21:47:17 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// No-Intro ID for the game
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[JsonProperty("nointroid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
|
|
|
|
[XmlElement("nointroid")]
|
|
|
|
|
|
public string NoIntroId { get; set; } = null;
|
|
|
|
|
|
|
2023-04-03 11:57:06 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// No-Intro ID for the game
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[JsonProperty("nointrocloneofid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
|
|
|
|
[XmlElement("nointrocloneofid")]
|
|
|
|
|
|
public string NoIntroCloneOfId { get; set; } = null;
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-08-24 22:25:47 -07:00
|
|
|
|
// TODO: Should this be a separate object for TruRip?
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region Logiqx EmuArc
|
2020-08-20 22:42:04 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Title ID
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("titleid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("titleid")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string TitleID { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Machine developer
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("developer", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("developer")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Developer { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Game genre
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("genre", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("genre")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Genre { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Game subgenre
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("subgenre", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("subgenre")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Subgenre { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Game ratings
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("ratings", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("ratings")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Ratings { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Game score
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("score", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("score")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Score { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Is the machine enabled
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("enabled", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("enabled")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string Enabled { get; set; } = null; // bool?
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Does the game have a CRC check
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("hascrc", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("hascrc")]
|
2020-08-25 22:13:49 -07:00
|
|
|
|
public bool? Crc { get; set; } = null;
|
2020-08-20 22:42:04 -07:00
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public bool CrcSpecified { get { return Crc != null; } }
|
|
|
|
|
|
|
2020-08-20 22:42:04 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Machine relations
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("relatedto", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("relatedto")]
|
2020-08-20 22:42:04 -07:00
|
|
|
|
public string RelatedTo { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region OpenMSX
|
2020-08-21 17:27:11 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Generation MSX ID
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("genmsxid", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("genmsxid")]
|
2020-08-21 17:27:11 -07:00
|
|
|
|
public string GenMSXID { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// MSX System
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("system", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("system")]
|
2020-08-21 17:27:11 -07:00
|
|
|
|
public string System { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Machine country of origin
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("country", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("country")]
|
2020-08-21 17:27:11 -07:00
|
|
|
|
public string Country { get; set; } = null;
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#region SoftwareList
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Support status
|
|
|
|
|
|
/// </summary>
|
2020-08-24 11:56:49 -07:00
|
|
|
|
[JsonProperty("supported", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[XmlElement("supported")]
|
2020-08-22 13:31:13 -07:00
|
|
|
|
public Supported Supported { get; set; } = Supported.NULL;
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
2020-09-07 14:47:27 -07:00
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
public bool SupportedSpecified { get { return Supported != Supported.NULL; } }
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-09-07 22:00:02 -07:00
|
|
|
|
#endregion // Fields
|
2019-01-08 12:11:55 -08:00
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new Machine object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Machine()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new Machine object with the included information
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="name">Name of the machine</param>
|
|
|
|
|
|
/// <param name="description">Description of the machine</param>
|
|
|
|
|
|
public Machine(string name, string description)
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = name;
|
|
|
|
|
|
Description = description;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Cloning methods
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a clone of the current machine
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <returns>New machine with the same values as the current one</returns>
|
|
|
|
|
|
public object Clone()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Machine()
|
|
|
|
|
|
{
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#region Common
|
|
|
|
|
|
|
2019-01-08 12:11:55 -08:00
|
|
|
|
Name = this.Name,
|
|
|
|
|
|
Comment = this.Comment,
|
|
|
|
|
|
Description = this.Description,
|
|
|
|
|
|
Year = this.Year,
|
|
|
|
|
|
Manufacturer = this.Manufacturer,
|
|
|
|
|
|
Publisher = this.Publisher,
|
2020-07-18 21:35:17 -07:00
|
|
|
|
Category = this.Category,
|
2019-01-08 12:11:55 -08:00
|
|
|
|
RomOf = this.RomOf,
|
|
|
|
|
|
CloneOf = this.CloneOf,
|
|
|
|
|
|
SampleOf = this.SampleOf,
|
2020-08-25 22:13:49 -07:00
|
|
|
|
MachineType = this.MachineType,
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region AttractMode
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
Players = this.Players,
|
|
|
|
|
|
Rotation = this.Rotation,
|
|
|
|
|
|
Control = this.Control,
|
|
|
|
|
|
Status = this.Status,
|
|
|
|
|
|
DisplayCount = this.DisplayCount,
|
|
|
|
|
|
DisplayType = this.DisplayType,
|
|
|
|
|
|
Buttons = this.Buttons,
|
|
|
|
|
|
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region ListXML
|
|
|
|
|
|
|
2020-12-28 10:22:40 -08:00
|
|
|
|
History = this.History,
|
2019-01-08 12:11:55 -08:00
|
|
|
|
SourceFile = this.SourceFile,
|
|
|
|
|
|
Runnable = this.Runnable,
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Logiqx
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
Board = this.Board,
|
|
|
|
|
|
RebuildTo = this.RebuildTo,
|
2023-03-26 21:47:17 -04:00
|
|
|
|
NoIntroId = this.NoIntroId,
|
2023-04-03 11:57:06 -04:00
|
|
|
|
NoIntroCloneOfId = this.NoIntroCloneOfId,
|
2020-08-20 14:36:36 -07:00
|
|
|
|
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-08-20 22:42:04 -07:00
|
|
|
|
#region Logiqx EmuArc
|
|
|
|
|
|
|
|
|
|
|
|
TitleID = this.TitleID,
|
|
|
|
|
|
Developer = this.Developer,
|
|
|
|
|
|
Genre = this.Genre,
|
|
|
|
|
|
Subgenre = this.Subgenre,
|
|
|
|
|
|
Ratings = this.Ratings,
|
|
|
|
|
|
Score = this.Score,
|
|
|
|
|
|
Enabled = this.Enabled,
|
2020-08-25 22:13:49 -07:00
|
|
|
|
Crc = this.Crc,
|
2020-08-20 22:42:04 -07:00
|
|
|
|
RelatedTo = this.RelatedTo,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-08-21 17:27:11 -07:00
|
|
|
|
#region OpenMSX
|
|
|
|
|
|
|
|
|
|
|
|
GenMSXID = this.GenMSXID,
|
|
|
|
|
|
System = this.System,
|
|
|
|
|
|
Country = this.Country,
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
2020-08-20 16:49:21 -07:00
|
|
|
|
#region SoftwareList
|
|
|
|
|
|
|
2020-08-20 14:36:36 -07:00
|
|
|
|
Supported = this.Supported,
|
2020-08-20 16:49:21 -07:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
2019-01-08 12:11:55 -08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2016-10-24 12:58:57 -07:00
|
|
|
|
}
|