X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2Facesskernel_src%2Fmain.c;h=363fea1f7946c6bba67682b69920a72cd611f656;hb=a2b49f92646ef666e17172faf72a9dcc0d18942a;hp=09e09dc4b5b21539382073e80b617807f4cc1adf;hpb=602ba046995f564d8ca4b85c873cbfcafed72d42;p=tpg%2Facess2.git diff --git a/AcessNative/acesskernel_src/main.c b/AcessNative/acesskernel_src/main.c index 09e09dc4..363fea1f 100644 --- a/AcessNative/acesskernel_src/main.c +++ b/AcessNative/acesskernel_src/main.c @@ -6,10 +6,56 @@ */ #include #include -#include +// === 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); +extern int VFS_Mount(const char *Device, const char *MountPoint, const char *Filesystem, const char *Options); +extern int SyscallServer(void); + +// === GLOBALS === +const char *gsAcessDir = "../Usermode/Output/i386"; + +// === CODE === int main(int argc, char *argv[]) { + // Parse command line settings + + // Start UI subsystem + UI_Initialise(800, 480); + + // Initialise VFS + VFS_Init(); + // - Start IO Drivers + Video_Install(NULL); + NativeKeyboard_Install(NULL); + NativeFS_Install(NULL); + // - Start VTerm + { + char *args[] = { + "Video=NativeVideo", + "Input=NativeKeyboard", + NULL + }; + VT_Install(args); + } + + VFS_Mount(gsAcessDir, "/Acess", "nativefs", ""); + + Debug_SetKTerminal("/Devices/VTerm/8"); + + // Start syscall server + // - Blocks + SyscallServer(); + return 0; } +void AcessNative_Exit(void) +{ + // TODO: Close client applications too + exit(0); +}