extern char patpvsneslib, patpvsneslib_end;
extern char patshader, patshader_end;
extern char palpvsneslib, palpvsneslib_end, palshader, palshader_end;
extern char mappvsneslib, mappvsneslib_end;
extern char mapshader, mapshader_end;
short scrX = 0, scrY = 0;
unsigned short pad0, move;
int main(void)
{
bgInitTileSet(1, &patpvsneslib, &palpvsneslib, 0, (&patpvsneslib_end - &patpvsneslib), 16 * 2, BG_16COLORS, 0x5000);
bgInitTileSet(0, &patshader, &palshader, 1, (&patshader_end - &patshader), 16 * 2, BG_16COLORS, 0x4000);
bgInitMapSet(1, &mappvsneslib, (&mappvsneslib_end - &mappvsneslib), SC_32x32, 0x1400);
bgInitMapSet(0, &mapshader, (&mapshader_end - &mapshader), SC_32x32, 0x1800);
while (1)
{
scrX++;
scrY++;
}
return 0;
}
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void bgSetScroll(u8 bgNumber, u16 x, u16 y)
Sets the scroll hardware to the specified location.
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 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.