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 > some questions from a beginner

#12524 - maleu - Sun Nov 16, 2003 8:42 pm

hi all

i intend to do some programming for the gba and already read trough some tutorials but for some of my questions i haven't found answers anywhere. i suppose i'm right here then...

    which header files do you use?
    in which state are the io registers at first?
    is there some way to make the linker intelligently setup the enviroment using the uncompress rom calls and dma?


hmm, that's all for now. thanks

manuel

#12525 - tepples - Sun Nov 16, 2003 9:05 pm

maleu wrote:
which header files do you use?

Some developers create their own; others search for "gba.h" on Google.com; others rip them out of other developers' demos' source code.

Quote:
in which state are the io registers at first?

If you're going to depend on the state of an I/O register, write to it during your program's init code. Not all flash cart menu software does a proper RegisterRamReset() before running your code. Now, if you're asking what state RegisterRamReset(0xe0) puts the registers in, I can't necessarily answer that either.

Quote:
is there some way to make the linker intelligently setup the enviroment using the uncompress rom calls and dma?

For what definition of "intelligently"? And by "linker", are you talking about 'ld' (the Devkit Advance linker that turns relocatable .o files into a fixed-address .elf file), or are you talking about the flash cart writer hardware?
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#12526 - maleu - Sun Nov 16, 2003 9:20 pm

wow, that was fast.

(2) i didn't notice these reset functions before but i think there are quite a lot io registers that should have a default state (on powerup). if not you would have to turn off dma, sound, interrrupts, ... in every program first.

(3) yes, i think i meant ld. will it for example compress the code it has to put in ewram and how will it be put there?

#12527 - yaustar - Sun Nov 16, 2003 9:24 pm

1) most tutorials will have the header files you need to get going.
http://www.gbajunkie.co.uk is one the best.
_________________
[Blog] [Portfolio]

#12528 - maleu - Sun Nov 16, 2003 9:33 pm

(1) alright. that had been answered before: http://forum.gbadev.org/viewtopic.php?t=1895

#12529 - sajiimori - Sun Nov 16, 2003 10:11 pm

3) ld doesn't automatically compress or decompress anything. You'll have to do those things yourself.