diff --git a/SabreTools.Serialization/Wrappers/N3DS.cs b/SabreTools.Serialization/Wrappers/N3DS.cs
index 692a8804..7b06f998 100644
--- a/SabreTools.Serialization/Wrappers/N3DS.cs
+++ b/SabreTools.Serialization/Wrappers/N3DS.cs
@@ -437,10 +437,10 @@ namespace SabreTools.Serialization.Wrappers
}
///
- /// Get the offset of a partition logo
+ /// Get the offset of a partition logo region
///
- /// Offset to the logo of the partition, 0 on error
- public uint GetLogoOffset(int index)
+ /// Offset to the logo region of the partition, 0 on error
+ public uint GetLogoRegionOffset(int index)
{
// No partitions means no size is available
if (PartitionsTable == null || Partitions == null)
@@ -604,6 +604,48 @@ namespace SabreTools.Serialization.Wrappers
return header.ExtendedHeaderSizeInBytes;
}
+ ///
+ /// Get the size of a partition logo region
+ ///
+ /// Size of the partition logo region in bytes, 0 on error
+ public uint GetLogoRegionSize(int index)
+ {
+ // Empty partitions array means no size is available
+ if (Partitions == null)
+ return 0;
+ if (index < 0 || index >= Partitions.Length)
+ return 0;
+
+ // Invalid partition header means no size is available
+ var header = Partitions[index];
+ if (header == null)
+ return 0;
+
+ // Return the adjusted size
+ return header.LogoRegionSizeInMediaUnits * MediaUnitSize;
+ }
+
+ ///
+ /// Get the size of a partition plain region
+ ///
+ /// Size of the partition plain region in bytes, 0 on error
+ public uint GetPlainRegionSize(int index)
+ {
+ // Empty partitions array means no size is available
+ if (Partitions == null)
+ return 0;
+ if (index < 0 || index >= Partitions.Length)
+ return 0;
+
+ // Invalid partition header means no size is available
+ var header = Partitions[index];
+ if (header == null)
+ return 0;
+
+ // Return the adjusted size
+ return header.PlainRegionSizeInMediaUnits * MediaUnitSize;
+ }
+
///
/// Get the size of a partition RomFS
///