My code is based on http://www.dev-scene.com/NDS/Tutorials_Day_5.
Here is the simplified version, nothing shows up.
Code: Select all
consoleDemoInit();
videoSetMode(MODE_0_2D);
vramSetPrimaryBanks(VRAM_A_MAIN_SPRITE, VRAM_B_LCD, VRAM_C_LCD, VRAM_D_LCD);
oamInit(&oamMain, SpriteMapping_Bmp_1D_128, false);
u16 *gfx = oamAllocateGfx(&oamMain, SpriteSize_32x32, SpriteColorFormat_256Color);
dmaCopy(tile_data, gfx, sizeof(tile_data));
dmaCopy(palette, SPRITE_PALETTE, sizeof(palette));
while(1) {
scanKeys();
oamSet(&oamMain, 0, 64, 32, 0, 0, SpriteSize_32x32, SpriteColorFormat_256Color, gfx, 0, false, false, false, false, false);
oamUpdate(&oamMain);
swiWaitForVBlank();
}