From 3fa268e2cdd8233255a96efdd83f01b3b9f0ffc4 Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Thu, 22 Feb 2024 12:58:52 -0700 Subject: [PATCH] Set display mode and busy-loop VSync --- src/main.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 061ed7e..8bc0298 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,18 @@ +#include + int main(void) { + // Mode 3-5 are bitmap modes. + // 3: 240x160 @ 16bpp N page-flip + // 4: 240x160 @ 8bpp Y page-flip + // 5: 160x128 @ 16bpp Y page-flip + // + // BG2 is the only available background in bitmap modes. + REG_DISPCNT = DCNT_MODE3 | DCNT_BG2; + + while (true) { + // Busy-loop VSync, should be replaced with an interrupt. + vid_vsync(); + } + return 0; }