#40056 - Darkain - Thu Apr 14, 2005 8:19 pm
ARM9 DMA. Async? Guess not. :(
the first test was to check to see if the two channels would be active at the same time. i tried both a logical AND and a logical OR operation on testing, and it always returned 0. The second test is to see if the CPU was even active during a DMA transfer, which apparently it isnt, sadly :(
Next, onwards to ARM7 DMA testing!! I modified the ARM7 boot loader to use DMA isntead of copying bytes manually in code. dayum, is it much faster to boot now! :D
As we can see from this series of tests, it appears that the ARM7 still has DMA access restrictions much like it did on the GBA. For more info on the DMA as it was on GBA, check this out: http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#DMA%20Source%20Registers
After the ARM7 test, i went back and did the ARM9 test again with all 4 DMA channels. they all worked, and produced the same result. so, from what i can tell so far, there isnt the same restrictions on the ARM9 DMA transfers as there is on the ARM7.
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS
Code: |
int i = 0;
dmaCopyWordsAsynch(2, DarkStar2_Map, &BG_GFX[20480], 90112); dmaCopyWordsAsynch(3, DarkStar2_Map, &BG_GFX_SUB[20480], 90112); while ( dmaBusy(2) & dmaBusy(3) ) { i++; } char str[32]; itoa(i, str); printTitle(str); outputs 0 |
Code: |
int i = 0;
dmaCopyWordsAsynch(3, DarkStar2_Map, &BG_GFX_SUB[20480], 90112); while (dmaBusy(3)) i++; char str[32]; itoa(i, str); printTitle(str); outputs 0 |
the first test was to check to see if the two channels would be active at the same time. i tried both a logical AND and a logical OR operation on testing, and it always returned 0. The second test is to see if the CPU was even active during a DMA transfer, which apparently it isnt, sadly :(
Next, onwards to ARM7 DMA testing!! I modified the ARM7 boot loader to use DMA isntead of copying bytes manually in code. dayum, is it much faster to boot now! :D
Code: |
dmaCopyWords(0, GETRAW(arm9_bin), (void*)0x02004000, GETRAWSIZE(arm9_bin));
dmaCopyWords(0, GETRAW(arm7_bin), (void*)0x02380000, GETRAWSIZE(arm7_bin)); FAILS!! dmaCopyWords(1, GETRAW(arm9_bin), (void*)0x02004000, GETRAWSIZE(arm9_bin)); dmaCopyWords(1, GETRAW(arm7_bin), (void*)0x02380000, GETRAWSIZE(arm7_bin)); FAILS!! dmaCopyWords(2, GETRAW(arm9_bin), (void*)0x02004000, GETRAWSIZE(arm9_bin)); dmaCopyWords(2, GETRAW(arm7_bin), (void*)0x02380000, GETRAWSIZE(arm7_bin)); FAILS!! dmaCopyWords(3, GETRAW(arm9_bin), (void*)0x02004000, GETRAWSIZE(arm9_bin)); dmaCopyWords(3, GETRAW(arm7_bin), (void*)0x02380000, GETRAWSIZE(arm7_bin)); WORKS!! |
As we can see from this series of tests, it appears that the ARM7 still has DMA access restrictions much like it did on the GBA. For more info on the DMA as it was on GBA, check this out: http://www.cs.rit.edu/~tjh8300/CowBite/CowBiteSpec.htm#DMA%20Source%20Registers
After the ARM7 test, i went back and did the ARM9 test again with all 4 DMA channels. they all worked, and produced the same result. so, from what i can tell so far, there isnt the same restrictions on the ARM9 DMA transfers as there is on the ARM7.
_________________
-=- Darkain Dragoon -=-
http://www.darkain.com
DarkStar for Nintendo DS