Jump to content

Welcome to 1Emulation.com
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Complete Guide to DLDI

- - - - -

  • This topic is locked This topic is locked
13 replies to this topic

#1
Mooney

Mooney

    The Stealthy Cheat

  • 1Emu Veteran
  • 3,074 posts
  • Gender:Male
  • Location:Midwest, USA
  • Interests:C++, HTML, NDS, PSP, girls, 1emu, 1up, Neo-Cream
Click to view battle stats
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:

Posted Image

... 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:
Posted Image

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:
Posted Image

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

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:
Posted Image

Then, click the "..." button next to the box marked "Binaries" and browse to your DLDI compatible homebrew:
Posted Image
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:
Posted Image

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:
Posted Image

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:
Posted Image

... 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:
Posted Image

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

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:
Posted Image

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:
Posted Image

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:
Posted Image

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/

#2
Private Biscuit

Private Biscuit

    WoOooOooO!

  • Premium Members
  • 259 posts
  • Location:Mexico gto
  • Interests:Many.
Click to view battle stats
Wow, it's incredibly useful :afro: Thanks!

#3
Renzor

Renzor

    Member

  • Members
  • 54 posts
  • Interests:LINK TO THE PAST <br />SUPER MARIO WORLD<br />ON REAL SNES NO EMU
Click to view battle stats
finally most homebrew will work on slot ones :thumbsup1:

#4
olaf

olaf

    "Ultra Emu Author"

  • Ultra Members
  • 1,271 posts
Click to view battle stats
Very useful guide, Mooney. :thumbsup1:

Good job.

#5
Mooney

Mooney

    The Stealthy Cheat

  • 1Emu Veteran
  • 3,074 posts
  • Gender:Male
  • Location:Midwest, USA
  • Interests:C++, HTML, NDS, PSP, girls, 1emu, 1up, Neo-Cream
Click to view battle stats
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.

#6
Robert

Robert

    Alchemist

  • User Admin
  • 10,780 posts
  • Gender:Male
  • Location:Land of Oz !!
  • Interests:MESS development
Click to view battle stats
Good work! :D

#7
Mooney

Mooney

    The Stealthy Cheat

  • 1Emu Veteran
  • 3,074 posts
  • Gender:Male
  • Location:Midwest, USA
  • Interests:C++, HTML, NDS, PSP, girls, 1emu, 1up, Neo-Cream
Click to view battle stats
Alright, added a section on patching with dlditool-linux-x86. For this I used Ubuntu 6.06.1 64-bit LiveCD.

#8
Alpha

Alpha

    Your Ayatollah of Rock N' Rolla!

  • Admin
  • 7,398 posts
  • Gender:Male
  • Interests:Face to face interaction, women, and some old games.
Click to view battle stats
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. :D

#9
Laos

Laos

    Beginner

  • Members
  • 15 posts
Click to view battle stats
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?

#10
olaf

olaf

    "Ultra Emu Author"

  • Ultra Members
  • 1,271 posts
Click to view battle stats

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.

#11
Gashal

Gashal

    Novice

  • Members
  • 38 posts
  • Location:Ottawa, Canada
  • Interests:Cooking, FIshing, Photography, Literature, Caligraphy.
Click to view battle stats
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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users