186 int sprintf(
char *buf,
const char *fmt, ...);
snes background defines and functionality.
u16 rand(void)
return a randomized number
u8 snes_fps
50 if PAL console (50 Hz) or 60 if NTSC console (60Hz)
void consoleSetTextVramAdr(u16 vramfont)
Change text graphics address (4K aligned)
void consoleNocashMessage(char *fmt,...)
Send a message to the no$sns debug window.
void consoleCopySramWithOffset(u8 *source, u16 size, u16 offset)
Send data to SRAM with offset.
void consoleDrawTextMapCenter(u16 y, u16 *map, u8 attributes, char *fmt,...)
Output formatted string on a screen, centered it (2 colors tiles mode)
void consoleInitText(u8 palnum, u8 palsize, u8 *tilfont, u8 *palfont)
Initialize the Text System.
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.
u8 scr_txt_dirty
flag to redraw text during vblank
void consoleDrawText(u16 x, u16 y, char *fmt,...)
Output formatted string on a screen (tiles mode)
void consoleMesenBreakpoint()
Execute the special WDM opcode which Mesen can break on.
void consoleSetTextPal(u8 palnum, u8 *palfont, u8 palsize)
Change text font palette.
void consoleUpdate(void)
Update current text buffer on screen.
void consoleSetTextOffset(u16 offsetfont)
Change text Background map address for display (must be BG address)
void consoleDrawTextMap(u16 x, u16 y, u8 *map, u8 attributes, char *fmt,...)
Output formatted string on a screen (2 colors tiles mode)
void consoleSetTextVramBGAdr(u16 offsetfont)
Change text Background map address for display (must be BG address)
void consoleLoadSram(u8 *dest, u16 size)
Load data from SRAM.
void consoleCopySram(u8 *source, u16 size)
Send data to SRAM.
u8 scr_txt_font_map[0x800]
tilemap used for text display
u16 consoleRegionIsOK(void)
Check compatibility between console (NTSC/PAL) and cartridge (country)
void consoleLoadSramWithOffset(u8 *dest, u16 size, u16 offset)
Load data from SRAM with offset.
u8 snes_50hz
1 if on a PAL/50Hz SNES
Wrapper functions for direct memory access hardware.
Custom types used by libsnes.
snes sprites functionality.
contains the basic definitions for controlling the video hardware.