Print IRD fields, add a READEME
This commit is contained in:
@@ -1242,6 +1242,43 @@ namespace LibIRD
|
||||
uid);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prints IRD fields to console
|
||||
/// </summary>
|
||||
public void Print()
|
||||
{
|
||||
// Build string from parameters
|
||||
StringBuilder print = new();
|
||||
print.AppendLine("IRD Contents:");
|
||||
print.AppendLine("=============");
|
||||
|
||||
// Append IRD fields to string builder
|
||||
print.AppendLine($"Magic: 3IRD");
|
||||
print.AppendLine($"IRD Version: {Version}");
|
||||
print.AppendLine($"Title ID: {TitleID}");
|
||||
print.AppendLine($"Title: {Title}");
|
||||
print.AppendLine($"PUP Version: {SystemVersion}");
|
||||
print.AppendLine($"Game Version: {GameVersion}");
|
||||
print.AppendLine($"App Version: {AppVersion}");
|
||||
print.AppendLine($"Regions: {RegionCount}");
|
||||
print.AppendLine($"Files: {FileCount}");
|
||||
if (ExtraConfig != 0x0000)
|
||||
print.AppendLine($"Extra Config: {ExtraConfig:X4}");
|
||||
if (Attachments != 0x0000)
|
||||
print.AppendLine($"Attachments: {Attachments:X4}");
|
||||
print.AppendLine($"Unique ID: {UID:X8}");
|
||||
print.AppendLine($"Data 1 Key: {Convert.ToHexString(Data1Key)}");
|
||||
print.AppendLine($"Data 2 Key: {Convert.ToHexString(Data2Key)}");
|
||||
print.AppendLine($"PIC: {Convert.ToHexString(PIC)}");
|
||||
print.AppendLine();
|
||||
|
||||
// Ensure UTF-8 will display properly
|
||||
Console.OutputEncoding = Encoding.UTF8;
|
||||
|
||||
// Print formatted string
|
||||
Console.Write(print);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,8 @@
|
||||
<!-- Package Properties -->
|
||||
<Authors>Deterous</Authors>
|
||||
<Description>Library for ISO Rebuild Data</Description>
|
||||
<Copyright>Copyright (c)2023 Deterous</Copyright>
|
||||
<Copyright>Copyright (c) Deterous 2023</Copyright>
|
||||
<PackageReadmeFile>README.MD</PackageReadmeFile>
|
||||
<RepositoryUrl>https://github.com/Deterous/LibIRD</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageTags>ps3 iso ird</PackageTags>
|
||||
|
||||
+5
-2
@@ -208,7 +208,9 @@ namespace LibIRD
|
||||
public void Print()
|
||||
{
|
||||
// Build string from parameters
|
||||
StringBuilder print = new("PARAM.SFO Contents:\n====================\n");
|
||||
StringBuilder print = new();
|
||||
print.AppendLine("PARAM.SFO Contents:");
|
||||
print.AppendLine("====================");
|
||||
|
||||
// Loop through all parameters in PARAM.SFO
|
||||
for (int i = 0; i < ParamCount; i++)
|
||||
@@ -221,9 +223,10 @@ namespace LibIRD
|
||||
{
|
||||
case 0x0404:
|
||||
print.Append(Params[i].IntValue);
|
||||
print.AppendLine();
|
||||
break;
|
||||
default:
|
||||
print.Append(Params[i].StringValue);
|
||||
print.AppendLine(Params[i].StringValue);
|
||||
break;
|
||||
}
|
||||
print.Append('\n');
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ namespace LibIRD
|
||||
/// <summary>
|
||||
/// ISO file size
|
||||
/// </summary>
|
||||
public long Size { get; private set; }
|
||||
private long Size { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user