#136295 - ingramb - Tue Jul 31, 2007 12:55 am
I'm planning something that will require fast transfer of data from the card to RAM. Official games use a file system that is attatched to the card, which can be accessed quickly and asynchroniously by DMA. It seems the normal way to do homebrew is to use DLDI, and read from the FAT file system.
Many slot1 flash cards on the market are able to play commercial games now, so the cards must allow for the fast DMA transfer.
How does the speed of freading data from a file compare to the speed of transfering data from the card via DMA?
#136297 - calcprogrammer1 - Tue Jul 31, 2007 1:23 am
Quote: |
Many slot1 flash cards on the market are able to play commercial games now, so the cards must allow for the fast DMA transfer. |
There's your problem...you're making a big assumption that may or may not be true. Many people use Max Media Dock, GBA Movie Player, Games n' Music, GBA Flashcarts, etc, and they don't support commercial games or any functions related to it.
The best way for file access for homebrew is DLDI, because of it's flat-out compatibility. If you decide to use DMA, you'll cut the userbase of your application to only R4, M3, and SuperCard users (and whatever other cards support this).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF
There's no place like 127.0.0.1.
#136298 - ingramb - Tue Jul 31, 2007 1:37 am
>Many people use Max Media Dock, GBA Movie Player, Games n' Music, GBA Flashcarts, etc, and they don't support commercial games or any functions related to it.
Yeah, I know. But if DLDI is too slow, and DMA is fast enough, I'd rather make an app that I can use, and that some other people can use, rather than make nothing at all.
If the speed of DLDI is fast enough compared to DMA, I will certainly use that.
#136301 - calcprogrammer1 - Tue Jul 31, 2007 2:14 am
Speed is relative to device. It'd probably be slightly faster directly accessing the card, but there will be a bigger difference between devices. I have a Games n' Music and a GBA Movie Player CF. I can play Moonshell DPG videos at very good quality with no card lag, as the GBAMP's hardware is fast enough to provide a good stream of data, but the Games n' Music has a much slower reading/writing hardware, and Moonshell videos often pause as it reads more data from the card into RAM buffers, my friend has the DS RAM pack from the browser, and Moonshell uses this, but it still lags as it fills the RAM up with data. Speed is probably more of a device-to-device issue than a method issue, but you may experience faster reading with direct access, but you may not (seeing that the CPU is probably going to be able to run either method much faster than any card will allow data access).
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF
There's no place like 127.0.0.1.
#136361 - masscat - Tue Jul 31, 2007 9:45 pm
A test program I put together reads (using fread) a 2MiB file 1KiB at a time and counts the number of VBlanks.
GBAMP reads for 87 VBlanks (1.4 MiB/s).
R4 reads for 47 VBlanks (2.6 MiB/s).
This will/may vary depending on the flash card.
#136376 - ingramb - Wed Aug 01, 2007 1:25 am
Thanks. That's exactly the kind of information I was looking for.