diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 37 |
1 files changed, 8 insertions, 29 deletions
@@ -1,33 +1,12 @@ | |||
1 | #include <gba_console.h> | 1 | int main() |
2 | #include <gba_video.h> | 2 | { |
3 | #include <gba_interrupt.h> | 3 | *(unsigned int*)0x04000000 = 0x0403; |
4 | #include <gba_systemcalls.h> | ||
5 | #include <gba_input.h> | ||
6 | #include <stdio.h> | ||
7 | #include <stdlib.h> | ||
8 | 4 | ||
9 | //--------------------------------------------------------------------------------- | 5 | ((unsigned short*)0x06000000)[120+80*240] = 0x001F; |
10 | // Program entry point | 6 | ((unsigned short*)0x06000000)[136+80*240] = 0x03E0; |
11 | //--------------------------------------------------------------------------------- | 7 | ((unsigned short*)0x06000000)[120+96*240] = 0x7C00; |
12 | int main(void) { | ||
13 | //--------------------------------------------------------------------------------- | ||
14 | 8 | ||
9 | while(1); | ||
15 | 10 | ||
16 | // the vblank interrupt must be enabled for VBlankIntrWait() to work | 11 | return 0; |
17 | // since the default dispatcher handles the bios flags no vblank handler | ||
18 | // is required | ||
19 | irqInit(); | ||
20 | irqEnable(IRQ_VBLANK); | ||
21 | |||
22 | consoleDemoInit(); | ||
23 | |||
24 | // ansi escape sequence to set print co-ordinates | ||
25 | // /x1b[line;columnH | ||
26 | iprintf("\x1b[10;10HHello World!\n"); | ||
27 | |||
28 | while (1) { | ||
29 | VBlankIntrWait(); | ||
30 | } | ||
31 | } | 12 | } |
32 | |||
33 | |||