Files
SabreTools/SabreTools.Library/DatItems/Auxiliary.cs

110 lines
2.9 KiB
C#
Raw Normal View History

using System.Collections.Generic;
using System.IO;
using System.Linq;
using SabreTools.Library.DatItems;
using SabreTools.Library.Filtering;
2020-09-03 13:20:56 -07:00
using SabreTools.Library.Tools;
2020-08-23 21:10:29 -07:00
using Newtonsoft.Json;
2020-09-02 15:38:10 -07:00
using Newtonsoft.Json.Converters;
2020-08-23 21:10:29 -07:00
/// <summary>
2020-08-21 15:31:19 -07:00
/// This holds all of the auxiliary types needed for proper parsing
/// </summary>
namespace SabreTools.Library.DatItems
{
#region DatItem
2020-09-02 23:31:35 -07:00
#region OpenMSX
/// <summary>
/// Represents the OpenMSX original value
/// </summary>
[JsonObject("original")]
public class Original
{
[JsonProperty("value")]
public bool? Value { get; set; }
[JsonProperty("content")]
public string Content { get; set; }
}
#endregion
2020-08-21 15:31:19 -07:00
#region SoftwareList
/// <summary>
/// Represents one SoftwareList dataarea object
2020-08-21 15:31:19 -07:00
/// </summary>
/// <remarks>
/// One DataArea can contain multiple Rom items
/// </remarks>
[JsonObject("dataarea")]
public class DataArea
2020-08-21 15:31:19 -07:00
{
/// <summary>
/// Name of the item
/// </summary>
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)]
2020-08-21 15:31:19 -07:00
public string Name { get; set; }
/// <summary>
/// Total size of the area
/// </summary>
[JsonProperty("size", DefaultValueHandling = DefaultValueHandling.Ignore)]
public long? Size { get; set; }
/// <summary>
/// Byte width of the area
/// </summary>
[JsonProperty("width", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Width { get; set; } // TODO: (8|16|32|64) "8"
/// <summary>
/// Byte endianness of the area
/// </summary>
[JsonProperty("endianness", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Endianness { get; set; } // TODO: (big|little) "little"
}
/// <summary>
/// Represents one SoftwareList diskarea object
/// </summary>
/// <remarks>
/// One DiskArea can contain multiple Disk items
/// </remarks>
[JsonObject("diskarea")]
public class DiskArea
{
/// <summary>
/// Name of the item
/// </summary>
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Name { get; set; }
2020-08-21 15:31:19 -07:00
}
2020-08-24 22:25:47 -07:00
/// <summary>
/// Represents one SoftwareList part object
/// </summary>
/// <remarks>
/// One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items
/// </remarks>
2020-08-24 22:25:47 -07:00
[JsonObject("part")]
public class Part
2020-08-24 22:25:47 -07:00
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("interface")]
public string Interface { get; set; }
[JsonProperty("features", DefaultValueHandling = DefaultValueHandling.Ignore)]
public List<PartFeature> Features { get; set; }
}
2020-08-21 15:31:19 -07:00
#endregion
#endregion //DatItem
}