gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > DMA Speed boost.

#97481 - omaremad - Thu Aug 10, 2006 2:39 am

memcpy(m_pWater2, m_pWater1, m_iWidth*m_iHeight*sizeof(float));
memcpy(m_pWater1, m_pWater, m_iWidth*m_iHeight*sizeof(float));
memset(m_pWater, 0, m_iWidth*m_iHeight*sizeof(float));

ok here is a bit of pc code i would like to optimise using the DMA

I used dmacopy but the values dont get copied and stay 0.

Do i need to setup other registers before the copy.

#97500 - tepples - Thu Aug 10, 2006 4:44 am

The DS's DMA controller cannot see the region of memory where the standard link script puts the stack. In the function that calls dmaCopy(), try making your source variable a 'static' local variable and seeing if that helps.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.