DLDI

From Bibliotheca Anonoma
Revision as of 19:36, 18 February 2017 by Antonizoon (talk | contribs) (Created page with "DLDI stands for dynamically linked device interface and is a method by which developers can make programs for carts with mutually incompatible drivers whereas before there wou...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DLDI stands for dynamically linked device interface and is a method by which developers can make programs for carts with mutually incompatible drivers whereas before there would have been several builds required, the basic theory is that the code is compiled with a blank space and then the user patches this blank space for use with their cart. The EZ4 and EZ5 both have DLDI patches and their use is wholly supported by sosuke.com in place of individual libraries.

For a basic tutorial, see DLDI Tutorial.

History

Originally when DS homebrew first appeared people continued to use file systems and similar techiniques created to contain stuff for GBA (many of you will have heard of GBFS or moonshells imfs).

Eventually it was found that you could read data right off the card (and perhaps more interestingly write data to the card) making things like music and video players as well as text viewers, emulators and the like potentially far easier to update from the users point of view as well as include interesting features (there exists FTP applications for the DS for example), naturally every card was different and did not work with others access routines (worse still some interfered with others).

As card access is fairly low level programming libraries were made so as to delegate cart reading to the libraries, the eponymous gba_nds_fat by Chism (now superseded by libfat) probably being the most renowned of the lot (there are other libraries and the DSlinux project uses their own, DLDI is starting to enter however). Naturally not every card had access routines and sources necessary and well as the ability to play nice with other cards meaning they were not supported in the libraries and consequently homebrew that uses it.

This caused a lot of headaches on the card owners end, card reviewers end, forum viewers end, programmers end (see all the versions of DSOrganise around) as things would have to be recompiled with new libraries (something end users are loathe to do) and it was all a mess.

Now Moonshell uses the method of having a windows installer which the user makes into a useable file for their flashcart and very recently chism added similar functionality to his libraries (a new version of gba_nds_fat was also made despite being an discontinued project) meaning that any application made using the new libraries has some blank space added will merely have to be patched on the users end to support their cart. There are already versions of moonshell, DSdoom and a couple of other apps using DLDI going around and many of the newly compiled programs also possess DLDI support. Patchers (all three major OS') and libraries required Chism's DLDI page

Here is a thread with a bunch of older programs that have now had DLDI support added if their creator had not added support, most applications compiled recently have dldi support added (check various forums and news sites for betas and check): gbadev thread


General usage

There is all manner of appplications ranging from right click to full blown GUI based applications, the command line method is detailed here: DLDI is simple enough to use visit the site download the dldi file for your cart download the patcher (the command line one is detailed here as it simple enough to use) The syntax is:

dlditool <dldi> <app>

That is to say if you were to patch a file called a.nds for the EZ4 you would first make sure a.nds was in the same directory as ezsd.dldi and the patcher called dlditool.exe, then type

dlditool ezsd.dldi a.nds

Hit enter and a few seconds later a patched application would appear, copy this to your card and do whatever else is needed for the app (copy films, roms, isos, music, pictures....)

FCSR - older carts see here

Older flashcards such as the EZ1/2 as well as those without DLDI support at present can make use of FCSR for read only purposes.

EZ5 issues

The EZ5 kernel currently does not launch homebrew unless the gamecode is set to PASS, see this post for a tool to resolve this. Other tools also exist to correct this.

Developers

There exist versions of GBA_NDS_FAT and libfat with DLDI support, libfat is the newer version that is updated with gba_nds_fat the old version that is now effectively discontinued.

Libfat:

GBADev thread

gba_nds_fat:

backported interface


See also developers_page on this wiki.