JetaOS - DarkCPU
Soh as you guys might have heard, I've been trying to write a kernel for the DCPU.
Although I had to severely cut down on my studying, I spent all of today and yesterday building a kernel and it has actually come pretty far. I won't actually post the source code because I don't want my competitors (other 0x10c players) to jack it, but so far I've got:
Heap Management
Graphics (Text, I would implement interfacing directly with palette but the resolution is so small it would be useless.)
Timing module
Multi-threading
Executable Image Loader
UserInterface manager
Import\Export Tables, IE interprocess communication.
The only good that comes out of having an entire operating system stuck in the same address space is that it is so easy to communicate with other modules and plug in drivers etc...
Sometime this week (if I can find any time, which is highly unlikely) I am going to finish programming the shell application, then implement a file-system driver and finally start working on networking.
Here is a look at the kernel export table for now (and the structure of an image header)
Although I had to severely cut down on my studying, I spent all of today and yesterday building a kernel and it has actually come pretty far. I won't actually post the source code because I don't want my competitors (other 0x10c players) to jack it, but so far I've got:
Heap Management
Graphics (Text, I would implement interfacing directly with palette but the resolution is so small it would be useless.)
Timing module
Multi-threading
Executable Image Loader
UserInterface manager
Import\Export Tables, IE interprocess communication.
The only good that comes out of having an entire operating system stuck in the same address space is that it is so easy to communicate with other modules and plug in drivers etc...
Sometime this week (if I can find any time, which is highly unlikely) I am going to finish programming the shell application, then implement a file-system driver and finally start working on networking.
Here is a look at the kernel export table for now (and the structure of an image header)
Code:
kernel_image_header:
kernel_signature:
DAT PEIMAGE_SIGNATURE
kernel_header_next:
DAT 0xFFFF
kernel_name:
DAT "kernel", 0, 0, 0, 0
kernel_rva_ep:
DAT main
kernel_rva_import:
DAT kernel_import_table
kernel_rva_export:
DAT kernel_export_table
kernel_import_table:
DAT 0
DAT 0
kernel_export_table:
DAT memory_reserve ; 0
DAT memory_allocateMemory
DAT memory_freeMemory
DAT bitmap_set ; 3
DAT bitmap_clear
DAT bitmap_get
DAT graphics_writeString ; 6
DAT userInterfaceState_createState ; 7
DAT userInterfaceState_destroyState
DAT userInterfaceState_getVram
DAT userInterfaceState_setActive
DAT userInterfaceState_clearActiveState
DAT threading_createThread ;12
DAT threading_removeThread
DAT threading_lock
DAT threading_release
DAT peLoader_findModule ;16
DAT peLoader_create
DAT clock_getTicks ;18
DAT 0
