C# Class Subaru.File.Rom

Inheritance: IDisposable
ファイルを表示 Open project: SubaruDieselCrew/ScoobyRom Class Usage Examples

Public Methods

Method Description
CheckProgress ( long pos ) : void
Close ( ) : void
DetectRomType ( Stream stream ) : RomType

Currently only looks at size.

FindMaps ( System.Util tableSearchRange, IList &list2D, IList &list3D ) : void
FindMaps ( int startPos, int lastPos, IList &list2D, IList &list3D ) : void
FindMetadata ( ) : void
IDisposable ( ) : void
NextAlignedPos ( long pos, int align ) : long

Calculates the next aligned position, which is greater than or equal given position.

OnProgressChanged ( int percentDone ) : void
Open ( ) : void
ParsePackedNaturalBCD ( byte hexValue ) : byte

Parses a packed BCD byte. "Natural BCD (NBCD) (Binary Coded Decimal)", also called "8421" encoding. http://en.wikipedia.org/wiki/Binary-coded_decimal Example: input hex 0x98 yields decimal 98.

ReadASCII ( long pos, int length ) : string

Read raw bytes and convert to string. (Ex: Calibration ID)

Rom ( string path ) : System

Private Methods

Method Description
CheckString ( string s, bool>.Func predicate ) : bool
FindExtendASCII ( Stream stream, string find, string &found, long &position ) : bool
IsASCIIPrintable ( char c ) : bool
Predicate ( char c ) : bool
PrintStringInfo ( string s, long pos ) : void

Method Details

CheckProgress() public method

public CheckProgress ( long pos ) : void
pos long
return void

Close() public method

public Close ( ) : void
return void

DetectRomType() public method

Currently only looks at size.
public DetectRomType ( Stream stream ) : RomType
stream Stream /// A ///
return RomType

FindMaps() public method

public FindMaps ( System.Util tableSearchRange, IList &list2D, IList &list3D ) : void
tableSearchRange System.Util
list2D IList
list3D IList
return void

FindMaps() public method

public FindMaps ( int startPos, int lastPos, IList &list2D, IList &list3D ) : void
startPos int
lastPos int
list2D IList
list3D IList
return void

FindMetadata() public method

public FindMetadata ( ) : void
return void

IDisposable() public method

public IDisposable ( ) : void
return void

NextAlignedPos() public static method

Calculates the next aligned position, which is greater than or equal given position.
public static NextAlignedPos ( long pos, int align ) : long
pos long Position or memory address.
align int Alignment in bytes, > 0, i.e. 4 for many 32 bit architectures.
return long

OnProgressChanged() public method

public OnProgressChanged ( int percentDone ) : void
percentDone int
return void

Open() public method

public Open ( ) : void
return void

ParsePackedNaturalBCD() public static method

Parses a packed BCD byte. "Natural BCD (NBCD) (Binary Coded Decimal)", also called "8421" encoding. http://en.wikipedia.org/wiki/Binary-coded_decimal Example: input hex 0x98 yields decimal 98.
public static ParsePackedNaturalBCD ( byte hexValue ) : byte
hexValue byte source value, must be in range 0x00..0x99
return byte

ReadASCII() public method

Read raw bytes and convert to string. (Ex: Calibration ID)
public ReadASCII ( long pos, int length ) : string
pos long /// A ///
length int /// A ///
return string

Rom() public method

public Rom ( string path ) : System
path string
return System