BY: ironchimp DATE: 2004-Aug-26 03:26 SUBJECT: vu1 buffer problemsHi,
I'm writing a double buffered vu1 program and i'm having problems using more than one buffer per frame. The first buffer-worth of data that i send turns out beautifully. however, when i stitch more than one buffer together in sps2 memory for sending, only the first buffer gets drawn, and the rest of the data jsut gets lost.
The double buffer is set up fine ( i assume). this is done at the program init by a DMA transfer of 1QW containing the bouble buffer settings, then a memcpy after the transfer to move the program into vu1's micro memory.
Like i mentioned, one buffer-worth of data works wonders. the data for one buffer gets arranged in sps2 memory as shown below
----- visual aid -----
this may be hard to read, but i was never good at ascii art
128 0
| DMA_CNT_TAG |
| VIF_UNPACK_TO_TOP(253QW, to address 0) , VIF_NOP, VIF_NOP, VIF_NOP |
| ***** about 253 QW of data ***** |
| DMA_NEXT_TAG |
| DMA_CNT_TAG |
| VIF_UNPACK_TO_TOP(remainingQW, to address 253) , VIF_NOP, VIF_NOP, VIF_NOP |
| ***** remaing QW ( up to 252) ***** |
| VIF_MSCALL(0), VIF_FLUSH, VIF_NOP, VIF_NOP |
| DMA_TAG_END |
(for those who have looked as hsfortuna's tutorials, then this stitching process will look v e r y similar.....)
----- end visual aid -----
now when i stitch two or more of these blocks together, the program still runs smoothly, however only the first 8k chunk of data gets drawn. the dma transfer does not crash so i'm assuming it gets transfred.
i am aware that anything more than 16k of data may get lost if it gets sent while the first 8k of data is still running, however the first two packets at least should get drawn. shouldn;t it?
if this doesn;t make sense to anybody, let me know and i'll try and clarify :)
|