Family 1 (Text) · rung 1.1 — print a string with the built-in font. More...
#include <snes.h>Functions | |
| int | main (void) |
| Entry point – initialize text module and display a test string. | |
Family 1 (Text) · rung 1.1 — print a string with the built-in font.
The gentlest possible program that still exercises the whole SNES rhythm (tiles + palette + VRAM + VBlank). textModeInit() sets up the hardware and the text engine in one call, textPrintAt() writes into an off-screen buffer, and the NMI handler DMAs that buffer to VRAM as a tilemap on the next VBlank — no manual flush needed. One string, on BG1, in Mode 0. This is the first rung of the Text ladder; the under-the-hood version (a glyph as raw 2bpp bitplanes) lives in examples/fundamentals/text_glyphs.
| 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.