LukeGoule / tinsel-os

v-os but cooler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tinsel-os

A re-write of v-os, just done to higher standards.

Update 7/3/2021

I added some super basic standard library functions for C++ and got them working quite neatly. I still need to go through as many types like const short as I can think of, but other than that it's nicer to output to terminal using std::cout << "Hello" << std::endl; over printf("Hello\n");.

There are modifiers defined in stdio.h & stdio.cpp which all follow the same format to accomplish the std::endl, it's a damn shame the source for the standard libraries isn't quickly available on the internet:

std::ostream& std::<Function Name Here>(std::ostream& os)
{
    // Do something i.e. printf or write file
    return os; // Always return the reference to std::cout!
}

Other than that and a code rollback to get the keyboard input working, nothing much more has changed.

Notes:

  • Getting the ATA "driver" working was pretty cool. It can now read files from an ext2 formatted hard disk image. I moved to VirtualBox over Qemu for this since I couldn't get Qemu to emulate an IDE device. (Here's a link to the hard drive image I created: https://anonfile.com/j7F1daF0nd/ext2-4_vdi). Currently this OS has no practical application and I don't think it ever will since I don't want to waste time creating some SCSI driver. IDE is fine for now. Code samples from other GitHub projects have been used to create the ext2 and ide drivers since I didn't know what I was doing properly.

  • The mouse cursor, which is a single pixel, is not very complicated and just a proof of concept. Currently it can't do anything besides be seen on the screen, which unfortunately isn't very interesting. I added IRQs based on some old code I have and what's on osdev wiki - these work flawlessly as far as I can see.

  • Use help to view a list of the commands. Feel free to add your own commands! It's not hard as I've written a basic command handler system to simplify the process of processing commands. (see src/shell_cmd.c and include/shell_cmd.h)

  • The memory manager that I've written is not good. I've made a best guess as to where nothing on the system will be using memory, but that's really not good enough. The functions kmalloc and kfree do work, however, so for this purpose it works as intended. It also tracks "blocks" of memory which really should just be called structures to what's being used where, since the size of a "block" is not predetermined.

Images:

Most recent:

First screenshot of it working:

PS:

This is meant to be a personal project for understanding modern computer systems, not a completely functioning OS that does everything a kernel like Linux or NT or OSX can, so please don't judge me for practising extremely bad OS programming or bad methods of doing things.

About

v-os but cooler

License:The Unlicense


Languages

Language:C 65.6%Language:C++ 32.5%Language:Makefile 1.0%Language:Assembly 0.9%