homebrew style. How cool is DS homebrew?
It’s this cool!!! I drew that using a DS homebrew program called Colors. I didn’t think a DS had pressure sensitivity, but the homebrew proves me wrong. It’s time to start bringing my DS with me to drawing meats so I can at least claim that I’m drawing…on my DS!
My friend Ricko is helping me get setup and I figured I’d throw the instructions up on my blarg, mainly for my benefit, but for yours too! Here they are…
How to install devkitpro:
1. Go to Devkitpro.org and download the latest version of the software (download link is on the left hand column), devkitProUpdater-1.4.4.exe is the one I got from the site
2. Follow the instructions in the installer. It will download a bunch of stuff to your machine and then extract and install them. Don’t really need devkitPPC or devkitPSP (unless doing NGC or PSP homebrew). Don’t really need Programmer’s Notebook either (IDE)
3. Let the installer download and install everything, and then you’re done with this part of the process
Visual Studio .NET 2003 Setup
I use Visual Studio .NET 2003 at home. If you don’t…well…have fun.
1. Open up a new solution, make a new project, and create a new “Makefile Project”
2. Name it something like “MyFirstDSProj” or whatever…
3. Before you leave this dialog, go to “Location” and browse to your c:/devkitpro folder, make a new folder so you can store all of your individual DS projects in there — not necessary to do this, but recommended to keep all your homebrewin’ in the same place. NOTE: Do not put any spaces in this new directory you’re making or you’ll run into build time issues later on.
4. Click okay and go to the next dialog apart of the wizard setup. Go to application settings. Set up your settings like this:
Build CommandLine: make -r 2>&1 | sed -e ‘s/(.[a-zA-Z]+):([0-9]+):/1(2):/’
Output: DSTest.nds (NOTE: it’s not EXE, NDS is the executable extension)
Clean Commands: make clean
Rebuild command line: make -r 2>&1 | sed -e ‘s/(.[a-zA-Z]+):([0-9]+):/1(2):/’
-r is a redirect from make
“2>&1″ Unix thing to redirect something to stdout.
“| sed -e” – takes stdout and pipes it to stderr. -e is for expression.
What this all does is takes the output from gcc and puts it into stderr and passes it to Visual Studio so you can see your errors and be able to click on them and view the errors along with your code.
That’s a make command with a regular expression.
5. Finish up with the application wizard and you will get into the empty project solution.
6. Now you want to set up your debugger to output to a DS emulator. I’m using one called desmume-0.7.2. There’s a link to it below. IN VS 2003 goto Projects->Properties. For “Configuration Properties” goto “Debugging.” Under the Action subsection goto “Command” and redirect the ($TargetPath) to the desmume executable. I’ve put the Desmume emulator in my c:/devkitpro/emulator path (I made the emulator folder) and linked to it from there.
Change Command Arguments to “$(TargetPath)” (without the commas).
7. Close that dialog and goto Tools->Options. Under the Projects sub menu goto “VC++ Directories,” make sure “Show Directories for” drop down is set to “Executable files” and add this directory: C:\devkitPro\msys\bin. Just go and browse to that directory. This allows you to build from within Visual Studio. Why? The DS homebrew uses a unix shell to build your code and this line gives it access.
Change “Show Directories for” to “Include files” and add this line: C:\devkitPro\libnds\include
Change “Show Directories for” to “Source files” and add this line: C:\devkitPro\libnds\include
Change “Show Directories for” to “Library files” and add this line: C:\devkitPro\libnds\include
Press OK and you’re done with that setup. You should be able to build an NDS project.
Setup a DS Build
If you want to just get up and running goto your c:/devkitPro/examples/nds and you’ll find all the examples you can compile and run. The one I ran is in ../Graphics/3D/nehe/Lesson10/.
Here’s how you run it:
1. Go to the project directory where you created your Visual Studio 2003 work folder (c:/devkitpro/DSProjects for example). and copy and paste the contents of ../Graphics/3D/nehe/Lesson10/ in there.
2. Back in your VS 2003 workspace build the solution. If everything worked out right you’ll get two folders in your DSProject folder called arm7 and arm9, and you’ll have a ton more files in there. The one you want is called an .nds file. This is the executable that you will run in the emulator software or on the R4. Copy it to your R4 and enjoy your work!
R4 — this is an NDS card that take a micro-SD card. You don’t get a MicroSD card with the R4. The R4 itself has a bunch of circuitry and software onboard the chip to bootup and run your homebrew games, mp3s, and some other stuff. I’ve seen it running a 3D nehe demo converted for use on NDS. Feel the potential (to your face).
You can get an R4 here: http://www.volumerate.com/details.vr/sku.1202~r.DX
It costs about 33 bucks and will take somewhere around 2 weeks to get to your house. I haven’t gotten mine yet, but I did order it.
Some useful NDS bookmarks:
These first 3 links are the big ones that give you tutorials for working with the NDS
These are useful engineering links to Unix shell commands and working with make files which you’ll need.
NDS Emulator link (good for testing on your PC, but the emulators aren’t that fully functional, my friend says he had the best results with this — but these are a temporary solution until you can get an R4):
You can find it at this link: http://sourceforge.net/project/showfiles.php?group_id=164579
So this is the super-quick primer on how to get started. I was installing and setting up while I was writing this down so I made sure to include all of the little nuances and such that I had to go through. If you have any issues, feel free to leave a comment and I can try and help you out or find out more.