Question on dmaCopy usage
Posted: Fri Dec 26, 2008 8:15 pm
dmaCopy as defined should be copying half-words, and as I understand it are 16 bit values.
I am working in the SimpleSprite example and added my own sprite array, just an array of 256 unsigned chars (output actually from PAGfx...).
Anyway, it's just a single 16 X 16 sprite named face_Sprite and I've removed gfxSub from the for loop that populates it with 1's and added this instead:
dmaCopy(face_Sprite, gfxSub, 128);
If writing in half-words, this should work, correct? This is, instead, only giving me the top half of the sprite and changing the 128 to 256 works fine... which is what is making it seem to be only writing 8bits at a time.
The same seemed to be true with dmaCopyWords... 64 in the size should have done the trick but that only gives me a quarter of the sprite.
The DMA functions I'm familiar with (PALib versions which are pretty similar) didn't work this way, but it's appearing that it's writing at the size of the source regardless of specifying word size with the function. Is this normal?
I am working in the SimpleSprite example and added my own sprite array, just an array of 256 unsigned chars (output actually from PAGfx...).
Anyway, it's just a single 16 X 16 sprite named face_Sprite and I've removed gfxSub from the for loop that populates it with 1's and added this instead:
dmaCopy(face_Sprite, gfxSub, 128);
If writing in half-words, this should work, correct? This is, instead, only giving me the top half of the sprite and changing the 128 to 256 works fine... which is what is making it seem to be only writing 8bits at a time.
The same seemed to be true with dmaCopyWords... 64 in the size should have done the trick but that only gives me a quarter of the sprite.
The DMA functions I'm familiar with (PALib versions which are pretty similar) didn't work this way, but it's appearing that it's writing at the size of the source regardless of specifying word size with the function. Is this normal?