KERNEL_OBJ += vfs/fs/root.o vfs/fs/devfs.o\r
KERNEL_OBJ += drv/vterm.o drv/fifo.o drv/proc.o\r
\r
-OBJ := main.o threads.o video.o keyboard.o mouse.o nativefs.o vfs_handle.o\r
+OBJ := main.o helpers.o threads.o video.o keyboard.o mouse.o nativefs.o vfs_handle.o\r
OBJ += $(addprefix $(KERNEL_SRC),$(KERNEL_OBJ))\r
\r
OBJ := $(addsuffix .$(PLATFORM),$(OBJ))\r
--- /dev/null
+/*
+ * Acess2 Native Kernel
+ * - Acess kernel emulation on another OS using SDL and UDP
+ *
+ * Kernel Main
+ */
+#include <acess.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/time.h>
+
+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");
+}
+
+void Panic(const char *Format, ...)
+{
+ va_list args;
+ printf("Panic: ");
+ va_start(args, Format);
+ vprintf(Format, args);
+ va_end(args);
+ printf("\n");
+ exit(-1);
+}
+
+void Debug_SetKTerminal(const char *Path)
+{
+ // Ignored, kernel debug goes to stdout
+}
+
+void *Heap_Allocate(int Count, const char *File, int Line)
+{
+ return malloc(Count);
+}
+
+tPAddr MM_GetPhysAddr(tVAddr VAddr)
+{
+ return VAddr; // HACK!
+}
+
+Uint MM_GetFlags(tVAddr VAddr)
+{
+ return 0;
+}
+
+int Modules_InitialiseBuiltin(const char *Name)
+{
+ return 0; // Ignored
+}
+
+Sint64 now(void)
+{
+ struct timeval tv;
+ struct timezone tz;
+ gettimeofday(&tv, &tz);
+ return tv.tv_sec * 1000 + tv.tv_usec/1000;
+}
+
*
* Kernel Main
*/
-#include <acess.h>
#include <stdio.h>
#include <stdlib.h>
-#include <sys/time.h>
+#include <SDL/SDL.h>
int main(int argc, char *argv[])
{
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");
-}
-
-void Panic(const char *Format, ...)
-{
- va_list args;
- printf("Panic: ");
- va_start(args, Format);
- vprintf(Format, args);
- va_end(args);
- printf("\n");
- exit(-1);
-}
-
-void Debug_SetKTerminal(const char *Path)
-{
- // Ignored, kernel debug goes to stdout
-}
-
-void *Heap_Allocate(int Count, const char *File, int Line)
-{
- return malloc(Count);
-}
-
-tPAddr MM_GetPhysAddr(tVAddr VAddr)
-{
- return VAddr; // HACK!
-}
-
-Uint MM_GetFlags(tVAddr VAddr)
-{
- return 0;
-}
-
-int Modules_InitialiseBuiltin(const char *Name)
-{
- return 0; // Ignored
-}
-
-Sint64 now(void)
-{
- struct timeval tv;
- struct timezone tz;
- gettimeofday(&tv, &tz);
- return tv.tv_sec * 1000 + tv.tv_usec/1000;
-}
-
--- /dev/null
+/**
+ */
+#ifndef _NATIVE_SYSCALLS_H_
+#define _NATIVE_SYSCALLS_H_
+
+enum eSyscalls {
+ SYS_NULL,
+ SYS_OPEN
+};
+
+enum eArgumentTypes {
+ ARG_TYPE_VOID,
+ ARG_TYPE_INT32,
+ ARG_TYPE_INT64,
+ ARG_TYPE_STRING,
+ ARG_TYPE_DATA
+};
+
+#define ARG_DIR_TOSRV 0x10
+#define ARG_DIR_TOCLI 0x20
+#define ARG_DIR_BOTH 0x30
+
+#endif