IPB

Welcome Guest ( Log In | Register )

> Board Rules!

Read this before you post!

2 Pages V   1 2 >  
Reply to this topicStart new topic
Complete Guide to DLDI, Patching Tutorial
Mooney
post Mar 22 2007, 01:47 AM
Post #1


The Stealthy Cheat
Group Icon

Group: Moderator
Posts: 3059
Joined: 4-February 06
From: Midwest, USA
Member No.: 8756



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:



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


Once you are in the dlditool.exe directory, type the following command:
CODE
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:


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


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:


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


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:


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:


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


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 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:
CODE
cd /users/<name>/desktop/dlditool-mac

... replacing <name> with your username. Once you are in the correct directory, run this command:
CODE
./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 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:


2. Patch it
Once you have navigated to the dlditool directory, run this command:
CODE
./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 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/
Go to the top of the page
 
+Quote Post
Private Biscuit
post Mar 22 2007, 08:32 PM
Post #2


WoOooOooO!
Group Icon

Group: Premium Members
Posts: 259
Joined: 11-September 06
From: Mexico gto
Member No.: 11494



Wow, it's incredibly useful laugh.gif Thanks!
Go to the top of the page
 
+Quote Post
Renzor
post Mar 24 2007, 02:08 PM
Post #3


Member
Group Icon

Group: Members
Posts: 54
Joined: 16-December 06
Member No.: 12230



finally most homebrew will work on slot ones wink.gif
Go to the top of the page
 
+Quote Post
olaf
post Mar 24 2007, 04:04 PM
Post #4


"Ultra Emu Author"
Group Icon

Group: Ultra Members
Posts: 1271
Joined: 14-November 04
Member No.: 5278



Very useful guide, Mooney. thumbsup.gif

Good job.
Go to the top of the page
 
+Quote Post
Mooney
post Mar 26 2007, 12:56 AM
Post #5


The Stealthy Cheat
Group Icon

Group: Moderator
Posts: 3059
Joined: 4-February 06
From: Midwest, USA
Member No.: 8756



Thanks for the compliments, everybody! biggrin.gif

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.
Go to the top of the page
 
+Quote Post
Robert
post Mar 26 2007, 12:58 AM
Post #6


Evil Admin
Group Icon

Group: User Admin
Posts: 9634
Joined: 5-December 04
From: Australia
Member No.: 5424



Good work! biggrin.gif
Go to the top of the page
 
+Quote Post
Mooney
post Mar 27 2007, 09:19 PM
Post #7


The Stealthy Cheat
Group Icon

Group: Moderator
Posts: 3059
Joined: 4-February 06
From: Midwest, USA
Member No.: 8756



Alright, added a section on patching with dlditool-linux-x86. For this I used Ubuntu 6.06.1 64-bit LiveCD.
Go to the top of the page
 
+Quote Post
GameCop
post Apr 14 2007, 10:10 PM
Post #8


Look into my eyes
Group Icon

Group: Admin
Posts: 6671
Joined: 20-August 02
Member No.: 1



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. biggrin.gif
Go to the top of the page
 
+Quote Post
Laos
post Jul 26 2007, 11:33 PM
Post #9


Beginner
Group Icon

Group: Members
Posts: 15
Joined: 22-July 07
Member No.: 15379



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?
Go to the top of the page
 
+Quote Post
olaf
post Jul 27 2007, 01:29 AM
Post #10


"Ultra Emu Author"
Group Icon

Group: Ultra Members
Posts: 1271
Joined: 14-November 04
Member No.: 5278



QUOTE (Laos @ Jul 26 2007, 06:33 PM) *
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.
Go to the top of the page
 
+Quote Post
Gashal
post Oct 23 2007, 01:51 PM
Post #11


Novice
Group Icon

Group: Members
Posts: 38
Joined: 23-October 07
From: Ottawa, Canada
Member No.: 18425



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.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 9th February 2010 - 12:39 PM