mirror of
https://github.com/aaru-dps/Aaru.Decoders.git
synced 2025-12-16 19:24:32 +00:00
[Aaru.Decoders] Introduced constants for module names
Introduces constant fields for respective debug module names, replacing the hardcoded ones. This is done to standardize the naming convention, reduce redundancy and potentially avoid any typos or name mismatches across the project. This change makes the code more maintainable and easier to update in case module names need to be changed.
This commit is contained in:
@@ -55,6 +55,7 @@ namespace Aaru.Decoders.Bluray;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static class BCA
|
||||
{
|
||||
const string MODULE_NAME = "BD BCA decoder";
|
||||
#region Public structures
|
||||
public struct BurstCuttingArea
|
||||
{
|
||||
@@ -76,7 +77,7 @@ public static class BCA
|
||||
|
||||
if(BCAResponse.Length != 68)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD BCA decoder", Localization.Found_incorrect_Blu_ray_BCA_size_0_bytes,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Found_incorrect_Blu_ray_BCA_size_0_bytes,
|
||||
BCAResponse.Length);
|
||||
|
||||
return null;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace Aaru.Decoders.Bluray;
|
||||
SuppressMessage("ReSharper", "UnassignedField.Global")]
|
||||
public static class Cartridge
|
||||
{
|
||||
const string MODULE_NAME = "BD Cartridge Status decoder";
|
||||
#region Public structures
|
||||
public struct CartridgeStatus
|
||||
{
|
||||
@@ -91,7 +92,7 @@ public static class Cartridge
|
||||
|
||||
if(CSResponse.Length != 8)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Cartridge Status decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.Found_incorrect_Blu_ray_Cartridge_Status_size_0_bytes,
|
||||
CSResponse.Length);
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ public static class DDS
|
||||
#region Private constants
|
||||
/// <summary>Disc Definition Structure Identifier "DS"</summary>
|
||||
const ushort DDSIdentifier = 0x4453;
|
||||
const string MODULE_NAME = "BD DDS decoder";
|
||||
#endregion Private constants
|
||||
|
||||
#region Public structures
|
||||
@@ -132,7 +133,7 @@ public static class DDS
|
||||
|
||||
if(decoded.Signature != DDSIdentifier)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD DDS decoder", Localization.Found_incorrect_DDS_signature_0,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Found_incorrect_DDS_signature_0,
|
||||
decoded.Signature);
|
||||
|
||||
return null;
|
||||
|
||||
@@ -91,6 +91,7 @@ public static class DI
|
||||
|
||||
/// <summary>Disc Information Unit Identifier "DI"</summary>
|
||||
const ushort DIUIdentifier = 0x4449;
|
||||
const string MODULE_NAME = "BD Disc Information decoder";
|
||||
#endregion Private constants
|
||||
|
||||
#region Public methods
|
||||
@@ -101,7 +102,7 @@ public static class DI
|
||||
|
||||
if(DIResponse.Length != 4100)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Disc Information decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.Found_incorrect_Blu_ray_Disc_Information_size_0_bytes,
|
||||
DIResponse.Length);
|
||||
|
||||
@@ -192,7 +193,7 @@ public static class DI
|
||||
|
||||
default:
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Disc Information decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.Found_unknown_disc_type_identifier_0,
|
||||
Encoding.ASCII.GetString(unit.DiscTypeIdentifier));
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace Aaru.Decoders.Bluray;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static class Spare
|
||||
{
|
||||
const string MODULE_NAME = "BD Spare Area Information decoder";
|
||||
#region Public structures
|
||||
public struct SpareAreaInformation
|
||||
{
|
||||
@@ -79,7 +80,7 @@ public static class Spare
|
||||
|
||||
if(SAIResponse.Length != 16)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("BD Spare Area Information decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Spare_Decode_Found_incorrect_Blu_ray_Spare_Area_Information_size_0_bytes,
|
||||
SAIResponse.Length);
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static class ATIP
|
||||
{
|
||||
const string MODULE_NAME = "CD ATIP decoder";
|
||||
|
||||
public static CDATIP Decode(byte[] CDATIPResponse)
|
||||
{
|
||||
if(CDATIPResponse is not { Length: > 4 })
|
||||
@@ -65,7 +67,7 @@ public static class ATIP
|
||||
if(CDATIPResponse.Length != 32 &&
|
||||
CDATIPResponse.Length != 28)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD ATIP decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CD_ATIP_size_32_bytes_is_not_received_size_0_bytes_not_decoding,
|
||||
CDATIPResponse.Length);
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global"), SuppressMessage("ReSharper", "NotAccessedField.Global")]
|
||||
public static class CDTextOnLeadIn
|
||||
{
|
||||
const string MODULE_NAME = "CD-TEXT decoder";
|
||||
|
||||
public enum PackTypeIndicator : byte
|
||||
{
|
||||
/// <summary>Title of the track (or album if track == 0)</summary>
|
||||
@@ -110,7 +112,7 @@ public static class CDTextOnLeadIn
|
||||
|
||||
if(decoded.DataLength + 2 != CDTextResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD-TEXT decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CD_TEXT_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDTextResponse.Length);
|
||||
|
||||
@@ -60,6 +60,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class FullTOC
|
||||
{
|
||||
const string MODULE_NAME = "CD full TOC decoder";
|
||||
|
||||
public static CDFullTOC? Decode(byte[] CDFullTOCResponse)
|
||||
{
|
||||
if(CDFullTOCResponse is not { Length: > 4 })
|
||||
@@ -76,7 +78,7 @@ public static class FullTOC
|
||||
|
||||
if(decoded.DataLength + 2 != CDFullTOCResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD full TOC decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CDFullTOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDFullTOCResponse.Length);
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class PMA
|
||||
{
|
||||
const string MODULE_NAME = "CD PMA decoder";
|
||||
|
||||
public static CDPMA? Decode(byte[] CDPMAResponse)
|
||||
{
|
||||
if(CDPMAResponse is not { Length: > 4 })
|
||||
@@ -74,7 +76,7 @@ public static class PMA
|
||||
|
||||
if(decoded.DataLength + 2 != CDPMAResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD PMA decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CD_PMA_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDPMAResponse.Length);
|
||||
|
||||
@@ -53,6 +53,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class Session
|
||||
{
|
||||
const string MODULE_NAME = "CD Session Info decoder";
|
||||
|
||||
public static CDSessionInfo? Decode(byte[] CDSessionInfoResponse)
|
||||
{
|
||||
if(CDSessionInfoResponse is not { Length: > 4 })
|
||||
@@ -69,7 +71,7 @@ public static class Session
|
||||
|
||||
if(decoded.DataLength + 2 != CDSessionInfoResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD Session Info decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CDSessionInfo_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDSessionInfoResponse.Length);
|
||||
|
||||
@@ -56,6 +56,8 @@ namespace Aaru.Decoders.CD;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class TOC
|
||||
{
|
||||
const string MODULE_NAME = "CD TOC decoder";
|
||||
|
||||
public static CDTOC? Decode(byte[] CDTOCResponse)
|
||||
{
|
||||
if(CDTOCResponse is not { Length: > 4 })
|
||||
@@ -72,7 +74,7 @@ public static class TOC
|
||||
|
||||
if(decoded.DataLength + 2 != CDTOCResponse.Length)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("CD TOC decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
Expected_CD_TOC_size_0_bytes_is_not_received_size_1_bytes_not_decoding,
|
||||
decoded.DataLength + 2, CDTOCResponse.Length);
|
||||
|
||||
@@ -46,6 +46,7 @@ namespace Aaru.Decoders.Floppy;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class Apple2
|
||||
{
|
||||
const string MODULE_NAME = "Apple ][ GCR Decoder";
|
||||
static readonly byte[] ReadTable5and3 =
|
||||
{
|
||||
// 00h
|
||||
@@ -269,7 +270,7 @@ public static class Apple2
|
||||
if(data[position] == 0xD5 &&
|
||||
data[position + 1] == 0xAA)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Prologue_found_at_0, position);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Prologue_found_at_0, position);
|
||||
|
||||
// Epilogue not in correct position
|
||||
if(data[position + 11] != 0xDE ||
|
||||
@@ -307,23 +308,23 @@ public static class Apple2
|
||||
}
|
||||
};
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Volume_0,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Volume_0,
|
||||
(((sector.addressField.volume[0] & 0x55) << 1) |
|
||||
(sector.addressField.volume[1] & 0x55)) & 0xFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Core.Track_0,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Core.Track_0,
|
||||
(((sector.addressField.track[0] & 0x55) << 1) |
|
||||
(sector.addressField.track[1] & 0x55)) & 0xFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Sector_0,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Sector_0,
|
||||
(((sector.addressField.sector[0] & 0x55) << 1) |
|
||||
(sector.addressField.sector[1] & 0x55)) & 0xFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Checksum_0,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Checksum_0,
|
||||
(((sector.addressField.checksum[0] & 0x55) << 1) |
|
||||
(sector.addressField.checksum[1] & 0x55)) & 0xFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Epilogue_0_1_2,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Epilogue_0_1_2,
|
||||
sector.addressField.epilogue[0], sector.addressField.epilogue[1],
|
||||
sector.addressField.epilogue[2]);
|
||||
|
||||
@@ -352,10 +353,10 @@ public static class Apple2
|
||||
sector.innerGap = gaps.ToArray();
|
||||
sector.dataField = new RawDataField();
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Inner_gap_has_0_bytes,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Inner_gap_has_0_bytes,
|
||||
sector.innerGap.Length);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Prologue_found_at_0, position);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Prologue_found_at_0, position);
|
||||
sector.dataField.prologue = new byte[3];
|
||||
sector.dataField.prologue[0] = data[position];
|
||||
sector.dataField.prologue[1] = data[position + 1];
|
||||
@@ -378,7 +379,7 @@ public static class Apple2
|
||||
|
||||
sector.dataField.data = gaps.ToArray();
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Data_has_0_bytes,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Data_has_0_bytes,
|
||||
sector.dataField.data.Length);
|
||||
|
||||
sector.dataField.checksum = data[position];
|
||||
@@ -410,10 +411,10 @@ public static class Apple2
|
||||
// Return current position to be able to read separate sectors
|
||||
endOffset = position;
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Got_0_bytes_of_gap,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Got_0_bytes_of_gap,
|
||||
sector.gap.Length);
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Finished_sector_at_0, position);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Finished_sector_at_0, position);
|
||||
|
||||
return sector;
|
||||
}
|
||||
@@ -523,7 +524,7 @@ public static class Apple2
|
||||
break;
|
||||
}
|
||||
|
||||
AaruConsole.DebugWriteLine("Apple ][ GCR Decoder", Localization.Adding_sector_0_of_track_1,
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Adding_sector_0_of_track_1,
|
||||
(((sector.addressField.sector[0] & 0x55) << 1) |
|
||||
(sector.addressField.sector[1] & 0x55)) & 0xFF,
|
||||
(((sector.addressField.track[0] & 0x55) << 1) |
|
||||
|
||||
44
Sega/CD.cs
44
Sega/CD.cs
@@ -46,6 +46,8 @@ namespace Aaru.Decoders.Sega;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class CD
|
||||
{
|
||||
const string MODULE_NAME = "SegaCD IP.BIN Decoder";
|
||||
|
||||
/// <summary>Decodes an IP.BIN sector in SEGA CD / MEGA CD format</summary>
|
||||
/// <param name="ipbin_sector">IP.BIN sector</param>
|
||||
/// <returns>Decoded IP.BIN</returns>
|
||||
@@ -59,60 +61,60 @@ public static class CD
|
||||
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_name = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.volume_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.volume_name));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.system_name = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.system_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.system_name));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_version = \"{0:X}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.volume_version = \"{0:X}\"",
|
||||
ipbin.volume_version);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.volume_type = 0x{0:X8}", ipbin.volume_type);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.volume_type = 0x{0:X8}", ipbin.volume_type);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.system_version = 0x{0:X8}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.system_version = 0x{0:X8}",
|
||||
ipbin.system_version);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_address = 0x{0:X8}", ipbin.ip_address);
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_loadsize = {0}", ipbin.ip_loadsize);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.ip_address = 0x{0:X8}", ipbin.ip_address);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.ip_loadsize = {0}", ipbin.ip_loadsize);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_entry_address = 0x{0:X8}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.ip_entry_address = 0x{0:X8}",
|
||||
ipbin.ip_entry_address);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.ip_work_ram_size = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.ip_work_ram_size = {0}",
|
||||
ipbin.ip_work_ram_size);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_address = 0x{0:X8}", ipbin.sp_address);
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_loadsize = {0}", ipbin.sp_loadsize);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.sp_address = 0x{0:X8}", ipbin.sp_address);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.sp_loadsize = {0}", ipbin.sp_loadsize);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_entry_address = 0x{0:X8}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.sp_entry_address = 0x{0:X8}",
|
||||
ipbin.sp_entry_address);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.sp_work_ram_size = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.sp_work_ram_size = {0}",
|
||||
ipbin.sp_work_ram_size);
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.release_date = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.release_date2 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.release_date2 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date2));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.developer_code = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.developer_code = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.developer_code));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.domestic_title = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.domestic_title = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.domestic_title));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.overseas_title = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.overseas_title = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.overseas_title));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.product_code = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.product_code = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_code));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.peripherals = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
|
||||
AaruConsole.DebugWriteLine("SegaCD IP.BIN Decoder", "segacd_ipbin.region_codes = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "segacd_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
|
||||
string id = Encoding.ASCII.GetString(ipbin.SegaHardwareID);
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Aaru.Decoders.Sega;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class Dreamcast
|
||||
{
|
||||
const string MODULE_NAME = "Dreamcast IP.BIN Decoder";
|
||||
|
||||
/// <summary>Decodes an IP.BIN sector in Dreamcast format</summary>
|
||||
/// <param name="ipbin_sector">IP.BIN sector</param>
|
||||
/// <returns>Decoded IP.BIN</returns>
|
||||
@@ -58,51 +60,51 @@ public static class Dreamcast
|
||||
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.maker_id = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space1 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.spare_space1 = \"{0}\"",
|
||||
(char)ipbin.spare_space1);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.dreamcast_media = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.dreamcast_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.dreamcast_media));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_no_separator = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.disc_no_separator = \"{0}\"",
|
||||
(char)ipbin.disc_no_separator);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.disc_total_nos = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.disc_total_nos = \"{0}\"",
|
||||
(char)ipbin.disc_total_nos);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space2 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.spare_space2 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space2));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.region_codes = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.peripherals = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_no = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.product_no = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_no));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_version = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.release_date = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.spare_space3 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.spare_space3 = \"{0}\"",
|
||||
(char)ipbin.spare_space3);
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.boot_filename = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.boot_filename = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.boot_filename));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.producer = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.producer = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.producer));
|
||||
|
||||
AaruConsole.DebugWriteLine("Dreamcast IP.BIN Decoder", "dreamcast_ipbin.product_name = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "dreamcast_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
|
||||
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGAKATANA " ? ipbin : null;
|
||||
|
||||
@@ -45,6 +45,8 @@ namespace Aaru.Decoders.Sega;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public static class Saturn
|
||||
{
|
||||
const string MODULE_NAME = "Saturn IP.BIN Decoder";
|
||||
|
||||
/// <summary>Decodes an IP.BIN sector in Saturn format</summary>
|
||||
/// <param name="ipbin_sector">IP.BIN sector</param>
|
||||
/// <returns>Decoded IP.BIN</returns>
|
||||
@@ -58,42 +60,42 @@ public static class Saturn
|
||||
|
||||
IPBin ipbin = Marshal.ByteArrayToStructureLittleEndian<IPBin>(ipbin_sector);
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.maker_id = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.maker_id = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.maker_id));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_no = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.product_no = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_no));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_version = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.product_version = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_version));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.release_date = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.saturn_media = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.saturn_media = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.saturn_media));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.disc_no = {0}", (char)ipbin.disc_no);
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_no_separator = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.disc_no_separator = \"{0}\"",
|
||||
(char)ipbin.disc_no_separator);
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.disc_total_nos = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.disc_total_nos = {0}",
|
||||
(char)ipbin.disc_total_nos);
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.release_date = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.release_date = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.release_date));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.spare_space1 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.spare_space1 = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.spare_space1));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.region_codes = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.region_codes = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.region_codes));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.peripherals = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.peripherals = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.peripherals));
|
||||
|
||||
AaruConsole.DebugWriteLine("Saturn IP.BIN Decoder", "saturn_ipbin.product_name = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "saturn_ipbin.product_name = \"{0}\"",
|
||||
Encoding.ASCII.GetString(ipbin.product_name));
|
||||
|
||||
return Encoding.ASCII.GetString(ipbin.SegaHardwareID) == "SEGA SEGASATURN " ? ipbin : null;
|
||||
|
||||
Reference in New Issue
Block a user