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 > Nintendo DS IDE/SDK like Ham? Also, Inline Asm in Ham?

#89569 - AGBGBA - Sun Jun 25, 2006 4:00 pm

Hi,

D'you know of any NDS ides,toolchains for free/homebrew purposes?

I've seen mention of someone using arm9 (NDS I presume since gba is arm7 (Don't hit me if I'm wrong, i'm new at all this)) so I fugre it must be possible. I just hope it's C++ cos my asm skills are lacking to put it kindly.
And if there is a solution, which emulator are you guys using for prototyping? Or are you using some method of deploying it to your nds?(I don't have one till next month is why I ask)

Also, atm I'm using HAM for gba dev, going well so far but I was just wondering, is it possible to do inline asm?

like,

Code:

 void DrawPixelASM(int x,int y,int col)
{
_inline:
   mov a4,blah
   etc.
}


or do I have to manually compile my asm stuff in a seperate file?(A book I have seems to suggest that, but it was wrote over 3 years ago so it may not be required anymore?)

#89572 - tepples - Sun Jun 25, 2006 4:18 pm

The toolchain is devkitARM. As for an IDE, you can use any editor that supports GCC, such as VisualHAM, although you'll have to replace hamlib with libnds or PAlib.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#89576 - AGBGBA - Sun Jun 25, 2006 4:29 pm

Thanks. Any tutorials on setting it all up? Never had to set up a toolchain manually before, let alone one for a specialized console.

#89596 - poslundc - Sun Jun 25, 2006 6:49 pm

AGBGBA wrote:
Also, atm I'm using HAM for gba dev, going well so far but I was just wondering, is it possible to do inline asm?

like,

Code:

 void DrawPixelASM(int x,int y,int col)
{
_inline:
   mov a4,blah
   etc.
}


or do I have to manually compile my asm stuff in a seperate file?(A book I have seems to suggest that, but it was wrote over 3 years ago so it may not be required anymore?)


You can do inline assembly using the asm command.
GCC docs
Rules of engagement

That said, it is preferable 90% of the time to put your assembly code into separate files that are easier to debug and can be processed using their own build rule. The only real exception I can think of is for creating inlined functions to do things that are not normally accessible from C (such as calling BIOS functions).

Dan.

#89597 - poslundc - Sun Jun 25, 2006 6:51 pm

AGBGBA wrote:
Thanks. Any tutorials on setting it all up? Never had to set up a toolchain manually before, let alone one for a specialized console.


Did you check the sticky on NDS Tutorials and Misc. Dev Links in the DS Development forum?

Dan.

Edit: thread moved to the DS development section.

#89617 - HyperHacker - Sun Jun 25, 2006 8:32 pm

AGBGBA wrote:
which emulator are you guys using for prototyping? Or are you using some method of deploying it to your nds?

I had V1 firmware, so I got a Ralink wireless card to do WifiMe, and using this I can send my compiled programs directly to the DS using Download Play.
_________________
I'm a PSP hacker now, but I still <3 DS.