Jump to content

Complete Guide to DLDI


Mooney

Recommended Posts

v1.5 by Mooney

Last edit: Monday June 25, 2007

 

Intro

 

What is DLDI?

 

DLDI, short for Dynamically Linked Device Interface, is an addon for Chishm's libfat that increases homebrew's compatibility for different devices by letting you patch homebrew to work specifically with your device. This means developers will no longer have to worry about creating different versions of their homebrew just so everyone can use it.

If you didn't understand anything in that last paragraph, it's ok. The purpose of this tutorial is to make sure you learn all about DLDI and how to use it to your advantage.

 

Why do I need it?

 

If you are into homebrew on the DS, chances are you've come across some homebrew that doesn't work on your NDS flashcard or GBA flashcart. With DLDI, there is a far greater chance you will be able to play the homebrew you want on your device. Especially with the wide variety of devices used by NDS owners today, homebrew developers have a very hard time making their software compatible with every device out there. Now all they have to do is implement DLDI into their code, and it will work on nearly every device.

 

If you own a slot-1 NDS flaschcard, then you absolutely must learn about DLDI. Since slot-1 cards use a different system than slot-2 cards, most of the homebrew written for slot-2 devices will not work on slot-1 devices. Now, DLDI allows you to patch the homebrew so it will work on your device, whether it is slot-1 or slot-2.

 

 

Patching

 

UPDATE: If you are using an R4, the latest kernel (v1.10) has a DLDI auto-patching feature. This means you don't have to patch anything yourself anymore! Get it here: R4 kernel v1.10

 

Unless you are a homebrew developer, this is probably the only thing you need to worry about. Patching is when you apply the DLDI file for your device to some DLDI compatible homebrew.

 

What you'll need

- DLDITool for your OS

- DLDI file for your device

 

1. Get the right DLDI file

To get your DLDI file, go here:

chishm.drunkencoders.com/DLDI

Find your device on the list and click on "DLDI" next to its name to download the file. For example, if you were looking for the R4 DS/M3 Simply DLDI file (Yes, they both use the same file), when you saw this:

 

r4dldino1.png

 

... you would click on "DLDI" to download the .dldi file, or "SRC" if you wanted to download the source code of the .dldi file.

 

2. Get a version of DLDITool for your OS

Go here and download one of the versions for your OS. Currently, DLDITool is availabe for Windows, MacOS X, and Linux-x86. You can also download the source if you want to.

 

 

Patching with the Win32 command line version

 

After you have downloaded and unzipped dlditool-win32.zip, you should have a directory with two files in it:

- dlditool.exe

- license.txt

 

1. Place your DLDI file in the same directory as dlditool.exe

Put your device's DLDI file into the same directory as dlditool.exe. The DLDI file should be named <devicename>.dldi with no spaces.

 

2. Place your DLDI compatible homebrew into the same directory

Put the homebrew you wish to patch into the same directory as dlditool.exe and your device's DLDI file. Again, the name should include no spaces. Underscores ( _ ) are acceptable.

 

3. Patch it

With all of the files in the same directory, open up command prompt (go to "Start > Run" and type "cmd"), go to the dlditool.exe directory, as shown here:

dldicmdnavigatezd5.th.png

 

Once you are in the dlditool.exe directory, type the following command:

dlditool <dldi>.dldi <name>.nds

Replace <dldi> with your DLDI file, and <name> with the name of the homebrew. Here is a picture of me getting ready to patch dslinux.nds with the R4 DS/M3 Simply's DLDI file, r4tf.dldi:

dlditoolcmdfl1.th.png

 

After you have all that set up, just press Enter to patch the file. Here is what it looks like:

dlditoolcmddoneec6.th.png

 

4. Transfer it

All you have to do now is put the patched ROM onto your flashcard the same way you would put any other ROM on, and run it!

 

 

Patching with the Win32 GUI version

 

After downloading and unzipping dlditool-win32-gui.zip, there should be a whole bunch of source files, a few .txt files and a dlditool32.exe. The only file you really need is dlditool32.exe, so you can delete the rest if it makes you happy.

 

1. Run the app

You don't even have to put all the files in the same directory, just make sure you know where your DLDI files are and where your homebrew is.

 

2. Set the directories

After you've opened dlditool32.exe, you will be presented with a window titled "DLDI Patcher v0.32." Next to the dropdown menu marked "DLDI," click the "..." button and browse to the folder where you saved your DLDI file, as shown here:

