| Setting up vs.net to compile and test on an emu is a very simple task. I heard some requests asking how this could be done, so here's a very simple tutorial of how to achieve this.
Note: I am using VS .NET 2003
To get started, go to File->New->Project
Select the path of your project and it's name
Don't forget to select the Makefile Project type
As you can see, my project will be created in the folder C:\ndsdev\projects\MyGame\
Hit OK
Next, you get another window that pops up, on the left side, click Application Settings
Now, where it says Build Command Line: type in 'make' without quotes
Delete the line that says Ouput: (in our case, MyGame.exe)
Clean Commands: type in make clean
Rebuild Command Line: type in whatever cmd(s) you want
Hit Finish
If you go to C:\ndsdev\projects\MyGame, you'll see that there are now 5 files, the project solution being the .sln (as if you couldn't figure that out)
Drop in your Makefile into this directory and the folders you need, on the left (on my UI), you can add and delete whatever folders you need to organize your code, but this will not create the folders in your actual project folder, only for the sake of organizing while in this solution
Add all your source/header files into the solution
Next, go into (from the menu bar) Tools->Options. From here, select the Projects folder and VC++ Directories sub-item. Unless you've setup some special platform, mine says Win32, but in the drop box for Show Directories For: select Executable Files.
You can add the Include and Source directories for LIBNDS if you want to be able to quickly get definitions without going through your hard drive looking for the correct header (doesn't work with every function/struct).
Make sure you've set the environment variables needed (MSYS/LIBNDS)
Hit OK
Now, if you go to Project->MyGame Properties (or game_name Properties, however you named it), and go into Debugging sub-item

In command, find your favorite emulator and put in the path to the exe, not all emulators I've tried accept command line arguments, so you'll just have to manually load your nds, DeSuME does though.
My Makefile was setup to name it as MyGame.nds, so that's what i set my argument to be, after compiling (f7), hit ctrl+f5 and boom! you've got your nds running on the emulator with minimal effort.
I do not know of a way to debug through breakpoints, if anyone does know, come on EFNet and tell me, that'd save hours of trouble
Enjoy your newly setup environment
|