Dynamically Linked Device Interface for libfat


This page is no longer being maintained. For all the latest DLDI information, drivers and tools visit DLDIWiki.


DLDI Device patches

Device Download Source Author Read/Write Tested? Manufacturer's Website Last Modified
Default (No device)DLDISRCChishm-/--Chishm2007-01-12
DSLink (microSD Card)DLDI---MoonLightR/WYesDSLink2006-12-30
OldSRCRudolph (ported by Lick)R/WFailed2006-12-26
DS-XDLDISRCDS-Xtreme TeamR/WYesDS-X2007-02-12
Ewin2 (SD Card)DLDISRCMoonlightR/WYesEwin flash2006-12-29
EZ Flash 4 (SD Card)DLDISRCRudolph (Original by EZ Team (aladdin))R/WYesEZ Flash2006-12-27
EZ Flash 5 (SD Card) (See note)DLDISRCCory1942R/WYesEZ Flash2007-01-13
G6 Flash (version 0.19)DLDISRCvirusebR/WYesG6 Flash2007-04-12
M3 Adapter (Compact Flash)DLDISRCChishmR/WFailedM3 Adapter2006-12-25
M3 Adapter (SD Card)DLDISRCChishmR/WYesM3 Adapter2006-12-25
Max Media Dock (Compact Flash)DLDISRCChishmR/WYesCode Junkies2007-01-07
GBA Movie Player (Compact Flash)DLDISRCChishmR/WYesMovie Advance2006-12-25
GBA Movie Player (SD Card)DLDISRCMovie AdvanceR/-NoMovie Advance2006-12-25
NEO Flash MK2 & MK3 (SD Card)DLDISRCNEO Flash TeamR/WYesNEO Flash2006-12-25
NEO Flash MK5 (NAND Flash)DLDISRCNEO Flash TeamR/-NoNEO Flash2007-02-07
NEO2 (SD Card)DLDISRCNEO Flash TeamR/WYesNEO Flash2006-12-28
Ninja DS (SD Card)DLDISRCNinjaMod teamR/WYesNinjaDS2006-12-25
Ninjapass X9ZIPPageCJ BellR/-YesNinjapass2006-02-05
R4(DS) - Revolution for DS
M3 Simply compatible
DLDISRCR4DSR/WYesR4 (R4DS) - Revolution for DS2006-12-25
SuperCard (Compact Flash)DLDISRCChishmR/WYesSuperCard2006-12-26
SuperCard DS (Slot-1)DLDISRCSuperCard Team (ported by Lick)R/WYesSuperCard2006-12-25
SuperCard (SD Card)DLDISRCChishmR/WYesSuperCard2006-12-25
SuperCard Lite (SD Card)DLDISRCbrisssouR/WYesSuperCard2007-01-19

Additional Notes

The EZ5 menu won't boot a ROM in homebrew mode unless the gamecode is "PASS". Cory1942 has written a tool to fix the header and patch the ROM at the same time. Get it from his site.

Patching software(dlditool)

Executable TypeDownloadLast ModifiedVersionCreator
SourceCVS2007-01-281.23Chishm / WinterMute
Win32 GUIDownload2007-01-131.23Adam Hodson (bob_fossil) / Maxim
Win32 Right ClickDLDIrcSetup.exe2007-01-310.3PsychoWood
MacOS XDownload2007-01-301.23Jan Kampling
MacOS X DLDI DropWeb page2007-01-301.23Jan Kampling

End User Instructions

First, just try the ROM to see if it works with your flash cart. If it does, then great! If not, you'll need to patch it. You'll need two things, a patcher and the appropriate patch for your flash cart.

Extract the patch and patcher to the same directory as the ROM file. Open a command prompt in that directory. Type in:

dlditool <name_of_patch> <rom_file>
Where <name_of_patch> is the name of the patch file (e.g. "mpcf.dldi") and <rom_file> is the name of the ROM (eg "libfat_tests.nds").

You should see something similar to this:

C:\rom_dir\>dlditool mpcf.dldi libfat_tests.nds
Dynamically Linked Disk Interface patch tool by Michael Chisholm (Chishm)

Old driver:          Default (No interface)
New driver:          GBA Movie Player (Compact Flash)

Position in file:    0x000062C0
Position in memory:  0x02000000
Patch base address:  0xBF800000
Relocation offset:   0x428060C0

Patched successfully

Once you have patched the ROM, copy it to your flash cart and run it.

Testing instructions

Some of the interfaces listed above have not been tested, or may appear to not work for you. If you wish to test an interface, download the DLDI Tester. Extract the contents to the root directory of the card you'll be testing, then patch it for the correct card, following the instructions above. Make sure you backup everything on the card, I accept no responsibilty if anything goes wrong. Follow the onscreen prompts and observe the outcome. Feel free to email me with results for a card that hasn't been tested already, or results contrary to those in the above table.

Developer Instructions

The DLDI IO_INTERFACE is included as part of libfat. It will be included when you use libfat within your project.

If you are still using gba_nds_fat, you can use a backported IO_INTERFACE. Copy it to your gba_nds_fat source directory and add io_dldi as the first driver in the initialization list.

You may wish to add a patching step to your makefile, following the end user instructions.

Device development instructions

  1. A DLDI template is installed as part of DevkitARM r20. Get it using the DevkitPro Updater.
  2. Install the NDS examples as part of DevkitARM.
  3. Copy the dldi directory from <path_to_devkitPro>/examples/nds/templates/.
  4. Rename the dldi folder to the four character code for the driver.
  5. Replace the functions inside source/iointerface.c with ones specific to the device.
  6. Open source/dldi_header.s for editting:
    1. Change the text "Name of driver goes here" to an appropriate description for the device.
    2. Change the text "XXXX" to the four character code for the driver.
    3. In the IO_INTERFACE data section, make sure that either FEATURE_SLOT_GBA or FEATURE_SLOT_NDS is specified, depending on which slot the device goes into.
  7. Compile by running make in the top level directory of the driver.
  8. If you get an error containing the text "overlaps previous sections", the driver is too big to fit in the available space. Since only 32KiB are allocated for DLDI patches, you will need to reduce the size of the driver. Try reducing the size of global arrays or let some card initialisation be done by the device firmware.
  9. Test it out by following the testing instructions.
  10. If it works, distribute it. Feel free to send me an email (address is on the front page) with the interface to add to this page. Please include test results.


The following people either directly or indirectly helped to create the DLDI interface: