[Project64] Flashram to use standard types
This commit is contained in:
parent
1e30be0945
commit
3ba0f072ce
|
@ -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];
|
uint8_t FlipBuffer[0x10000];
|
||||||
uint32_t count;
|
uint32_t count;
|
||||||
|
@ -70,12 +70,12 @@ void CFlashram::DmaFromFlashram(uint8_t * dest, int StartOffset, int len)
|
||||||
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);
|
SetFilePointer(m_hFile, StartOffset, NULL, FILE_BEGIN);
|
||||||
DWORD dwRead;
|
DWORD dwRead;
|
||||||
ReadFile(m_hFile, FlipBuffer, len, &dwRead, NULL);
|
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;
|
FlipBuffer[count] = 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (count = 0; (int)count < len; count += 4)
|
for (count = 0; (int32_t)count < len; count += 4)
|
||||||
{
|
{
|
||||||
register uint32_t eax;
|
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)
|
switch (m_FlashFlag)
|
||||||
{
|
{
|
||||||
|
|
|
@ -27,12 +27,16 @@ public:
|
||||||
CFlashram(bool ReadOnly);
|
CFlashram(bool ReadOnly);
|
||||||
~CFlashram();
|
~CFlashram();
|
||||||
|
|
||||||
void DmaFromFlashram(uint8_t * dest, int StartOffset, int len);
|
void DmaFromFlashram(uint8_t * dest, int32_t StartOffset, int32_t len);
|
||||||
void DmaToFlashram(uint8_t * Source, int StartOffset, int len);
|
void DmaToFlashram(uint8_t * Source, int32_t StartOffset, int32_t len);
|
||||||
uint32_t ReadFromFlashStatus(uint32_t PAddr);
|
uint32_t ReadFromFlashStatus(uint32_t PAddr);
|
||||||
void WriteToFlashCommand(uint32_t Value);
|
void WriteToFlashCommand(uint32_t Value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
CFlashram(void); // Disable default constructor
|
||||||
|
CFlashram(const CFlashram&); // Disable copy constructor
|
||||||
|
CFlashram& operator=(const CFlashram&); // Disable assignment
|
||||||
|
|
||||||
bool LoadFlashram();
|
bool LoadFlashram();
|
||||||
|
|
||||||
uint8_t * m_FlashRamPointer;
|
uint8_t * m_FlashRamPointer;
|
||||||
|
|
Loading…
Reference in New Issue