Text module validation using textInit / textLoadFont / textPrintAt. More...
#include <snes.h>Functions | |
| int | main (void) |
| Entry point – initialize text module and display a test string. | |
Text module validation using textInit / textLoadFont / textPrintAt.
Exercises the OpenSNES text module, which provides a built-in ASCII font and a buffered tilemap writer. The module maintains an off-screen text buffer; every text writer (textPutChar, textPrint, textPrintAt, ...) sets a dirty flag and the NMI handler DMAs the buffer to VRAM during the next VBlank — no manual flush call is needed. This example loads the default font into VRAM, prints a single string, and displays it on BG1 in Mode 0.
| int main | ( | void | ) |
Entry point – initialize text module and display a test string.
Demonstrates the OpenSNES text module workflow: textModeInit() sets up hardware + the text engine in one call, textPrintAt() writes characters into the off-screen buffer, and the NMI handler DMAs the buffer to VRAM as a tilemap during the next VBlank. A WaitForVBlank() before setScreenOn() ensures all VRAM writes complete during blanking, preventing PPU corruption on the first frame.