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+DTCM

#69216 - bananaboy - Sun Jan 29, 2006 10:10 am

Are there any known problems with DMAing data from DTCM to VRAM? Or is it just not allowed? I'm trying to DMA a buffer from an array that I have stored in DTCM to my BG but nothing appears on screen. If I stick the array in EWRAM instead it works. My array is aligned to 4 bytes and I'm doing a word copy using dmaCopyWords (do pointers have to be aligned for DMA? I haven't found any concrete text on it yet, only a few postings here and there).

sam

#69223 - chishm - Sun Jan 29, 2006 11:57 am

IIRC, DTCM and ITCM cannot be accessed by DMA. They are memory internal to the CPU, which the DMA controller cannot access. Also, I am pretty sure that DMA source and destination addresses have to be word aligned (or half word aligned), depending on which mode you use.

EDIT: Added bit about halfword aligned when using 16 bit DMA.
_________________
http://chishm.drunkencoders.com
http://dldi.drunkencoders.com


Last edited by chishm on Sun Jan 29, 2006 2:36 pm; edited 1 time in total

#69230 - bananaboy - Sun Jan 29, 2006 1:32 pm

Cheers for the reply! Thinking about it, that all actually makes perfect sense!

#69274 - HyperHacker - Sun Jan 29, 2006 7:00 pm

What happens if you use an unaligned address, does it just correct it? That may explain some problems I tend to have with DMA.

#69286 - wintermute - Sun Jan 29, 2006 8:15 pm

HyperHacker wrote:
What happens if you use an unaligned address, does it just correct it? That may explain some problems I tend to have with DMA.


yes