#7308 - hnager - Sat Jun 14, 2003 5:43 pm
Now that I have all of my makefile problems straightened out (compiling with either gcc or g++ through vc++) I'd like to add one more step to the makefile (if possible) - auto launching an emulator with the newly compiled bin. It would certainly save some time (back and forth between vc++ and visualboyadvanced).
A while back I was using visualHAM and that launches an emulator - made things a lot easier.
thanks.
#7322 - Ninja - Sun Jun 15, 2003 12:33 am
I know that it's possible. I have seen it done with some sample files on BeLogic's site I think... But how it's done, I really don't know.
#7323 - hnager - Sun Jun 15, 2003 1:17 am
Possible is good.
I took a look at somne of BeLogic's examples - no luck there...seen it anywhere else?
#7329 - DekuTree64 - Sun Jun 15, 2003 4:41 am
Ahh, just checked the BeLogic demo and it's painfully simple to do. You just right click on your project name, make a folder called Rom or whatever you want, and set bin or gba (or both, just type bin,gba) as the extension type, right click on it and pick add files to folder, put your ROM in there and when you click on it, it just opens it with the default .bin/.gba program, like it would from Windows Explorer. Thanks for the clue Ninja, I've always wanted to know how to do that^_^
#7330 - hnager - Sun Jun 15, 2003 5:05 am
Very nice. I'm happy with that - one better would be auto launching it on compile...but this is great. thanks!
#7331 - niltsair - Sun Jun 15, 2003 7:48 am
What i did was to add a button in VisualC++ to launch my game.
Rather easy, just configure a ''tool'' to launch your emulalor, passing it in parameter the resulting gba file after compile. Then just add this tool button in one of your toolbar.
#7338 - DekuTree64 - Sun Jun 15, 2003 3:30 pm
niltsair wrote: |
What i did was to add a button in VisualC++ to launch my game.
Rather easy, just configure a ''tool'' to launch your emulalor, passing it in parameter the resulting gba file after compile. Then just add this tool button in one of your toolbar. |
Hey, that's pretty cool. Do you know of any way to make it reuse the same window? VBA takes a while to open on my programming computer, so by the time it could get set up, I could have already alt-tabbed over to it and used ctrl+F1 to open the most recent ROM, which is what I've always done before.
#7346 - Ninja - Sun Jun 15, 2003 10:37 pm
Thanks guys. I have been wanting to know how to do this myself, but my Visual Studio general knowledge wasn't up to figuring out how BeLogic's demo did it. :)
#7356 - Sweex - Mon Jun 16, 2003 10:12 am
I've added a command to the custom tools in VC++ (6.0) which is activated with alt-F7. This will start VisualBoy Advance with the ROM in the current project. So it's simply F7 and alt-F7 to compile and run...
#8116 - Sharpfish - Wed Jul 02, 2003 1:58 pm
This is what I have been doing for a while (though I use VC++ 6 - for which handier tips are above) - I have a shortcut to my current project on the quick launch bar - actually a quick launch to a .bat makefile.
Code: |
path=c:\devkitadv-r5-beta-2\bin
g++ -o test.elf main.cpp sprites.cpp background.cpp levels.cpp
objcopy -O binary test.elf test.gba
VBA.exe test.gba
|
Obv change the path to your emulator (the last line - I have a copy of VBA in my Dev kit folder), and your file name. It`s basically adding the command to run VBAdvance using the test.gba - also of course, the line:
Code: |
g++ -o test.elf main.cpp sprites.cpp background.cpp levels.cpp
|
Is specific to my project, I also use g++ instead of gcc (C++)
One click on the taskbar icon (makefile shortcut) will invoke the compiler and then run the rom, leaving the compiler (dos) window open to read any warnings etc.
There were some good ideas for VC users above though, I`ll try them out as well.
www.realityfakers.tk
#8117 - djei-dot - Wed Jul 02, 2003 2:05 pm
If you use the SDL version of VBA, you can quit the program just by pressing ESC
#8121 - Sharpfish - Wed Jul 02, 2003 2:36 pm
Following the tool tip for VC (above) I quickly knocked up a `GBA` tool bar with two tools `GBA Compile/Run` and `GBA Run`. The first one has my makefile as it`s command (no path needed here - just put `mymakefile.bat` or whatever yours is called - keep it the same name in all gba projects and the same tool will always compile and run the rom from VC, (obviously making sure the command to launch the emu + test.gba or test.bin is already at the end of the make file). select workspace dir as inital directory - no arguments needed.
The other tool just launches VBA with the argument `test.gba` refereing to the current (workspace) directory.
nice. now can we edit the tool icons via the resource editor? I currently have a smiley and a pig as my two GBA tool icons ;)