mirror of
https://github.com/libretro/Play-.git
synced 2024-12-13 11:35:30 +00:00
Send direction parameter to DMAC receive function.
This commit is contained in:
parent
310d45ffc7
commit
002ca4659c
@ -164,7 +164,7 @@ void CChannel::ExecuteNormal()
|
||||
qwc = std::min<int32>(m_nQWC, (ringBufferSize - ringBufferAddr) / 0x10);
|
||||
}
|
||||
|
||||
uint32 nRecv = m_receive(m_nMADR, qwc, 0, false);
|
||||
uint32 nRecv = m_receive(m_nMADR, qwc, m_CHCR.nDIR, false);
|
||||
|
||||
m_nMADR += nRecv * 0x10;
|
||||
m_nQWC -= nRecv;
|
||||
@ -193,7 +193,7 @@ void CChannel::ExecuteInterleave()
|
||||
//Transfer
|
||||
{
|
||||
uint32 qwc = m_dmac.m_D_SQWC.tqwc;
|
||||
uint32 recv = m_receive(m_nMADR, qwc, 0, false);
|
||||
uint32 recv = m_receive(m_nMADR, qwc, CHCR_DIR_FROM, false);
|
||||
assert(recv == qwc);
|
||||
|
||||
m_nMADR += recv * 0x10;
|
||||
@ -216,7 +216,7 @@ void CChannel::ExecuteSourceChain()
|
||||
//Execute current
|
||||
if(m_nQWC != 0)
|
||||
{
|
||||
uint32 nRecv = m_receive(m_nMADR, m_nQWC, 0, false);
|
||||
uint32 nRecv = m_receive(m_nMADR, m_nQWC, CHCR_DIR_FROM, false);
|
||||
|
||||
m_nMADR += nRecv * 0x10;
|
||||
m_nQWC -= nRecv;
|
||||
@ -245,7 +245,7 @@ void CChannel::ExecuteSourceChain()
|
||||
{
|
||||
assert(m_CHCR.nTTE);
|
||||
m_CHCR.nReserved0 = 0;
|
||||
if(m_receive(m_nTADR, 1, 0, true) != 1)
|
||||
if(m_receive(m_nTADR, 1, CHCR_DIR_FROM, true) != 1)
|
||||
{
|
||||
//Device didn't receive DmaTag, break for now
|
||||
m_CHCR.nReserved0 = 1;
|
||||
@ -288,7 +288,7 @@ void CChannel::ExecuteSourceChain()
|
||||
if(m_CHCR.nTTE == 1)
|
||||
{
|
||||
m_CHCR.nReserved0 = 0;
|
||||
if(m_receive(m_nTADR, 1, 0, true) != 1)
|
||||
if(m_receive(m_nTADR, 1, CHCR_DIR_FROM, true) != 1)
|
||||
{
|
||||
//Device didn't receive DmaTag, break for now
|
||||
m_CHCR.nReserved0 = 1;
|
||||
@ -387,7 +387,7 @@ void CChannel::ExecuteSourceChain()
|
||||
|
||||
if(qwc != 0)
|
||||
{
|
||||
uint32 nRecv = m_receive(m_nMADR, qwc, 0, false);
|
||||
uint32 nRecv = m_receive(m_nMADR, qwc, CHCR_DIR_FROM, false);
|
||||
|
||||
m_nMADR += nRecv * 0x10;
|
||||
m_nQWC -= nRecv;
|
||||
|
@ -27,6 +27,12 @@ namespace Dmac
|
||||
DMATAG_END
|
||||
};
|
||||
|
||||
enum CHCR_DIR
|
||||
{
|
||||
CHCR_DIR_TO = 0,
|
||||
CHCR_DIR_FROM = 1,
|
||||
};
|
||||
|
||||
struct CHCR : public convertible<uint32>
|
||||
{
|
||||
unsigned int nDIR : 1;
|
||||
|
Loading…
Reference in New Issue
Block a user