From 6a9f8e766c10be4d4350a063ee185b22e8ca4dfc Mon Sep 17 00:00:00 2001 From: bushing Date: Mon, 29 Dec 2008 02:15:38 +0000 Subject: [PATCH] add support for EXI_READWRITE (only used by USBGecko code) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1712 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/EXI_Channel.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/HW/EXI_Channel.cpp b/Source/Core/Core/Src/HW/EXI_Channel.cpp index 859f32864a..875a795080 100644 --- a/Source/Core/Core/Src/HW/EXI_Channel.cpp +++ b/Source/Core/Core/Src/HW/EXI_Channel.cpp @@ -18,6 +18,11 @@ #include "EXI_Channel.h" #include "EXI.h" +#define EXI_READ 0 +#define EXI_WRITE 1 +#define EXI_READWRITE 2 + + #include "PeripheralInterface.h" #include "../PowerPC/PowerPC.h" @@ -250,8 +255,14 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) // immediate data switch (m_Control.RW) { - case 0: m_ImmData = pDevice->ImmRead(m_Control.TLEN + 1); break; - case 1: pDevice->ImmWrite(m_ImmData, m_Control.TLEN + 1); break; + case EXI_READ: m_ImmData = pDevice->ImmRead(m_Control.TLEN + 1); break; + case EXI_WRITE: pDevice->ImmWrite(m_ImmData, m_Control.TLEN + 1); break; + case EXI_READWRITE: +/* Only used by USBGecko? + pDevice->ImmWrite(m_ImmData, m_Control.TLEN + 1); + m_ImmData = pDevice->ImmRead(m_Control.TLEN + 1); */ + break; + default: _dbg_assert_msg_(EXPANSIONINTERFACE,0,"EXI Imm: Unknown transfer type %i", m_Control.RW); } m_Control.TSTART = 0; @@ -261,8 +272,8 @@ void CEXIChannel::Write32(const u32 _iValue, const u32 _iRegister) // DMA switch (m_Control.RW) { - case 0: pDevice->DMARead (m_DMAMemoryAddress, m_DMALength); break; - case 1: pDevice->DMAWrite(m_DMAMemoryAddress, m_DMALength); break; + case EXI_READ: pDevice->DMARead (m_DMAMemoryAddress, m_DMALength); break; + case EXI_WRITE: pDevice->DMAWrite(m_DMAMemoryAddress, m_DMALength); break; default: _dbg_assert_msg_(EXPANSIONINTERFACE,0,"EXI DMA: Unknown transfer type %i", m_Control.RW); } m_Control.TSTART = 0;