PVSnesLib  4.3.0
Documentation to code in C or ASM for the Nintendo SNES
debug/debug.c
/*---------------------------------------------------------------------------------
Simple debug demo
-- alekmaul
---------------------------------------------------------------------------------*/
#include <snes.h>
//---------------------------------------------------------------------------------
int main(void)
{
// Initialize SNES
// Draw a wonderful text :P
consoleNocashMessage("JUST COUNT VBL\r");
// Now Put in 16 color mode and disable Bgs except current
setMode(BG_MODE1, 0);
// Wait for nothing :P
while (1)
{
consoleNocashMessage("COUNTER=%04u\r\n", (u16)snes_vblank_count);
}
return 0;
}
void bgSetDisable(u8 bgNumber)
Disable a BG in the actual SNES mode.
void consoleNocashMessage(char *fmt,...)
Send a message to the no$sns debug window.
u16 snes_vblank_count
Number of VBL since consoleInit called (16 bits longs so reset each 18 minutes in NTSC)
void consoleInit(void)
Initialize console.
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.