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.

Beginners > I got SGADE working on Mac OS X!!! VICTORY!! :D

#38960 - torix - Sat Apr 02, 2005 2:43 pm

I got it working, and now I'm starting to learn how do do stuff with SGADE. For example, the Hello World Program.

Anyway, what I did was install XCode, which is a very good application to use.

Then I downloaded the SGADE library .dmg file from the SGADE website, and I read a forum somewhere (I don't remember where ,sorry) that said that I have to copy the folder GBASDK (a template for a GBA program that was installed from the .dmg file I downloaded) to /Library/Application Support/Apple/Developer Tools/Project Templates/.

To run the SGADE helloworld program, open XCode, go to File -> New Project, and look for GBASDK, and click on the triangle to the left of it, and select SGADE. Then choose a name for the project, and where it will be saved.

Then open helloword.c (which is a basic program), and to compile it, simply click on Build (at the top) -> Build. Or you can just press ?B to build it. Don't go to build and run, because it will get an error. XCode automatically compiles it to GBA format, so just run it with a GBA emulator (I reccomend Boycott Advance).

Enjoy. Any questions/comments, please post them. I'll do my best to help.
_________________
I am 100% Newbie!!!

#38972 - ecurtz - Sat Apr 02, 2005 6:22 pm

If you add a "Custom Executable" from the Build menu you can have it automatically launch the new ROM with your favorite emulator. You have to set up the path to point to your build directory and give it the right arguments, but it's nice to be able to do Build & Run from inside XCode.

#38991 - torix - Sat Apr 02, 2005 10:37 pm

Here's what you do with the SGADE folder: I got the info from another forum thread at http://forum.gbadev.org/viewtopic.php?t=5103

sandymac wrote:
I'd say the easiest way to do some dev work on Mac OS X with Xcode is to get a GBA SDK from: http://gnufoo.org/gbasdk/gbasdk.html

Once you've installed that package, go to /Developer/ProjectBuilder Extras/Project Templates/ and move the GBASDK folder to /Library/Application Support/Apple/Developer Tools/Project Templates/

Once you've done that, start Xcode and there will be GBA project templates to start with. The template will contain basic hello world code to make sure you can compile it.

The gnuFoo GBASDK doesn't include the newest GCC or GBA linker scripts but it's more than enough to get you going. Actually if you look around enough it isn't hard to replace the linker scripts in the project template folders with current versions.

_________________
I am 100% Newbie!!!

#38997 - jstart - Sun Apr 03, 2005 12:41 am

Yah i got this originally working in project builder a few weeks ago then upgraded to xcode
But ive been lookign at the tutorials and documentation but since its all meant for windows im confused anyone know how to use sgade laguage to make something more than just text?