Lots of work on the AcessNative kernel
[tpg/acess2.git] / AcessNative / acesskernel_src / main.c
index 45e6aa0..7de6bf9 100644 (file)
@@ -6,47 +6,48 @@
  */
 #include <stdio.h>
 #include <stdlib.h>
-#include <SDL/SDL.h>
 
+// === IMPORTS ===
+extern int     UI_Initialise(int Width, int Height);
+extern int     VFS_Init(void);
+extern int     Video_Install(char **Arguments);
+extern int     NativeKeyboard_Install(char **Arguments);
+extern int     VT_Install(char **Arguments);
+
+// === CODE ===
 int main(int argc, char *argv[])
 {
+       // Parse command line settings
+       
+       // Start UI subsystem
+       UI_Initialise(640, 480);
+       
+       // Initialise VFS
+       VFS_Init();
+       // - Start IO Drivers
+       Video_Install(NULL);
+       NativeKeyboard_Install(NULL);
+       // - Start VTerm
+       {
+               char    *args[] = {
+                       "Video=NativeVideo",
+                       "Input=NativeKeyboard",
+                       NULL
+                       };
+               VT_Install(args);
+       }
+       
+       // Start syscall server
+       for( ;; )
+       {
+               UI_Redraw();
+       }
+       
        return 0;
 }
 
-void LogF(const char *Fmt, ...)
-{
-       va_list args;
-       va_start(args, Fmt);
-       vprintf(Fmt, args);
-       va_end(args);
-}
-
-void Log(const char *Fmt, ...)
-{
-       va_list args;
-       printf("Log: ");
-       va_start(args, Fmt);
-       vprintf(Fmt, args);
-       va_end(args);
-       printf("\n");
-}
-
-void Warning(const char *Fmt, ...)
-{
-       va_list args;
-       printf("Warning: ");
-       va_start(args, Fmt);
-       vprintf(Fmt, args);
-       va_end(args);
-       printf("\n");
-}
-
-int CheckMem(void *Mem, int Count)
-{
-       return 1;
-}
-
-int CheckString(const char *String)
+void AcessNative_Exit(void)
 {
-       return 1;
+       // TODO: Close client applications too
+       exit(0);
 }

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