extern char patterns, patterns1;
extern char palette;
extern char map, map_end;
int main(void)
{
unsigned short pad0, pad1 = 0;
unsigned char gradient = 15;
bgInitTileSet(0, &patterns, &palette, 0, 0x8000, 256 * 2, BG_256COLORS, 0x1000);
while (1)
{
{
gradient = (gradient - 1) & 15;
if (gradient == 1)
gradient = 15;
}
}
return 0;
}
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void bgInitMapSet(u8 bgNumber, u8 *mapSource, u16 mapSize, u8 sizeMode, u16 address)
Initializes a Map Set and loads it into SNES VRAM.
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 setModeHdmaGradient(u8 maxLevels)
Do a brightness gradient on screen. Use HDMA Channels 3.
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.