so i know that i could use osdev.org, but i want your guys opinion. so i wrote a kernel with this: http://www.jamesmolloy.co.uk/tutorial_html/index.html with the end result being a kernel, a vfs, and a mini api for writing to the monitor, some memory management, and some string operations. for the most part, i can understand what it is talking about. so now i want to move on. what should i do next?
I'd say the keyboard driver is the next easiest thing to do. After that maybe the mouse, and then graphics if you want to do graphics. A generic VGA driver is quite simple to implement. I'd say either the hard disk or the network stack are probably the hardest things to implement, but I can't be sure because I've not looked into either of them. Floppy disks are probably even more difficult than hard disks because you have to activate the motor before reading or writing, but you can't keep it constantly activated or it'll wear out (obviously motors are of no concern on virtual floppy disks). I think CD/DVD is probably a little easier but it's usually non-volatile, so you won't be able to save any data. I don't know about SSDs but I imagine they emulate hard disks. Finally, I've heard that the software-side of USB is very complicated in order to keep the hardware simple (the complexity was passed onto programmers so that engineers could be a little lazier).
To summarise, I'd recommend doing a keyboard driver. I've partially-implemented one that you can take a look at here if you want: https://github.com/ChrisSwinchatt/Redshift/tree/master/src/io - if you look at my US QWERTY keymap be warned that I'm not sure it's 100% correct and that it doesn't support extended keys. Also, this code is kind of (8-9 months) old and out of date.
@DTSCode I know this might seem as derailing your thread, but I think that it could help you.
My question is: Say I have designed my OS (like DTSCode has) and now I want to implement graphics (like DTSCode might) and I want to use my nVidia graphics card for graphics processing. However, due to nVidia's overly proprietary and private nature I cannot just make my own driver. How would I go about it?
so basically start with a keyboard driver then start implementing all drivers? and thanks for the code
I'd say so, and no problem. You could also work on scheduling (allowing you to make your kernel multithreaded) and executable loading (seeing as you've got a VFS; presumably you would be loading from an initial ramdisk). Scheduling algorithms are not very complicated, even ones which allow prioritisation. Executable loading is very easy if you only allow statically-linked executables; for Linux ELF you just find the start address and jump to it, preferably having checked that the file starts with the string "\7fELF".
Script Coder wrote:
Say I have designed my OS (like DTSCode has) and now I want to implement graphics (like DTSCode might) and I want to use my nVidia graphics card for graphics processing. However, due to nVidia's overly proprietary and private nature I cannot just make my own driver. How would I go about it?
You can write a generic graphics driver using just the VGA/VBE standards which will work on any PC-compatible hardware, but the problem is that the resolutions are very small, there's no hardware acceleration and you certainly can't get anything like OpenGL or CUDA. NVIDIA doesn't publish much in the way of documentation, but the open-source Linux NVIDIA driver Nouveau does have some reverse-engineered documentation, and it may even be possible to port Nouveau to your OS. It would definitely be a lot of work, but it'd certainly be easier than writing a 3D accelerated driver from scratch, and probably easier than writing your own based on the Nouveau project's reverse-engineered documentation.