gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > absolute n00b (me) have no idea how to compile from source

#96357 - adrian783 - Wed Aug 02, 2006 8:54 pm

when i download a random 'brew with source included, say, Tromino

how would i go about to compile this game from source? just "make" it after extracting it from rar obviously wont do...
also, when using programmer's notepad to make a new project, do i have to copy the template file from nds examples everytime? is there a one(or few)-click solution?

#96367 - MaHe - Wed Aug 02, 2006 10:11 pm

Read this, it should help you start with the DS homebrew:
http://www.patatersoft.info/manual.html

It is simply the best start for every DS coder wannabe out there :)
_________________
[ Crimson and Black Nintendo DS Lite | CycloDS Evolution | EZ-Flash 3-in-1 | 1 GB Transcend microSD ]

#96390 - Dwedit - Thu Aug 03, 2006 1:21 am

If you're lucky, you can get away with this:
Install Devkitpro, MSYS, etc.
Define these environment variables (shortcut: windowkey+pause), yeah paths may vary depending on where you installed it...
DEVKITARM = /c/devkitPro/devkitARM
DEVKITPRO = /c/devkitPro/
LIBGBA = /c/devkitPro/libgba
LIBNDS = /c/devkitPro/libnds

Might also have to add C:\devkitpro\devkitarm\bin and C:\devkitpro\msys\bin to Path as well.

Then if the program has a good makefile with no absolute paths specified in it, you can just MAKE and it should work.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#96392 - wintermute - Thu Aug 03, 2006 1:23 am

In the case of Tromino, replace the makefile with the one from the examples/nds/templates/arm9 template, change <NDS/NDS.h> to <nds.h>, discard the other includes, add <stdio.h> & <stdlib.h>, replace consolePrintf with iprintf and replace DISP_SR with REG_DISPSTAT.

You'll probably have to do similar things with other code which was written using older toolchains amd libnds.

Also, you'll need to delete the build folder or make clean before attempting to compile.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog