Set display mode and busy-loop VSync

This commit is contained in:
Madeline Busig 2024-02-22 12:58:52 -07:00
parent 6af1386772
commit 3fa268e2cd

View File

@ -1,3 +1,18 @@
#include <tonc.h>
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;
}