dlditoolguidldisv4.th.png

 

Then, click the "..." button next to the box marked "Binaries" and browse to your DLDI compatible homebrew:

dlditoolguiromsnc8.th.png

If there is a file in the list that should not be, hit "Clear" to remove all items from the list.

 

3. Patch it

Make sure the correct file is selected in the DLDI drop down menu, and click "Patch." This is what a successful patch should look like:

dlditoolguidonewu1.th.png

 

4. Transfer it

Write the newly patched ROM to your flashcard just like you normally would, and load it like you would load any other homebrew.

 

 

Patching with the Win32 right click version

 

1. Install the app

Download DLDIrcSetup.exe and run the installer to install the app on your system. Select your language, choose whether to install start menu shortcuts and a few other things, then choose one or more DLDI files that you will be using, like this:

dlditoolrcsetupqk9.th.png

 

After you've selected all the DLDI files you'll need, proceed with installation.

 

2. Patch it

Once it is installed, all you will have to do is right click on a .nds ROM and select the DLDI patch you want to use:

dlditoolrcrightclickfx1.th.png

 

... and your ROM will be patched!

 

3. Transfer it

Write the newly patched ROM to your flashcard just like you normally would, and load it like you would load any other homebrew.

 

 

Patching with MacOS X DLDI Drop version

 

1. Install the app

Download and unzip dldi_drop_1_0_3dmg.zip then run the .dmg file. Once it is installed, run the app so that it appears in your dock. It comes with all of the latest DLDI files, so you don't need to download any yourself.

 

2. Patch it

Once the app icon is in your dock, all you have to do is drag and drop a .nds ROM onto it, like this:

picture1kn2.th.png

 

Once you drop it on the icon, a list of DLDI files will appear. Just select the patch for your device and click "OK":

picture2re3.th.png

 

3. Transfer it

Write the newly patched ROM to your flashcard just like you normally would, and load it like you would load any other homebrew.

 

 

Patching with the MacOS X command line version

 

After you have downloaded and unzipped dlditool-mac.zip, place your DLDI file and your NDS homebrew into the same directory.

 

1. Patch it

Make sure you have the correct DLDI file and homebrew in the directory, and browse to the location of the dlditool directory in the terminal like this:

cd /users/<name>/desktop/dlditool-mac

... replacing <name> with your username. Once you are in the correct directory, run this command:

./dlditool <dldi>.dldi <name>.nds

... replacing <dldi> with the name of your DLDI file and <name> with the name of the ROM you are patching. The end result should look something like this:

dldimackd9.th.png

 

2. Transfer it

Write the newly patched ROM to your flashcard just like you normally would, and load it like you would load any other homebrew.

 

 

Patching with the Linux-x86 command line version

 

Screenshots taken on Ubuntu Linux 6.06.1 LTS 64-bit LiveCD

 

After you download and unzip dlditool-linux-x86.zip, put your DLDI file and DS homebrew files into the same directory.

 

1. Set it up

Make sure you have dlditool, your DLDI file, and your DS homebrew files in the same directory, and open up the terminal (In Ubuntu Linux, go to Applications > Accessories). In the terminal, browse to the dlditool-linux-x86 directory, as you see here:

dldilinuxnavigateeu4.th.png

 

2. Patch it

Once you have navigated to the dlditool directory, run this command:

./dlditool <dldi>.dldi <name>.nds

... replacing <dldi> with the name of your DLDI file and <name> with the name of your NDS ROM. After you press enter, you should see something like this:

dldilinuxdonegc8.th.png

 

3. Transfer it

Write the newly patched ROM to your flashcard just like you normally would, and load it like you would load any other homebrew.

 

 

Coming Soon

- DLDI info for developers (Making your own DLDI file, using DLDI in homebrew, etc.)

- Any changes or additions I might make

 

Special Thanks

- aroogyula (For MacOS X screenshots)

- Gamecop

- WinterMute, Deathwind (#dsdev)

 

Sources

http://chishm.drunkencoders.com/DLDI/

Link to comment
Share on other sites

Thanks for the compliments, everybody! :D

 

Added a section on patching in MacOS X. Still have to cover one more MacOS app and the Linux one. Should be coming in the next couple of days.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 months later...
Question..

I entered the commands (Both GUI and Command Line came with the same result) and got this

 

***** does not have a DLDI section

what's this mean?

Means whatever you're trying to patch doesn't support DLDI patching... period.

Link to comment
Share on other sites

  • 2 months later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...