Mooney Posted March 22, 2007 Share Posted March 22, 2007 v1.5 by MooneyLast 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 fileTo get your DLDI file, go here:chishm.drunkencoders.com/DLDIFind 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: ... 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 OSGo 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.exePut 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 directoryPut 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 itWith 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: Once you are in the dlditool.exe directory, type the following command:dlditool <dldi>.dldi <name>.ndsReplace <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: After you have all that set up, just press Enter to patch the file. Here is what it looks like: 4. Transfer itAll 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 appYou 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 directoriesAfter 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: Then, click the "..." button next to the box marked "Binaries" and browse to your DLDI compatible homebrew:If there is a file in the list that should not be, hit "Clear" to remove all items from the list. 3. Patch itMake sure the correct file is selected in the DLDI drop down menu, and click "Patch." This is what a successful patch should look like: 4. Transfer itWrite 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 appDownload 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: After you've selected all the DLDI files you'll need, proceed with installation. 2. Patch itOnce 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: ... and your ROM will be patched! 3. Transfer itWrite 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 appDownload 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 itOnce the app icon is in your dock, all you have to do is drag and drop a .nds ROM onto it, like this: Once you drop it on the icon, a list of DLDI files will appear. Just select the patch for your device and click "OK": 3. Transfer itWrite 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 itMake 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: 2. Transfer itWrite 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 upMake 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: 2. Patch itOnce 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: 3. Transfer itWrite 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) Sourceshttp://chishm.drunkencoders.com/DLDI/ Link to comment Share on other sites More sharing options...
Private Biscuit Posted March 22, 2007 Share Posted March 22, 2007 Wow, it's incredibly useful Thanks! Link to comment Share on other sites More sharing options...
Renzor Posted March 24, 2007 Share Posted March 24, 2007 finally most homebrew will work on slot ones Link to comment Share on other sites More sharing options...
olaf Posted March 24, 2007 Share Posted March 24, 2007 Very useful guide, Mooney. Good job. Link to comment Share on other sites More sharing options...
Mooney Posted March 26, 2007 Author Share Posted March 26, 2007 Thanks for the compliments, everybody! 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 More sharing options...
Robert Posted March 26, 2007 Share Posted March 26, 2007 Good work! Link to comment Share on other sites More sharing options...
Mooney Posted March 27, 2007 Author Share Posted March 27, 2007 Alright, added a section on patching with dlditool-linux-x86. For this I used Ubuntu 6.06.1 64-bit LiveCD. Link to comment Share on other sites More sharing options...
Alpha Posted April 14, 2007 Share Posted April 14, 2007 I just used this tutorial today to patch Comic Book DS so I can read some old comics. Let's just say, it helped a hell of a lot. Link to comment Share on other sites More sharing options...
Laos Posted July 26, 2007 Share Posted July 26, 2007 Question..I entered the commands (Both GUI and Command Line came with the same result) and got this ***** does not have a DLDI sectionwhat's this mean? Link to comment Share on other sites More sharing options...
olaf Posted July 27, 2007 Share Posted July 27, 2007 Question..I entered the commands (Both GUI and Command Line came with the same result) and got this ***** does not have a DLDI sectionwhat's this mean?Means whatever you're trying to patch doesn't support DLDI patching... period. Link to comment Share on other sites More sharing options...
Gashal Posted October 23, 2007 Share Posted October 23, 2007 Question Wich DLDI do I use for my SUperCard RUmble it shows 1 and 2 slot but I do not know wich one man I want to play my homebrew Quake. Link to comment Share on other sites More sharing options...
Recommended Posts