mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-02-04 05:36:12 +00:00
PlayStation3 model cleanup
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
// TODO: Add more constants from the wiki
|
||||
namespace SabreTools.Data.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PS3_DISC.SFB"/>
|
||||
/// <see href="https://psdevwiki.com/ps3/PS3_DISC.SFB"/>
|
||||
public static class Constants
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifying bytes for SFO file
|
||||
/// </summary>
|
||||
public const uint SFOMagic = 0x00505346;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Identifying bytes for SFB file
|
||||
/// </summary>
|
||||
public const uint SFBMagic = 0x2E534642;
|
||||
|
||||
|
||||
#region Hybrid Flags
|
||||
|
||||
/// <summary>
|
||||
@@ -64,4 +64,4 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// TODO: Add more enumerations from the wiki
|
||||
namespace SabreTools.Data.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
public enum DataFormat : ushort
|
||||
{
|
||||
/// <summary>
|
||||
@@ -28,4 +28,4 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// </remarks>
|
||||
Integer = 0x0404,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? FlagsType;
|
||||
public string FlagsType;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Content Data Offset
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// </summary>
|
||||
/// <remarks>0x08 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x08)]
|
||||
public string? DiscTitleName;
|
||||
public string DiscTitleName;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
@@ -83,21 +83,21 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// </summary>
|
||||
/// <remarks>0x20 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x20)]
|
||||
public string? DiscContent;
|
||||
public string DiscContent;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Title
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? DiscTitle;
|
||||
public string DiscTitle;
|
||||
|
||||
/// <summary>
|
||||
/// Disc Version
|
||||
/// </summary>
|
||||
/// <remarks>0x10 bytes</remarks>
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x10)]
|
||||
public string? DiscVersion;
|
||||
public string DiscVersion;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown (zeroes)
|
||||
|
||||
@@ -6,12 +6,12 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// <summary>
|
||||
/// SFO header
|
||||
/// </summary>
|
||||
public SFOHeader? Header { get; set; }
|
||||
public SFOHeader Header { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Index table
|
||||
/// </summary>
|
||||
public SFOIndexTableEntry[]? IndexTable { get; set; }
|
||||
public SFOIndexTableEntry[] IndexTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Key table
|
||||
@@ -29,7 +29,7 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// coincidence caused by the length of the key names used, when this
|
||||
/// happens there is no padding needed)
|
||||
/// </remarks>
|
||||
public string[]? KeyTable { get; set; }
|
||||
public string[] KeyTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Padding
|
||||
@@ -50,6 +50,6 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// being used). This entries can be considered reserved, and are marked with
|
||||
/// a len = 0 in the associated entry in the index_table
|
||||
/// </remarks>
|
||||
public byte[][]? DataTable { get; set; }
|
||||
public byte[][] DataTable { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Data.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class SFOHeader
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Data.Models.PlayStation3
|
||||
{
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
/// <see href="https://psdevwiki.com/ps3/PARAM.SFO"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class SFOIndexTableEntry
|
||||
{
|
||||
@@ -16,12 +16,12 @@ namespace SabreTools.Data.Models.PlayStation3
|
||||
/// Data type
|
||||
/// </summary>
|
||||
[MarshalAs(UnmanagedType.U2)]
|
||||
public DataFormat DataFormat;
|
||||
public DataFormat DataFormat;
|
||||
|
||||
/// <summary>
|
||||
/// Data used length
|
||||
/// </summary>
|
||||
public uint DataLength;
|
||||
public uint DataLength;
|
||||
|
||||
/// <summary>
|
||||
/// Data total length. TITLE_ID is always = 16 bytes
|
||||
|
||||
Reference in New Issue
Block a user