Add database table for iNES/NES 2.0 manually written information from headers.

This commit is contained in:
2021-12-08 20:34:36 +00:00
parent 09a8b3bb5d
commit 2152a6deab
3 changed files with 48 additions and 23 deletions

View File

@@ -68,6 +68,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="CdOffsetDto.cs" /> <Compile Include="CdOffsetDto.cs" />
<Compile Include="DeviceDto.cs" /> <Compile Include="DeviceDto.cs" />
<Compile Include="NesHeaderDto.cs" />
<Compile Include="SyncDto.cs" /> <Compile Include="SyncDto.cs" />
<Compile Include="UsbProductDto.cs" /> <Compile Include="UsbProductDto.cs" />
<Compile Include="UsbVendorDto.cs" /> <Compile Include="UsbVendorDto.cs" />

33
NesHeaderDto.cs Normal file
View File

@@ -0,0 +1,33 @@
using Aaru.CommonTypes.Enums;
namespace Aaru.Dto;
/// <summary>DTO for iNES/NES 2.0 headers</summary>
public class NesHeaderDto
{
public int Id { get; set; }
/// <summary>ROM hash</summary>
public string Sha256 { get; set; }
/// <summary>If <c>true</c> vertical mirroring is hard-wired, horizontal or mapper defined otherwise</summary>
public bool NametableMirroring { get; set; }
/// <summary>If <c>true</c> a battery is present</summary>
public bool BatteryPresent { get; set; }
/// <summary>If <c>true</c> the four player screen mode is hardwired</summary>
public bool FourScreenMode { get; set; }
/// <summary>Mapper number (NES 2.0 when in conflict)</summary>
public ushort Mapper { get; set; }
/// <summary>Console type</summary>
public NesConsoleType ConsoleType { get; set; }
/// <summary>Submapper number</summary>
public byte Submapper { get; set; }
/// <summary>Timing mode</summary>
public NesTimingMode TimingMode { get; set; }
/// <summary>Vs. PPU type</summary>
public NesVsPpuType VsPpuType { get; set; }
/// <summary>Vs. hardware type</summary>
public NesVsHardwareType VsHardwareType { get; set; }
/// <summary>Extended console type</summary>
public NesExtendedConsoleType ExtendedConsoleType { get; set; }
/// <summary>Default expansion device</summary>
public NesDefaultExpansionDevice DefaultExpansionDevice { get; set; }
}

View File

@@ -32,28 +32,19 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Aaru.Dto namespace Aaru.Dto;
/// <summary>DTO for database synchronization.</summary>
public class SyncDto
{ {
/// <summary> /// <summary>List of USB vendors</summary>
/// DTO for database synchronization. public List<UsbVendorDto> UsbVendors { get; set; }
/// </summary> /// <summary>List of USB products</summary>
public class SyncDto public List<UsbProductDto> UsbProducts { get; set; }
{ /// <summary>List of CD read offsets</summary>
/// <summary> public List<CdOffsetDto> Offsets { get; set; }
/// List of USB vendors /// <summary>List of known devices</summary>
/// </summary> public List<DeviceDto> Devices { get; set; }
public List<UsbVendorDto> UsbVendors { get; set; } /// <summary>List of known iNES/NES 2.0 headers</summary>
/// <summary> public List<NesHeaderDto> NesHeaders { get; set; }
/// List of USB products
/// </summary>
public List<UsbProductDto> UsbProducts { get; set; }
/// <summary>
/// List of CD read offsets
/// </summary>
public List<CdOffsetDto> Offsets { get; set; }
/// <summary>
/// List of known devices
/// </summary>
public List<DeviceDto> Devices { get; set; }
}
} }