#include "BG1.inc"
#include "BG2.inc"
#include "BG3.inc"
int main(void)
{
bgInitTileSet(0, &BG1_til, &BG1_pal, 2, (&BG1_tilend - &BG1_til), 16 * 2, BG_16COLORS, 0x2000);
bgInitTileSet(1, &BG2_til, &BG2_pal, 4, (&BG2_tilend - &BG2_til), 16 * 2, BG_16COLORS, 0x3000);
bgInitTileSet(2, &BG3_til, &BG3_pal, 0, (&BG3_tilend - &BG3_til), 4 * 2, BG_4COLORS, 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 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)
Waits for a 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.