3f152efaca6b5e4a4ea8c18a04cf12f6989ec1e7
[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 extern int      SyscallServer(void);
17
18 // === CODE ===
19 int main(int argc, char *argv[])
20 {
21         // Parse command line settings
22         
23         // Start UI subsystem
24         UI_Initialise(640, 480);
25         
26         // Initialise VFS
27         VFS_Init();
28         // - Start IO Drivers
29         Video_Install(NULL);
30         NativeKeyboard_Install(NULL);
31         // - Start VTerm
32         {
33                 char    *args[] = {
34                         "Video=NativeVideo",
35                         "Input=NativeKeyboard",
36                         NULL
37                         };
38                 VT_Install(args);
39         }
40         
41         // Start syscall server
42         // - Blocks
43         SyscallServer();
44         
45         return 0;
46 }
47
48 void AcessNative_Exit(void)
49 {
50         // TODO: Close client applications too
51         exit(0);
52 }

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