[Project64] Flashram to use standard types

This commit is contained in:
zilmar 2016-01-05 07:34:16 +11:00
parent 1e30be0945
commit 3ba0f072ce
2 changed files with 10 additions and 6 deletions

View File

@ -34,7 +34,7 @@ CFlashram::~CFlashram()
}
}
void CFlashram::DmaFromFlashram(uint8_t * dest, int StartOffset, int len)
void CFlashram::DmaFromFlashram(uint8_t * dest, int32_t StartOffset, int32_t len)
{
uint8_t FlipBuffer[0x10000];
uint32_t count;
@ -70,12 +70,12 @@ void CFlashram::DmaFromFlashram(uint8_t * dest, int StartOffset, int len)
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);
DWORD dwRead;
ReadFile(m_hFile, FlipBuffer, len, &dwRead, NULL);
for (count = dwRead; (int)count < len; count++)
for (count = dwRead; (int32_t)count < len; count++)
{
FlipBuffer[count] = 0xFF;
}
for (count = 0; (int)count < len; count += 4)
for (count = 0; (int32_t)count < len; count += 4)
{
register uint32_t eax;
@ -103,7 +103,7 @@ void CFlashram::DmaFromFlashram(uint8_t * dest, int StartOffset, int len)
}
}
void CFlashram::DmaToFlashram(uint8_t * Source, int StartOffset, int len)
void CFlashram::DmaToFlashram(uint8_t * Source, int32_t StartOffset, int32_t len)
{
switch (m_FlashFlag)
{

View File

@ -27,12 +27,16 @@ public:
CFlashram(bool ReadOnly);
~CFlashram();
void DmaFromFlashram(uint8_t * dest, int StartOffset, int len);
void DmaToFlashram(uint8_t * Source, int StartOffset, int len);
void DmaFromFlashram(uint8_t * dest, int32_t StartOffset, int32_t len);
void DmaToFlashram(uint8_t * Source, int32_t StartOffset, int32_t len);
uint32_t ReadFromFlashStatus(uint32_t PAddr);
void WriteToFlashCommand(uint32_t Value);
private:
CFlashram(void); // Disable default constructor
CFlashram(const CFlashram&); // Disable copy constructor
CFlashram& operator=(const CFlashram&); // Disable assignment
bool LoadFlashram();
uint8_t * m_FlashRamPointer;