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.

C/C++ > newbie alert, but please help anyway :)

#3591 - gbawill - Fri Feb 28, 2003 8:13 pm

Hi

I'm new to GBA coding, infact I'm new to C/C++ coding (fairly proficient in numerous BASIC languages, but this is the first time I've tried anything else).

Can anyone let me know if there is some sort of document which lists commands etc for GBA coding in c/c++? I've d/l HAM, got my compiler and IDE all working with examples, but when it comes to actually trying to code something of my own I hit a brick wall - for instance I can't find anything like a WAIT command or SLEEP (I know sleep works in windows, but the gba don't like it :)

I just think that having a database of commands and their usage would be an absolutely invaluable tool for learning from.

Any ideas?

Many thanks :)

#3594 - jenswa - Fri Feb 28, 2003 8:34 pm

windows? you're programming for the gba,
a lot of prebuild functions are not available in there.

Since you are using HAM, i would go to there website
and download some tutorials and/or documentation about
HAM, that way you know what functions there are in HAM
and not.

Anywayz, you can always make your own sleep command,

just let the cpu do something usless, that will keep him waiting.

hope this helps a bit
_________________
It seems this wasn't lost after all.

#3625 - Psyk - Sun Mar 02, 2003 12:46 pm

Read the tutorials on gbajunkie.co.uk although they aren't for HAM so it might not be much use. But you'll find that programming for windows and programming for a GBA is very different. With the GBA you program much closer to the hardware and as jenswa said there are few prebuilt functions available. You will learn a lot from it. I have.

Another way to do a wait command would be to use the timers that are built into the GBA. There is a tutorial on http://216.167.73.47/~dovoto/English/tutorial.html that is quite useful.