NOGDUS

Articles, Tutorials, and other things. => NDS Homebrew Game Programming => Topic started by: Richard Marks on January 12, 2010, 08:20:31 PM



Title: DS homebrew - Getting Started
Post by: Richard Marks on January 12, 2010, 08:20:31 PM
Welcome to the first tutorial on DS homebrew development.
Bear with me as I am still writing the content for this series.

I am going to be using a Linux operating system throughout this series.
If you are on Windows or something else, then you will need to find how to set things up yourself.

First we need to download a few things in order to get started.

We need devkitARM, libnds, dswifi, libfat-nds, and PAlib for starters.

Starting with the first of that list, go here and find the files that you need (http://sourceforge.net/projects/devkitpro/files/).
At the time of this writing, the links below worked for me. You can try them for yourself.

devkitARM

devkitARM_r27-x86_64-linux.tar.bz2 (http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r27-x86_64-linux.tar.bz2/download) (64-bit CPU)
devkitARM/devkitARM_r27-i686-linux.tar.bz2 (http://sourceforge.net/projects/devkitpro/files/devkitARM/devkitARM_r27-i686-linux.tar.bz2/download) (32-bit CPU)

libnds

libnds-src-1.4.0.tar.bz2 (http://sourceforge.net/projects/devkitpro/files/libnds/libnds-src-1.4.0.tar.bz2/download)

dswifi

dswifi-src-0.3.11.tar.bz2 (http://sourceforge.net/projects/devkitpro/files/dswifi/dswifi-src-0.3.11.tar.bz2/download)

libfat-nds

libfat-nds-1.0.6.tar.bz2 (http://sourceforge.net/projects/devkitpro/files/libfat/libfat-nds-1.0.6.tar.bz2/download)

PAlib

PAlib0912XX_Beta.7z (http://palib-dev.com/PAlib0912XX_Beta.7z)

Ok, so now that you have all of that downloaded.
Lets go over the steps that you must follow in order to install everything.

I am going to install in my home directory to keep things simple.

Open up a terminal and create a directory called devkitPro.
Extract the contents of the devkitARM file you downloaded into the new directory.
Create a directory in the devkitPro folder called libnds.

Add this to your .bashrc file in your home directory.
Code:
export DEVKITPRO="$HOME/devkitpro"
export DEVKITARM="$HOME/devkitpro/devkitARM"
export PAPATH="$HOME/devkitpro/PAlib/lib"

Now, you need to do a little bit of juggling things to do.
You need to extract the libnds file you downloaded into a temporary dir I just called it libndstemp.
Go into it and run the make command to build the library.

Now, copy the lib and include directories from what you just built into the libnds directory.
Also copy the icon.bmp file into the libnds directory.
You can get rid of the temporary directory now.

OK, we're getting closer.

You need to extract the dswifi file you downloaded into a temporary dir I just called it dswifitemp.
Go into it and run the make command to build the library.

Now, copy the lib and include directories from what you just built into the libnds directory and merge the include & lib directory contents.

You can get rid of the temporary directory again.
Extract the contents of the libfat-nds file you downloaded into the libnds directory.
Create a directory in the devkitPro directory called PAlib.
Extract the PAlib file into the new directory you just created.

OK, hopefully everything should be installed correctly.

Next I'll explain how to test that everything is working correctly.

Change directory to the /devkitpro/PAlib/examples/Text/Normal/HelloWorld/ directory.
Run the make command to build an .nds file.

If all goes well, then you're installed and ready to move on to the next tutorial.
If something went wrong, then let me know here and I will see what I can do to help.