Debian Codegraph @

tools/ds_tests/twltouch/arm9/source/template.c

raw
1 /*---------------------------------------------------------------------------------
2
3 Simple console print demo
4 -- dovoto
5
6 ---------------------------------------------------------------------------------*/
7 #include <nds.h>
8 #include <stdio.h>
9
10 //---------------------------------------------------------------------------------
11 int main(void) {
12 //---------------------------------------------------------------------------------
13 u32 *ptr = (u32*)0x02400000;
14
15 consoleDemoInit(); //setup the sub screen for printing
16
17 printf("twltouch\n");
18 swiWaitForVBlank();
19
20 while(1) {
21
22 DC_InvalidateRange(ptr, 0x10);
23 iprintf("\x1b[10;0H%x, x = %04i, y = %04i\n", ptr[0], ptr[1], ptr[2]);
24
25 swiWaitForVBlank();
26 scanKeys();
27 if (keysDown()&KEY_START) break;
28 }
29
30 return 0;
31 }