Interface IFileSignature
Represents the ROM file signature
Namespace: Snowflake.Romfile
Assembly: Snowflake.Framework.Primitives.dll
Syntax
public interface IFileSignature
Properties
HeaderSignature
Gets the byte array from byte position 0 containing the header or other identifier of the ROM. Usually the first 1024 bytes.
Declaration
byte[] HeaderSignature { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
GetInternalName(Stream)
Gets the internal name of the ROM if possible
Declaration
string GetInternalName(Stream fileContents)
Parameters
Type | Name | Description |
---|---|---|
System. |
fileContents | The contents of the ROM |
Returns
Type | Description |
---|---|
System. |
Remarks
Never close fileContents
.
This method may not throw if Header
GetSerial(Stream)
Gets the game serial from the file signature if possible
Declaration
string GetSerial(Stream fileContents)
Parameters
Type | Name | Description |
---|---|---|
System. |
fileContents | The contents of the ROM |
Returns
Type | Description |
---|---|
System. |
Remarks
Never close fileContents
.
This method may not throw if Header
HeaderSignatureMatches(Stream)
Whether or not the header signature of a file matches this platform's ROM type. To handle multiple types of ROMs, use a series of ifs or an switch.
Declaration
bool HeaderSignatureMatches(Stream fileContents)
Parameters
Type | Name | Description |
---|---|---|
System. |
fileContents | The contents of the ROM |
Returns
Type | Description |
---|---|
System. |
If this ROM is executable data for this platform, it should return true. |
Remarks
Never close fileContents
.
This method must never throw. Return false if an exception occurs.