Lots of work on the AcessNative kernel
[tpg/acess2.git] / AcessNative / acesskernel_src / main.c
1 /*
2  * Acess2 Native Kernel
3  * - Acess kernel emulation on another OS using SDL and UDP
4  *
5  * Kernel Main
6  */
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 // === IMPORTS ===
11 extern int      UI_Initialise(int Width, int Height);
12 extern int      VFS_Init(void);
13 extern int      Video_Install(char **Arguments);
14 extern int      NativeKeyboard_Install(char **Arguments);
15 extern int      VT_Install(char **Arguments);
16
17 // === CODE ===
18 int main(int argc, char *argv[])
19 {
20         // Parse command line settings
21         
22         // Start UI subsystem
23         UI_Initialise(640, 480);
24         
25         // Initialise VFS
26         VFS_Init();
27         // - Start IO Drivers
28         Video_Install(NULL);
29         NativeKeyboard_Install(NULL);
30         // - Start VTerm
31         {
32                 char    *args[] = {
33                         "Video=NativeVideo",
34                         "Input=NativeKeyboard",
35                         NULL
36                         };
37                 VT_Install(args);
38         }
39         
40         // Start syscall server
41         for( ;; )
42         {
43                 UI_Redraw();
44         }
45         
46         return 0;
47 }
48
49 void AcessNative_Exit(void)
50 {
51         // TODO: Close client applications too
52         exit(0);
53 }

UCC git Repository :: git.ucc.asn.au