EXI_Device: Amend variable naming

This commit is contained in:
Lioncash 2017-01-22 04:06:51 -05:00
parent 4115d93c71
commit e41a6ac9a3
4 changed files with 35 additions and 37 deletions

View File

@ -231,10 +231,10 @@ void CEXIChannel::DoState(PointerWrap& p)
for (int device_index = 0; device_index < NUM_DEVICES; ++device_index)
{
std::unique_ptr<IEXIDevice>& device = m_devices[device_index];
TEXIDevices type = device->m_deviceType;
TEXIDevices type = device->m_device_type;
p.Do(type);
if (type == device->m_deviceType)
if (type == device->m_device_type)
{
device->DoState(p);
}

View File

@ -17,47 +17,45 @@
#include "Core/HW/EXI/EXI_DeviceMic.h"
#include "Core/HW/Memmap.h"
void IEXIDevice::ImmWrite(u32 _uData, u32 _uSize)
void IEXIDevice::ImmWrite(u32 data, u32 size)
{
while (_uSize--)
while (size--)
{
u8 uByte = _uData >> 24;
TransferByte(uByte);
_uData <<= 8;
u8 byte = data >> 24;
TransferByte(byte);
data <<= 8;
}
}
u32 IEXIDevice::ImmRead(u32 _uSize)
u32 IEXIDevice::ImmRead(u32 size)
{
u32 uResult = 0;
u32 uPosition = 0;
while (_uSize--)
u32 result = 0;
u32 position = 0;
while (size--)
{
u8 uByte = 0;
TransferByte(uByte);
uResult |= uByte << (24 - (uPosition++ * 8));
u8 byte = 0;
TransferByte(byte);
result |= byte << (24 - (position++ * 8));
}
return uResult;
return result;
}
void IEXIDevice::DMAWrite(u32 _uAddr, u32 _uSize)
void IEXIDevice::DMAWrite(u32 address, u32 size)
{
// _dbg_assert_(EXPANSIONINTERFACE, 0);
while (_uSize--)
while (size--)
{
u8 uByte = Memory::Read_U8(_uAddr++);
TransferByte(uByte);
u8 byte = Memory::Read_U8(address++);
TransferByte(byte);
}
}
void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize)
void IEXIDevice::DMARead(u32 address, u32 size)
{
// _dbg_assert_(EXPANSIONINTERFACE, 0);
while (_uSize--)
while (size--)
{
u8 uByte = 0;
TransferByte(uByte);
Memory::Write_U8(uByte, _uAddr++);
u8 byte = 0;
TransferByte(byte);
Memory::Write_U8(byte, address++);
}
}
@ -111,7 +109,7 @@ std::unique_ptr<IEXIDevice> EXIDevice_Create(TEXIDevices device_type, const int
}
if (result != nullptr)
result->m_deviceType = device_type;
result->m_device_type = device_type;
return result;
}

View File

@ -34,21 +34,21 @@ public:
virtual ~IEXIDevice() = default;
// Immediate copy functions
virtual void ImmWrite(u32 _uData, u32 _uSize);
virtual u32 ImmRead(u32 _uSize);
virtual void ImmReadWrite(u32& /*_uData*/, u32 /*_uSize*/) {}
virtual void ImmWrite(u32 data, u32 size);
virtual u32 ImmRead(u32 size);
virtual void ImmReadWrite(u32& /*data*/, u32 /*size*/) {}
// DMA copy functions
virtual void DMAWrite(u32 _uAddr, u32 _uSize);
virtual void DMARead(u32 _uAddr, u32 _uSize);
virtual void DMAWrite(u32 address, u32 size);
virtual void DMARead(u32 address, u32 size);
virtual bool UseDelayedTransferCompletion() const { return false; }
virtual bool IsPresent() const { return false; }
virtual void SetCS(int) {}
virtual void DoState(PointerWrap&) {}
virtual void PauseAndLock(bool doLock, bool unpauseOnUnlock = true) {}
virtual IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex = -1)
virtual void PauseAndLock(bool do_lock, bool resume_on_unlock = true) {}
virtual IEXIDevice* FindDevice(TEXIDevices device_type, int custom_index = -1)
{
return (device_type == m_deviceType) ? this : nullptr;
return (device_type == m_device_type) ? this : nullptr;
}
// Is generating interrupt ?
@ -56,7 +56,7 @@ public:
// for savestates. storing it here seemed cleaner than requiring each implementation to report its
// type.
// I know this class is set up like an interface, but no code requires it to be strictly such.
TEXIDevices m_deviceType;
TEXIDevices m_device_type;
private:
// Byte transfer function for this device

View File

@ -488,7 +488,7 @@ void CEXIMemoryCard::DoState(PointerWrap& p)
IEXIDevice* CEXIMemoryCard::FindDevice(TEXIDevices device_type, int customIndex)
{
if (device_type != m_deviceType)
if (device_type != m_device_type)
return nullptr;
if (customIndex != card_index)
return nullptr;