#35301 - WillyWonka - Wed Feb 02, 2005 8:01 pm
I'm trying to load a level from Mappy into my code which uses http://devkit.tk libgba.
The mappy code says this:
And I'm trying to convert it. This is what I have:
VisualBoyAdv tells me that it's going into Mode 0 alright, BG0 is on (But the others appear to be on as well). The map is 256x256. It says that it's in 16 colour mode which is wrong. And I can't figure out how to set the CHAR_BASE(m) properly so that it sets it to 0x6004000. VBA says that it's 0x6000000.
In general, I'm confused :) What should I have there?
The mappy code says this:
Code: |
DISPCNT = DISP_MODE (0);
BG0CNT = BG_CHARBASE_0x06004000 | BG_COLOUR_256 | BG_TEXT_32x32 | BG_MAPBASE(0x0000); |
And I'm trying to convert it. This is what I have:
Code: |
SetMode( MODE_0 | BG0_ON | BG_256_COLOR | BG_SIZE_0 );
while (1) { VBlankIntrWait();} // loop forever |
VisualBoyAdv tells me that it's going into Mode 0 alright, BG0 is on (But the others appear to be on as well). The map is 256x256. It says that it's in 16 colour mode which is wrong. And I can't figure out how to set the CHAR_BASE(m) properly so that it sets it to 0x6004000. VBA says that it's 0x6000000.
In general, I'm confused :) What should I have there?