2026-03-13 10:51:31 -04:00
|
|
|
namespace SabreTools.Data.Models.XboxExecutable
|
2026-03-13 10:28:05 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// XBox Executable format section header
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <see href="https://www.caustik.com/cxbx/download/xbe.htm"/>
|
2026-03-13 12:31:33 -04:00
|
|
|
/// <see href="https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/blob/master/src/common/xbe/Xbe.h"/>
|
2026-03-13 10:28:05 -04:00
|
|
|
/// <see cref="COFF.SectionHeader"/>
|
2026-03-13 10:51:31 -04:00
|
|
|
public class SectionHeader
|
2026-03-13 10:28:05 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Various flags for this .XBE section.
|
|
|
|
|
/// </summary>
|
2026-03-13 10:51:31 -04:00
|
|
|
public SectionFlags SectionFlags { get; set; }
|
2026-03-13 10:28:05 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Address of memory to load this section at.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint VirtualAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Number of bytes in memory to fill with this section.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint VirtualSize { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// File address where this section resides in the .XBE file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint RawAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Number of bytes of this section that exist in the .XBE file.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint RawSize { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Address to the name for this section, after the .XBE is loaded into memory.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint SectionNameAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// It is typically safe to set this to zero.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint SectionNameReferenceCount { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// It is typically safe to set this to point to a 2-byte WORD in memory with value zero.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint HeadSharedPageReferenceCountAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// It is typically safe to set this to point to a 2-byte WORD in memory with value zero.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public uint TailSharedPageReferenceCountAddress { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 20-byte digest for this section. For unsigned .XBE files, it is safe to set this to zeros.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public byte[] SectionDigest { get; set; } = new byte[20];
|
|
|
|
|
}
|
|
|
|
|
}
|