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 > beginner kit

#66869 - encryptedcode - Sat Jan 14, 2006 12:19 am

hi all;
what is your opinion for starting gba programing?

example basicly,if you want to programing pic microcontroller and you need ,

1-a micro controller :)
2-compiler-----write some code and compile it,receive hex file
3-programmer hardware (pc-------> pic) connect pic to pc
4-programmer software load hes file to pic from this software
5-may be a simulator

basicly like this...

but i didnt understand anything about gba ,
1-i have gba and normal game cart
2-i have installed cygnus and devkit pro--is it enought to copiling?
3-there is a lot of hardware but i couldnt choose any one,bootloader flasher linker???? can we write to normal game cart with No-cash multiboot cable or another cable?
4-again there is a problem for me,which ? programmer
5-i thing visual boy is enought for now

i want to write to screen ''hello world'' on my gbe what i need directly?

thanks for all,

#66872 - zazery - Sat Jan 14, 2006 1:10 am

For a compiler all you need is devkitPro, no need for cygwin. Now to get the code running on the gba you have many options. The "normal game cart" you talk about needs to be a special flash memory card that allows you to write to it many times, not a commercial cart that cannot be written to. You can also use a cable, such as Xboo, which is less expensive than a flash cart but limits the rom size to 256kbyte. Other methods are available but those two are the most common. Hope that makes it more clear.

#66951 - encryptedcode - Sat Jan 14, 2006 5:51 pm

thanks it more clear now

i will use xboo and gba to test my programs under 256k ,

but how do i write code?

in devkitpro folder ,there i is too much things, bin folders exaple folders,a lot of executable files,, but it s to complex for me

please tell me step by step what i should to write hello world on gba screen

or do you know any course abot programing gba step by step,
like this
1-open programmers notepad
2-write bla bla , and compile with bla bla
3-get an *.rom file
4-open loader program
5-connect gba on bla bla port

#66993 - zazery - Sat Jan 14, 2006 10:55 pm

(Note: this is assuming you're using Windows with devkit Pro installed like specified on the website.

All the files in the devkitARM folder can be treated as a black box for now, which you should learn about later. You need to understand that all the tools, including your compiler, are in the bin directory.

Write your code in a text editor and save it like you would any c source code. In order to compile the code, you'll need to provide the compiler with arguments and your source files. This can get quite complicated so I recommend copying one of the examples and modifying the source. The makefile sets up all the command line arguments so all you need to do is type 'make.'

As for "hello world", the best you can get is 3 pixels on the screen in mode 3 since there is no text support. I recommend reading through TONC.

#67051 - kusma - Sun Jan 15, 2006 4:18 am

actually, there's text-support in the newer releases of devkitpro/libgba.

#67068 - zazery - Sun Jan 15, 2006 7:10 am

kusma wrote:
actually, there's text-support in the newer releases of devkitpro/libgba.

Guess I better update then. Though I think it's best for a beginner to start with pixels in mode 3. Tile modes usually are learned later since they are slightly more complicated.

#67080 - keldon - Sun Jan 15, 2006 11:33 am

zazery wrote:
kusma wrote:
actually, there's text-support in the newer releases of devkitpro/libgba.

Guess I better update then. Though I think it's best for a beginner to start with pixels in mode 3. Tile modes usually are learned later since they are slightly more complicated.


Text modes are not more complicated when the library provides put(x,y, char/ char*) methods. There are many games which are easier in text mode - like snake, pong and maze games.

#67135 - zazery - Sun Jan 15, 2006 8:34 pm

keldon wrote:
Text modes are not more complicated when the library provides put(x,y, char/ char*) methods. There are many games which are easier in text mode - like snake, pong and maze games.

Very true, I should have really read the functionality of the library before posting a comment like that. However, I still think learning the specifics of the gba hardware would benefit beginners a lot more than using library functions. Of course it doesn't hurt to learn the library functions along side that. More of a personal opinion I guess.