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 > How to launch nds files in visual studios via emu's

#134261 - knight0fdragon - Thu Jul 12, 2007 3:14 am

In the VS enviroment:
(1)Go to Project.
(2)Go to (Project Name) Properties

A window should pop up with a list of options on the left hand side

(3)Go to Configuration Properties->Debugging
(4)Make sureDebugger to Launch says Local Windows Debugger
(5)click on the white box next to command, and hit the hoochie that is on the right hand side.
(6)Go down to the Browse... option, and browse for your emulator of choice
(7)Hit ok and do not add anything else to this box
(8)Click on the white box next to command arguements, and insert $(TargetPath) along with any other arguements required by the emulator.
(9)Click on the white box next to working directory and insert $(TargetDir)
(10)Leave everything else alone and hit OK
(11) Press F5 to run the application, a window should pop up saying the emu will not take debugging information or what not, if you do not want this popping up everytime, click the white box that says it wont pop up anymore. After this point, the emu should launch with the file that is to be compiled
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206

#134270 - Pantouf - Thu Jul 12, 2007 4:54 am

We were trying to find the equivalent on VC6 but didn't find how. IMO, it could have worked in Project/Settings, debug tab, with "executable for debug session" set to the emulator and "program arguments" set to the target but the build/execute (CTRL+F5) command remains grayed out in a makefile project.

I'd appreciate if someone knew how to CTRL-F5 our way to the emulator in VC6.

Until then, i'll use a workaround i made myself: a win32 app that catches CTRL-F5 and launches the emu + rom. It's downloadable from the below location (vcrun.exe) and you only have to create a conf.txt in the directory you run it from with the 1st line as the full path to the emulator's exe and the 2nd line as the parameters (but it _requires the exe name_ at beginning of params):

http://70.81.30.70:15036/

And example of conf.txt:

e:\emu\no$gba.exe
no$gba.exe d:\prj\gba3\gba3.nds

#134272 - calcprogrammer1 - Thu Jul 12, 2007 5:53 am

In VC++ 2005 Express, go to Tools -> External Tools...

Select Add

Title: iDeaS Emulator
Command: C:\devkitPro\ideas1016\ideas.exe
Arguments: $(TargetDir)\$(TargetName).nds
Initial Directory: $(TargetDir)

Where Command: is the path of your emulator, and Title is what you want in the menu. Now, just build your app, go to Tools, and select iDeaS emulator, and you can test it right away.

Another thing you can do, for easy real-hardware testing is:

Go back to Tools -> External Tools... and click Add again

Title: Copy to CF Card
Command: xcopy.exe
Arguments: $(TargetName).nds I:\Applications\Demos /Y
Initial Directory: $(TargetDir)

Where Title is what you want on the menu, Command is always xcopy.exe (the DOS copy app), and Arguments is always:

$(TargetName).nds <Path to where you want it to copy to, in this case, your removable media> /Y (the /Y disables prompting for overwrite)

Now when you want to test on hardware, just stick in your card, click Copy to <whatever kind of card you have> Card, and when it says Done in the output window, you can put the card in your DS and run it.
_________________
DS Firmware 1, Datel Games n' Music card / Chism's FW hacked GBA MP v2 CF

There's no place like 127.0.0.1.

#134353 - knight0fdragon - Thu Jul 12, 2007 5:31 pm

calcprogrammer1, I can see copy to FAT card being useful in external tools, because I have that also, but why have the emulator in tools? You can just have it set to your debugger, so that when you press F5 ( which everyone gets use to in VC) it runs the emulator with the nds file you are programming.

As for the VC 6.0, I have to get a hold of my one friend from college and have me send a copy, since my disc has gotten damaged, when I get it, I will post the instructions on that
_________________
http://www.myspace.com/knight0fdragonds

MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206