From 2152a6deab8f7ecab2b39ccb3c43afbdecf9380d Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 8 Dec 2021 20:34:36 +0000 Subject: [PATCH] Add database table for iNES/NES 2.0 manually written information from headers. --- Aaru.Dto.csproj | 1 + NesHeaderDto.cs | 33 +++++++++++++++++++++++++++++++++ SyncDto.cs | 37 ++++++++++++++----------------------- 3 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 NesHeaderDto.cs diff --git a/Aaru.Dto.csproj b/Aaru.Dto.csproj index 50a5a3982..45e6d5be8 100644 --- a/Aaru.Dto.csproj +++ b/Aaru.Dto.csproj @@ -68,6 +68,7 @@ + diff --git a/NesHeaderDto.cs b/NesHeaderDto.cs new file mode 100644 index 000000000..1f22156a2 --- /dev/null +++ b/NesHeaderDto.cs @@ -0,0 +1,33 @@ +using Aaru.CommonTypes.Enums; + +namespace Aaru.Dto; + +/// DTO for iNES/NES 2.0 headers +public class NesHeaderDto +{ + public int Id { get; set; } + /// ROM hash + public string Sha256 { get; set; } + /// If true vertical mirroring is hard-wired, horizontal or mapper defined otherwise + public bool NametableMirroring { get; set; } + /// If true a battery is present + public bool BatteryPresent { get; set; } + /// If true the four player screen mode is hardwired + public bool FourScreenMode { get; set; } + /// Mapper number (NES 2.0 when in conflict) + public ushort Mapper { get; set; } + /// Console type + public NesConsoleType ConsoleType { get; set; } + /// Submapper number + public byte Submapper { get; set; } + /// Timing mode + public NesTimingMode TimingMode { get; set; } + /// Vs. PPU type + public NesVsPpuType VsPpuType { get; set; } + /// Vs. hardware type + public NesVsHardwareType VsHardwareType { get; set; } + /// Extended console type + public NesExtendedConsoleType ExtendedConsoleType { get; set; } + /// Default expansion device + public NesDefaultExpansionDevice DefaultExpansionDevice { get; set; } +} \ No newline at end of file diff --git a/SyncDto.cs b/SyncDto.cs index 5d1fdfc1d..0d0eeb8db 100644 --- a/SyncDto.cs +++ b/SyncDto.cs @@ -32,28 +32,19 @@ using System.Collections.Generic; -namespace Aaru.Dto +namespace Aaru.Dto; + +/// DTO for database synchronization. +public class SyncDto { - /// - /// DTO for database synchronization. - /// - public class SyncDto - { - /// - /// List of USB vendors - /// - public List UsbVendors { get; set; } - /// - /// List of USB products - /// - public List UsbProducts { get; set; } - /// - /// List of CD read offsets - /// - public List Offsets { get; set; } - /// - /// List of known devices - /// - public List Devices { get; set; } - } + /// List of USB vendors + public List UsbVendors { get; set; } + /// List of USB products + public List UsbProducts { get; set; } + /// List of CD read offsets + public List Offsets { get; set; } + /// List of known devices + public List Devices { get; set; } + /// List of known iNES/NES 2.0 headers + public List NesHeaders { get; set; } } \ No newline at end of file