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 > Questions about source files and emulator support [Renamed]

#109464 - Alan - Sat Nov 18, 2006 2:42 pm

Hi,
I'm Alan, and I'm new around here, and as all new ones, I've got some n00bish questions.

ok, first things first. I've just started to program in C++ (after several years in Blitz3D..), and so far, I've managed to program Pong for the DS, which worked fine on my GBAMP and M3 micro. I've learned it pretty much on my own through the devkitPro examples.

And then I started to surf around on the net (with my super slow modem.. arg!) and found that most people have two source files, one for the ARM7 and one for the ARM9, while all of the devkitpro examples are based on only one source ('ahh.. what a newb..' -you) In the future, I'm going to, or at least hope that I'm going to make programs that use the wifi library, and as far as I know, you have to make the ARM9 and ARM7 cooperate in a way which I don't think is possible with only one cpp file.. Have I missed out of something?..

My next question is a bit less.. noobish.. How can I make my programs get supported by emulators better? (as iDeaS doesnt like PongDS nor my newest project..)

- Alan

#109469 - Rockviech - Sat Nov 18, 2006 3:44 pm

hey Alan,

the thing with the 2 files is that you have to create for each cpu a seperated executable and in the end you emerge these 2 files into one .nds


as far as i know (and that isnt much) has each cpu different features, like touchscreen(arm 7) and 3d (arm 9)

im just starting myself to get more informations about these, would be awsome if someone more experienced here could explain this.

for the emulator question, dont optimize for the emulator, it always means less, because the real hardware can always handle more than the emulator

#109470 - Dan Forever - Sat Nov 18, 2006 3:48 pm

Most emulators are still in their infancy, and I don't think any of them emulate the processes of the ARM7 so compatability with emulators at this point probably isn't worth it.

There is an example in the \path\to\devkitPro\examples\nds\templates\combined directory that you will want to take a look at for working with the ARM7.
I didn't actually have that much luck with it, when I was trying to get wifi working, my solution was to use PALib as a base instead.

#109497 - Alan - Sat Nov 18, 2006 8:57 pm

Ok, thanks!

#109499 - tepples - Sat Nov 18, 2006 9:03 pm

Dualis emulates the ARM7 well enough to run AXE (which runs most of its business logic on the ARM7, unlike most DS programs).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#109506 - Sausage Boy - Sat Nov 18, 2006 9:48 pm

Emulations not emulating the arm7 is old, nowdays most emulators emulate the arm7 very well, like tepples said.

You don't have to program the arm7, ndstool provides a basic arm7 that supports most of what you need for simple programs. When you feel ready, you can try to modify the default binary and maybe run some stuff on it, like a modplayer for example. Mind you, communicating between the two processors is not simple, so I'd wait with that for a while.
_________________
"no offense, but this is the gayest game ever"

#109576 - Rockviech - Sun Nov 19, 2006 12:10 pm

but whats about that the arm7 is the only cpu that can handle the touchscreen? whydo most sources have the touchscreen control in the arm9 source? something which libnds provides?

#109583 - Sausage Boy - Sun Nov 19, 2006 1:17 pm

Yeah. The default arm7 stub sends that stuff over to the arm9 so you get nice functions and don't have to worry about it.
_________________
"no offense, but this is the gayest game ever"