Hi,
> Sorry for the basic question folks...
>
> What's the usual way of controlling what data is code (like AGBMain for
> example), and should be loaded into memory, and what data is things like
> music and graphics for other levels, and should be kept in ROM until
> needed? Our software project has just gotten big enough that the
> difference matters. I'm using gcc and HAMlib, in case that's relevant.
Putting "const" at the start of the array decleration forces the data into
ROM (eg .const unsigned short int)
to swap data between ram and rom (eg. reading a map or gfx data into ram to
make vram copying faster) you'll need to handle that manually.
what you need to do is allocate the RAM that the data will take up (by using
malloc or making an array) then reading the contents of the ROM array into
it
eg
// x = array length
while(x--){
workram_map[x] = rom_map[x]
}
Andrew