GB Bank Switching

I'm now working on an RPG for gameboy. The problem is, the map is huge. I know that a ROM bank can hold 16KB (right?), and you can switch areas of rom into bank 1 (bank 0 being for code mainly). But, how do i use banks in GBDK?

For example, i have this array. But i want it to be 125x125 instead of 10x10, which will take up most of a bank. How would i put it into bank 1?

unsigned char map[] =
{
1,1,1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2,2,2,
1,2,3,2,2,2,2,2,2,2,
1,2,2,2,2,2,2,2,2,2,
1,2,2,2,3,2,2,2,2,2,
1,2,2,2,2,2,2,2,3,2,
1,2,2,2,2,2,2,2,2,2,
1,2,3,2,2,2,2,2,2,2,
1,2,2,2,2,2,2,2,2,2,
0,0,0,0,0,0,0,0,0,0
};


The example code that comes with GBDK is really no help.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion