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 > Read from FAT using ARM7?

#166846 - Echo49 - Fri Feb 20, 2009 11:57 am

Is it possible? I have a fairly slow SD card (using SCSD) and it's tying up my ARM9 :/

I'm reading a raw audio file with sampling rate 22050Hz. I can't read much more than 5000 bytes per read (~4 reads per second) or I miss the vblank and fall a frame behind with my graphics. I can't read too little either because the read itself has a lower limit for speed.

I do know that my graphics engine (2D over 3D) is probably not as efficient as it should be, but if I could just off the load to the ARM7 it'd be really nice.

#166847 - hacker013 - Fri Feb 20, 2009 1:51 pm

libfat works with arm7 but libfat is to big to fit in it so you have to downgrade then to GBA_NDS_FAT
_________________
Website / Blog

Let the nds be with you.

#166848 - elhobbs - Fri Feb 20, 2009 3:56 pm

I do not believe that all dldi drivers work from arm7. In any case I would say this will probably not be the best solution particulary for a sound app as the arm7 is in charge of sound. tying it up with disk reads is probably going to cause all sorts of sound glitches - I guess you wont find out till you try though.

5000 bytes? isn't that enough data to last for 6 frames?

#166858 - Echo49 - Fri Feb 20, 2009 11:11 pm

I have temporarily solved this by moving my game clock (vblank counter) to the arm7 and fifo'ing that data instead.