Compare commits

..

5 Commits
1.1.3 ... 1.1.6

Author SHA1 Message Date
Matt Nadareski
0d62cbd1e9 Add XGD4 PIC reading 2023-09-28 23:25:25 -04:00
Matt Nadareski
bf753262a5 Update Models version 2023-09-22 16:05:20 -04:00
Matt Nadareski
5510b5d19d Fix inconsistent access issue 2023-09-16 00:55:31 -04:00
Matt Nadareski
d0f0ade757 Bump version 2023-09-16 00:44:35 -04:00
Matt Nadareski
26b03d8256 Make some base functionality public 2023-09-16 00:15:44 -04:00
4 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
<!-- Assembly Properties -->
<TargetFrameworks>net48;net6.0;net7.0;net8.0</TargetFrameworks>
<RuntimeIdentifiers>win-x86;win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<Version>1.1.3</Version>
<Version>1.1.6</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- Package Properties -->
@@ -29,7 +29,7 @@
<ItemGroup>
<PackageReference Include="SabreTools.IO" Version="1.1.1" />
<PackageReference Include="SabreTools.Models" Version="1.1.2" />
<PackageReference Include="SabreTools.Models" Version="1.1.4" />
</ItemGroup>
</Project>

View File

@@ -171,6 +171,7 @@ namespace SabreTools.Serialization.Streams
{
case DiscTypeIdentifierROM:
case DiscTypeIdentifierROMUltra:
case DiscTypeIdentifierXGD4:
body.FormatDependentContents = data.ReadBytes(52);
break;
case DiscTypeIdentifierReWritable:

View File

@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace SabreTools.Serialization.Wrappers
{

View File

@@ -142,7 +142,7 @@ namespace SabreTools.Serialization.Wrappers
/// Validate the backing data source
/// </summary>
/// <returns>True if the data source is valid, false otherwise</returns>
protected bool DataSourceIsValid()
public bool DataSourceIsValid()
{
switch (_dataSource)
{
@@ -167,7 +167,7 @@ namespace SabreTools.Serialization.Wrappers
/// <param name="position">Position in the source</param>
/// <param name="length">Length of the data to check</param>
/// <returns>True if the positional data is valid, false otherwise</returns>
protected bool SegmentValid(int position, int length)
public bool SegmentValid(int position, int length)
{
// Validate the data souece
if (!DataSourceIsValid())
@@ -207,9 +207,9 @@ namespace SabreTools.Serialization.Wrappers
/// <param name="length">Length of the requested data</param>
/// <returns>Byte array containing the requested data, null on error</returns>
#if NET48
protected byte[] ReadFromDataSource(int position, int length)
public byte[] ReadFromDataSource(int position, int length)
#else
protected byte[]? ReadFromDataSource(int position, int length)
public byte[]? ReadFromDataSource(int position, int length)
#endif
{
// Validate the data source
@@ -260,9 +260,9 @@ namespace SabreTools.Serialization.Wrappers
/// <param name="charLimit">Number of characters needed to be a valid string</param>
/// <returns>String list containing the requested data, null on error</returns>
#if NET48
protected List<string> ReadStringsFromDataSource(int position, int length, int charLimit = 5)
public List<string> ReadStringsFromDataSource(int position, int length, int charLimit = 5)
#else
protected List<string>? ReadStringsFromDataSource(int position, int length, int charLimit = 5)
public List<string>? ReadStringsFromDataSource(int position, int length, int charLimit = 5)
#endif
{
// Read the data as a byte array first
@@ -370,7 +370,7 @@ namespace SabreTools.Serialization.Wrappers
/// Get the ending offset of the source
/// </summary>
/// <returns>Value greater than 0 for a valid end of file, -1 on error</returns>
protected int GetEndOfFile()
public int GetEndOfFile()
{
// Validate the data souece
if (!DataSourceIsValid())