[Project64] Clean up N64 Rom Class.cpp
This commit is contained in:
parent
165bdc160b
commit
63096c99d3
File diff suppressed because it is too large
Load Diff
|
@ -13,45 +13,45 @@
|
||||||
#include "N64 Types.h"
|
#include "N64 Types.h"
|
||||||
|
|
||||||
class CN64Rom :
|
class CN64Rom :
|
||||||
protected CDebugSettings
|
protected CDebugSettings
|
||||||
{
|
{
|
||||||
//constant values
|
//constant values
|
||||||
enum { ReadFromRomSection = 0x400000 };
|
enum { ReadFromRomSection = 0x400000 };
|
||||||
|
|
||||||
//class variables
|
|
||||||
HANDLE m_hRomFile, m_hRomFileMapping;
|
|
||||||
BYTE * m_ROMImage;
|
|
||||||
DWORD m_RomFileSize;
|
|
||||||
Country m_Country;
|
|
||||||
CICChip m_CicChip;
|
|
||||||
LanguageStringID m_ErrorMsg;
|
|
||||||
stdstr m_RomName, m_FileName, m_MD5, m_RomIdent;
|
|
||||||
|
|
||||||
bool AllocateAndLoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly );
|
//class variables
|
||||||
bool AllocateAndLoadZipImage ( const char * FileLoc, bool LoadBootCodeOnly );
|
HANDLE m_hRomFile, m_hRomFileMapping;
|
||||||
void ByteSwapRom ();
|
BYTE * m_ROMImage;
|
||||||
void SetError ( LanguageStringID ErrorMsg );
|
DWORD m_RomFileSize;
|
||||||
static void __stdcall NotificationCB ( LPCWSTR Status, CN64Rom * _this );
|
Country m_Country;
|
||||||
void CalculateCicChip ();
|
CICChip m_CicChip;
|
||||||
void CalculateRomCrc ();
|
LanguageStringID m_ErrorMsg;
|
||||||
|
stdstr m_RomName, m_FileName, m_MD5, m_RomIdent;
|
||||||
|
|
||||||
|
bool AllocateAndLoadN64Image(const char * FileLoc, bool LoadBootCodeOnly);
|
||||||
|
bool AllocateAndLoadZipImage(const char * FileLoc, bool LoadBootCodeOnly);
|
||||||
|
void ByteSwapRom();
|
||||||
|
void SetError(LanguageStringID ErrorMsg);
|
||||||
|
static void __stdcall NotificationCB(LPCWSTR Status, CN64Rom * _this);
|
||||||
|
void CalculateCicChip();
|
||||||
|
void CalculateRomCrc();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CN64Rom();
|
CN64Rom();
|
||||||
~CN64Rom();
|
~CN64Rom();
|
||||||
|
|
||||||
bool LoadN64Image ( const char * FileLoc, bool LoadBootCodeOnly = false );
|
bool LoadN64Image(const char * FileLoc, bool LoadBootCodeOnly = false);
|
||||||
static bool IsValidRomImage( BYTE Test[4] );
|
static bool IsValidRomImage(BYTE Test[4]);
|
||||||
void SaveRomSettingID ( bool temp );
|
void SaveRomSettingID(bool temp);
|
||||||
void ClearRomSettingID ();
|
void ClearRomSettingID();
|
||||||
CICChip CicChipID ();
|
CICChip CicChipID();
|
||||||
BYTE * GetRomAddress () { return m_ROMImage; }
|
BYTE * GetRomAddress() { return m_ROMImage; }
|
||||||
DWORD GetRomSize () const { return m_RomFileSize; }
|
DWORD GetRomSize() const { return m_RomFileSize; }
|
||||||
stdstr GetRomMD5 () const { return m_MD5; }
|
stdstr GetRomMD5() const { return m_MD5; }
|
||||||
stdstr GetRomName () const { return m_RomName; }
|
stdstr GetRomName() const { return m_RomName; }
|
||||||
stdstr GetFileName () const { return m_FileName; }
|
stdstr GetFileName() const { return m_FileName; }
|
||||||
Country GetCountry () const { return m_Country; }
|
Country GetCountry() const { return m_Country; }
|
||||||
void UnallocateRomImage ();
|
void UnallocateRomImage();
|
||||||
|
|
||||||
//Get a message id for the reason that you failed to load the rom
|
//Get a message id for the reason that you failed to load the rom
|
||||||
LanguageStringID GetError () const { return m_ErrorMsg; }
|
LanguageStringID GetError() const { return m_ErrorMsg; }
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue