Set display mode and busy-loop VSync
This commit is contained in:
parent
a2c3c6b92a
commit
7489fe4849
15
src/main.cpp
15
src/main.cpp
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user