EXI_Device: Amend variable naming
This commit is contained in:
parent
4115d93c71
commit
e41a6ac9a3
|
@ -231,10 +231,10 @@ void CEXIChannel::DoState(PointerWrap& p)
|
||||||
for (int device_index = 0; device_index < NUM_DEVICES; ++device_index)
|
for (int device_index = 0; device_index < NUM_DEVICES; ++device_index)
|
||||||
{
|
{
|
||||||
std::unique_ptr<IEXIDevice>& device = m_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);
|
p.Do(type);
|
||||||
|
|
||||||
if (type == device->m_deviceType)
|
if (type == device->m_device_type)
|
||||||
{
|
{
|
||||||
device->DoState(p);
|
device->DoState(p);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,47 +17,45 @@
|
||||||
#include "Core/HW/EXI/EXI_DeviceMic.h"
|
#include "Core/HW/EXI/EXI_DeviceMic.h"
|
||||||
#include "Core/HW/Memmap.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;
|
u8 byte = data >> 24;
|
||||||
TransferByte(uByte);
|
TransferByte(byte);
|
||||||
_uData <<= 8;
|
data <<= 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 IEXIDevice::ImmRead(u32 _uSize)
|
u32 IEXIDevice::ImmRead(u32 size)
|
||||||
{
|
{
|
||||||
u32 uResult = 0;
|
u32 result = 0;
|
||||||
u32 uPosition = 0;
|
u32 position = 0;
|
||||||
while (_uSize--)
|
while (size--)
|
||||||
{
|
{
|
||||||
u8 uByte = 0;
|
u8 byte = 0;
|
||||||
TransferByte(uByte);
|
TransferByte(byte);
|
||||||
uResult |= uByte << (24 - (uPosition++ * 8));
|
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 (size--)
|
||||||
while (_uSize--)
|
|
||||||
{
|
{
|
||||||
u8 uByte = Memory::Read_U8(_uAddr++);
|
u8 byte = Memory::Read_U8(address++);
|
||||||
TransferByte(uByte);
|
TransferByte(byte);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IEXIDevice::DMARead(u32 _uAddr, u32 _uSize)
|
void IEXIDevice::DMARead(u32 address, u32 size)
|
||||||
{
|
{
|
||||||
// _dbg_assert_(EXPANSIONINTERFACE, 0);
|
while (size--)
|
||||||
while (_uSize--)
|
|
||||||
{
|
{
|
||||||
u8 uByte = 0;
|
u8 byte = 0;
|
||||||
TransferByte(uByte);
|
TransferByte(byte);
|
||||||
Memory::Write_U8(uByte, _uAddr++);
|
Memory::Write_U8(byte, address++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +109,7 @@ std::unique_ptr<IEXIDevice> EXIDevice_Create(TEXIDevices device_type, const int
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result != nullptr)
|
if (result != nullptr)
|
||||||
result->m_deviceType = device_type;
|
result->m_device_type = device_type;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,21 +34,21 @@ public:
|
||||||
virtual ~IEXIDevice() = default;
|
virtual ~IEXIDevice() = default;
|
||||||
|
|
||||||
// Immediate copy functions
|
// Immediate copy functions
|
||||||
virtual void ImmWrite(u32 _uData, u32 _uSize);
|
virtual void ImmWrite(u32 data, u32 size);
|
||||||
virtual u32 ImmRead(u32 _uSize);
|
virtual u32 ImmRead(u32 size);
|
||||||
virtual void ImmReadWrite(u32& /*_uData*/, u32 /*_uSize*/) {}
|
virtual void ImmReadWrite(u32& /*data*/, u32 /*size*/) {}
|
||||||
// DMA copy functions
|
// DMA copy functions
|
||||||
virtual void DMAWrite(u32 _uAddr, u32 _uSize);
|
virtual void DMAWrite(u32 address, u32 size);
|
||||||
virtual void DMARead(u32 _uAddr, u32 _uSize);
|
virtual void DMARead(u32 address, u32 size);
|
||||||
|
|
||||||
virtual bool UseDelayedTransferCompletion() const { return false; }
|
virtual bool UseDelayedTransferCompletion() const { return false; }
|
||||||
virtual bool IsPresent() const { return false; }
|
virtual bool IsPresent() const { return false; }
|
||||||
virtual void SetCS(int) {}
|
virtual void SetCS(int) {}
|
||||||
virtual void DoState(PointerWrap&) {}
|
virtual void DoState(PointerWrap&) {}
|
||||||
virtual void PauseAndLock(bool doLock, bool unpauseOnUnlock = true) {}
|
virtual void PauseAndLock(bool do_lock, bool resume_on_unlock = true) {}
|
||||||
virtual IEXIDevice* FindDevice(TEXIDevices device_type, int customIndex = -1)
|
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 ?
|
// Is generating interrupt ?
|
||||||
|
@ -56,7 +56,7 @@ public:
|
||||||
// for savestates. storing it here seemed cleaner than requiring each implementation to report its
|
// for savestates. storing it here seemed cleaner than requiring each implementation to report its
|
||||||
// type.
|
// type.
|
||||||
// I know this class is set up like an interface, but no code requires it to be strictly such.
|
// 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:
|
private:
|
||||||
// Byte transfer function for this device
|
// Byte transfer function for this device
|
||||||
|
|
|
@ -488,7 +488,7 @@ void CEXIMemoryCard::DoState(PointerWrap& p)
|
||||||
|
|
||||||
IEXIDevice* CEXIMemoryCard::FindDevice(TEXIDevices device_type, int customIndex)
|
IEXIDevice* CEXIMemoryCard::FindDevice(TEXIDevices device_type, int customIndex)
|
||||||
{
|
{
|
||||||
if (device_type != m_deviceType)
|
if (device_type != m_device_type)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (customIndex != card_index)
|
if (customIndex != card_index)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in New Issue