Page 1 of 2

Getting started

Posted: Fri Jun 05, 2009 11:58 pm
by flyingdoodltartz
Hey guys, i have been in a very creative mood lately and really want to build my own os. My usual programming is making homebrew games for sony's psp (most people shoot all my projects down just cuz im only 14 (age-ist retards)), but i want to take a shot at something a bit bigger. I decided to write my own programming language (you would love it :D), but then i wanted to go even bigger than that. So here i am, I understand c++ and pointers, classes, structures, variables, blah blah blah and my fair share of assembly also. I just need to know where to start. Like how to compile the files into an .iso computer i can boot to my computer from a cd. I have a decent test machine with absolutely no os on it, and frankly it sux so horribly that no os i try will work on it (it's ancient and never came with a preinstalled os). this made me think, hey, why not write my own. Anyways, if someone could maybe point me to a nice tutorial on creating a simple hello world os or something i would love you forever. I really want to tackle this. thanks in advance.

regards,

Teddy.

Re: Getting started

Posted: Sat Jun 06, 2009 1:25 am
by JackScott
Main Page - Our Wiki
JamesM's tutorials
Bran's tutorials

Those are your three most popular links to beginner tutorials. Our wiki, of course, is an ever-expanding treasure trove of low-level programming goodness.

Welcome, and good luck with your kernel!

Re: Getting started

Posted: Sat Jun 06, 2009 2:05 am
by flyingdoodltartz
thanks, man, found the wiki xD. i feel like such an idiot for making this topic with the wiki their and all, i just never saw it before... and thanks, ill need the luck ;). already got a simple hello world os up and running :). thanks.

regards

teddy

Re: Getting started

Posted: Sat Jun 06, 2009 2:18 am
by skyking
I recommend that you consider the boot method and how that fits into your development cycle and available tools. I don't say that booting from CD is a bad choice, but unless you can easily create CD images and burn CDs it's a bad choice since you will repeat that procedure many times (consequently you will want to use CD R/W discs :wink:). If you're using linux you could use mkisofs to create the iso image (which makes it possible to batch compile and generate the ISO). I think you can use the ISO image together with an emulator also so you don't have to go through the burn and reboot cycle every time you want to try your changes.

There does not seem to be any information on either CD reading or ISO format on the wiki - you have to find it elsewhere (I guess you want your OS to read from the CD after you've booted).

Re: Getting started

Posted: Sat Jun 06, 2009 3:03 am
by computafreak
Bochs and Virtual PC will both boot from ISO images. To generate the ISO image on Windows under Cygwin, it's possible to use genisoimage. I think Combuster has a page about reading the file system on his user page on the wiki, and this page contains the file and directory structures which can be read from the ISO image (assuming it uses the ISO 9660 file system, I think it can also use UDF, but this is backwards compatible apparently)

Re: Getting started

Posted: Sat Jun 06, 2009 6:23 am
by mathematician
flyingdoodltartz wrote:thanks, man, found the wiki xD. i feel like such an idiot for making this topic with the wiki their and all, i just never saw it before... and thanks, ill need the luck ;). already got a simple hello world os up and running :). thanks.

regards

teddy
http://visopsys.org/osdev/index.html
http://www.osdever.net/
http://www.nondot.org/sabre/os/articles
http://www.acm.uiuc.edu/sigops/roll_your_own/

Your sure to need this during the early stages:
http://www.ctyme.com/rbrown.htm

Especially this bit:
http://www.ctyme.com/intr/int.htm

Re: Getting started

Posted: Sat Jun 06, 2009 9:18 am
by alethiophile
To make a bootable ISO, I would recommend (on Linux, I don't know how on Windows) using mkisofs on the right files, losetuping the resulting ISO file to some loop device, then dd your 512-byte bootloader to that loop device (overwrites only the first sector).

Re: Getting started

Posted: Sat Jun 06, 2009 9:33 am
by xDDunce
IIRC, mkisofs has a windows binary too. Back when I was using Window$, I was using it to make my bootable cd's. I don't have a direct link, but google is your friend.

Good luck,
and happy programming!
James.

Re: Getting started

Posted: Sat Jun 06, 2009 2:59 pm
by flyingdoodltartz
wow thanks guys, you really are a great help. btw, im on linux and the reason i want to do cd's is cuz im on a laptop which doesn't have a floppy drive sadly (parents didn't want to buy me a desktop). And you can dd files to a cd??? i didn't know that :D. thanks again for your help.

EDIT: and also, thanks mathematician for the interrupts table :D. there's so many o_O.

Re: Getting started

Posted: Sat Jun 06, 2009 4:06 pm
by JamesM
flyingdoodltartz wrote:wow thanks guys, you really are a great help. btw, im on linux and the reason i want to do cd's is cuz im on a laptop which doesn't have a floppy drive sadly (parents didn't want to buy me a desktop). And you can dd files to a cd??? i didn't know that :D. thanks again for your help.

EDIT: and also, thanks mathematician for the interrupts table :D. there's so many o_O.
Best plan to start with is to use an emulator. Bochs or qemu both work very well, and of course emulate floppy drives. Just create and feed it an image.

Re: Getting started

Posted: Sat Jun 06, 2009 4:15 pm
by Brynet-Inc
flyingdoodltartz wrote:And you can dd files to a cd??? i didn't know that :D. thanks.
No.

Re: Getting started

Posted: Sat Jun 06, 2009 4:34 pm
by flyingdoodltartz
awe.... oh well. sigh.

Re: Getting started

Posted: Sat Jun 06, 2009 10:56 pm
by alethiophile
awe.... oh well. sigh.
You can't dd directly to the device, as you can with a floppy (as far as I know). However, you can make an ISO file, containing whatever data you want, and burn it using something like cdrecord/wodim. It works basically the same way.

Re: Getting started

Posted: Sat Jun 06, 2009 11:19 pm
by flyingdoodltartz
well, i kind of gave up on the cd things :(. now i am trying to get a virtual floppy drive at /dev/fd0 for my bochs to work right (i tried mounting a virtual floppy in a directory i made myself, but it doens't work correctly.) but no matter how hard i google, i just can't find a floppy emulator for linux, they're all for windows. so for now ill just have to code without testing... i got it to work on my other windows desktop using bochs for windows and vfd and partcopy, but i want to do the deving on this laptop which has linux.

Re: Getting started

Posted: Sat Jun 06, 2009 11:48 pm
by kop99
bochs can boot with binary file like floppy image.