extern char BG1_tiles, BG1_tiles_end;
extern char BG1_pal, BG1_pal_end;
extern char BG1_map, BG1_map_end;
extern char BG2_tiles, BG2_tiles_end;
extern char BG2_pal, BG1_pal_end;
extern char BG2_map, BG1_map_end;
extern char BG3_tiles, BG3_tiles_end;
extern char BG3_pal, BG3_pal_end;
extern char BG3_map, BG3_map_end;
int main(void)
{
bgInitTileSet(0, &BG2_tiles, &BG1_pal, 2, (&BG2_tiles_end - &BG2_tiles), 16 * 2, BG_16COLORS, 0x2000);
bgInitTileSet(1, &BG1_tiles, &BG2_pal, 4, (&BG1_tiles_end - &BG1_tiles), 16 * 2, BG_16COLORS, 0x3000);
bgInitTileSet(2, &BG3_tiles, &BG3_pal, 0, (&BG3_tiles_end - &BG3_tiles), 4 * 2, BG_16COLORS, 0x4000);
setMode(BG_MODE1, BG3_MODE1_PRIORITY_HIGH);
while (1)
{
}
return 0;
}
void bgSetMapPtr(u8 bgNumber, u16 address, u8 mapSize)
Change Background Map address.
void bgInitTileSet(u8 bgNumber, u8 *tileSource, u8 *tilePalette, u8 paletteEntry, u16 tileSize, u16 paletteSize, u16 colorMode, u16 address)
Initializes a Tile Set and Loads the Tile GFX into VRAM.
void consoleInit(void)
Initialize console.
void dmaCopyVram(u8 *source, u16 address, u16 size)
copy data from source to destination using channel 0 of DMA available channels in half words
void WaitForVBlank(void)
Wait for vblank interrupt
the master include file for snes applications.
void setScreenOn(void)
Put screen On.
void setMode(u8 mode, u8 size)
Set the SNES hardware to operate in new display mode.