Update pointer types in memmap.cpp to match dolphin style guide.

This commit is contained in:
Scott Mansell 2014-10-28 23:54:37 +13:00
parent 64b09582c6
commit 125cd92c3c
2 changed files with 27 additions and 27 deletions

View File

@ -65,23 +65,23 @@ static bool m_IsInitialized = false; // Save the Init(), Shutdown() state
// 64-bit: Pointers to low-mem (sub-0x10000000) mirror // 64-bit: Pointers to low-mem (sub-0x10000000) mirror
// 32-bit: Same as the corresponding physical/virtual pointers. // 32-bit: Same as the corresponding physical/virtual pointers.
u8 *m_pRAM; u8* m_pRAM;
u8 *m_pL1Cache; u8* m_pL1Cache;
u8 *m_pEXRAM; u8* m_pEXRAM;
u8 *m_pFakeVMEM; u8* m_pFakeVMEM;
//u8 *m_pEFB; //u8* m_pEFB;
// 64-bit: Pointers to high-mem mirrors // 64-bit: Pointers to high-mem mirrors
// 32-bit: Same as above // 32-bit: Same as above
static u8 *m_pPhysicalRAM; static u8* m_pPhysicalRAM;
static u8 *m_pVirtualCachedRAM; static u8* m_pVirtualCachedRAM;
static u8 *m_pVirtualUncachedRAM; static u8* m_pVirtualUncachedRAM;
static u8 *m_pPhysicalEXRAM; // wii only static u8* m_pPhysicalEXRAM; // wii only
static u8 *m_pVirtualCachedEXRAM; // wii only static u8* m_pVirtualCachedEXRAM; // wii only
static u8 *m_pVirtualUncachedEXRAM; // wii only static u8* m_pVirtualUncachedEXRAM; // wii only
//u8 *m_pVirtualEFB; //u8* m_pVirtualEFB;
static u8 *m_pVirtualL1Cache; static u8* m_pVirtualL1Cache;
u8 *m_pVirtualFakeVMEM; u8* m_pVirtualFakeVMEM;
// MMIO mapping object. // MMIO mapping object.
MMIO::Mapping* mmio_mapping; MMIO::Mapping* mmio_mapping;
@ -231,7 +231,7 @@ void CopyToEmu(u32 address, const void* data, size_t size)
void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength) void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength)
{ {
u8 *ptr = GetPointer(_Address); u8* ptr = GetPointer(_Address);
if (ptr != nullptr) if (ptr != nullptr)
{ {
memset(ptr,_iValue,_iLength); memset(ptr,_iValue,_iLength);
@ -245,7 +245,7 @@ void Memset(const u32 _Address, const u8 _iValue, const u32 _iLength)
void ClearCacheLine(const u32 _Address) void ClearCacheLine(const u32 _Address)
{ {
u8 *ptr = GetPointer(_Address); u8* ptr = GetPointer(_Address);
if (ptr != nullptr) if (ptr != nullptr)
{ {
memset(ptr, 0, 32); memset(ptr, 0, 32);
@ -259,8 +259,8 @@ void ClearCacheLine(const u32 _Address)
void DMA_LCToMemory(const u32 _MemAddr, const u32 _CacheAddr, const u32 _iNumBlocks) void DMA_LCToMemory(const u32 _MemAddr, const u32 _CacheAddr, const u32 _iNumBlocks)
{ {
const u8 *src = m_pL1Cache + (_CacheAddr & 0x3FFFF); const u8* src = m_pL1Cache + (_CacheAddr & 0x3FFFF);
u8 *dst = GetPointer(_MemAddr); u8* dst = GetPointer(_MemAddr);
if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0) if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0)
{ {
@ -278,8 +278,8 @@ void DMA_LCToMemory(const u32 _MemAddr, const u32 _CacheAddr, const u32 _iNumBlo
void DMA_MemoryToLC(const u32 _CacheAddr, const u32 _MemAddr, const u32 _iNumBlocks) void DMA_MemoryToLC(const u32 _CacheAddr, const u32 _MemAddr, const u32 _iNumBlocks)
{ {
const u8 *src = GetPointer(_MemAddr); const u8* src = GetPointer(_MemAddr);
u8 *dst = m_pL1Cache + (_CacheAddr & 0x3FFFF); u8* dst = m_pL1Cache + (_CacheAddr & 0x3FFFF);
if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0) if ((dst != nullptr) && (src != nullptr) && (_MemAddr & 3) == 0 && (_CacheAddr & 3) == 0)
{ {
@ -312,7 +312,7 @@ std::string GetString(u32 em_address, size_t size)
// GetPointer must always return an address in the bottom 32 bits of address space, so that 64-bit // GetPointer must always return an address in the bottom 32 bits of address space, so that 64-bit
// programs don't have problems directly addressing any part of memory. // programs don't have problems directly addressing any part of memory.
// TODO re-think with respect to other BAT setups... // TODO re-think with respect to other BAT setups...
u8 *GetPointer(const u32 _Address) u8* GetPointer(const u32 _Address)
{ {
switch (_Address >> 28) switch (_Address >> 28)
{ {

View File

@ -27,14 +27,14 @@ namespace Memory
// In 64-bit, this might point to "high memory" (above the 32-bit limit), // In 64-bit, this might point to "high memory" (above the 32-bit limit),
// so be sure to load it into a 64-bit register. // so be sure to load it into a 64-bit register.
extern u8 *base; extern u8* base;
// These are guaranteed to point to "low memory" addresses (sub-32-bit). // These are guaranteed to point to "low memory" addresses (sub-32-bit).
extern u8 *m_pRAM; extern u8* m_pRAM;
extern u8 *m_pEXRAM; extern u8* m_pEXRAM;
extern u8 *m_pL1Cache; extern u8* m_pL1Cache;
extern u8 *m_pVirtualFakeVMEM; extern u8* m_pVirtualFakeVMEM;
extern u8 *m_pFakeVMEM; extern u8* m_pFakeVMEM;
extern bool bFakeVMEM; extern bool bFakeVMEM;
enum enum