#1380 - bomberman - Fri Jan 17, 2003 12:37 pm
Hi there,
small question about the 16/32 bits mode to choose for a DMA transfer.
Does it depend only on the size you want to transfer (32 bits for 0x1000 bytes, 16 bits for 0x1002 bytes) or are there some more subtil differences involved in this?
Thanks
#1385 - Splam - Fri Jan 17, 2003 2:11 pm
Pretty much based on how much you want to copy. Only thing I can think of that NEEDS to be 32bit is the sound FIFO transfers.
#5468 - bomberman - Mon Apr 28, 2003 11:09 pm
Effectively, it seems to be faster. To transfer 24Ko it took 20 raster lines in 16 bits mode and 15 in 32 bits mode. I did not try with other sizes of transfer but in that case it is 25% faster which is not negligeable !
However there is a subtil difference between these two modes. I used it to display a bitmap in tile mode (before it was a simple for(;;) ).
My tile data are declared as unsigned char and using 16 bits mode worked fine whereas in 32 bits mode my picture was altered.
What happened is as this is an array of char and not long, it was aligned on a multiple of 2 bytes and not 4. So my transfer was shifted.
If you want to use 32 bits mode, be sure your adresses are aligned with 4 bytes !