Connecting to the Monitor

Aug 22, 2010 at 5:16am
Okay, so I want to write an operating system... Woah! Yeah I know, my current problem is connecting to the monitor. I want to make a function that automatically finds the monitor device and can draw pixels to it. Do monitors require drivers or something? Despite my hours of research, I haven't found much on this subject, to be honest. Any programming veterans ready to help me out?


Help is very appreciated. Thank you.
Aug 22, 2010 at 7:29am
I once looked into OS development, but it looked intimidating...

http://www.brokenthorn.com/Resources/OSDev0.html

I think that's the tutorial I looked at before. There's a ton of ASM that you need to get over with before you can even look at C or C++, which was the main reason I quit. Page 10 goes over how to print characters to the screen, and briefly covers the VGA system, though doesn't give a working example.

A very, VERY important thing to remember is to ALWAYS use a virtual computer. Otherwise, if you mess up, you could very easily destroy your hard drive, among other things.
Last edited on Aug 22, 2010 at 7:52am
Aug 22, 2010 at 2:38pm
I have a laptop that I'm willing to loose and test on. But thanks, how can I run it on a virtual machine?
Aug 23, 2010 at 1:19am
First you'll need to download virtual machine software, something like VMWare. You'll also need to have a few other programs to set up a virtual floppy drive, put the bootloader in the first sector, etc. The tutorial gives you everything you should download.
Aug 23, 2010 at 3:17pm
I want to write an operating system... I want to make a function that automatically finds the monitor device and can draw pixels to it.
The two statements aren't in the same ball park. Are you sure you really want to write an OS?
Aug 23, 2010 at 3:36pm
I've done a little OS development for fun and learning purposes. It's far from easy - the learning curve is very steep - but it's incredibly rewarding.

This wiki will help you get started: http://wiki.osdev.org/Expanded_Main_Page
There is also this tutorial: http://jamesmolloy.co.uk/tutorial_html/index.html
And this one: http://www.osdever.net/bkerndev/Docs/title.htm
And the one that PiMaster posted. The first one is the one I used (although I like to take some code from the wiki and mix it up with my own and the code given in the tutorial, because some of the code on the wiki seems better to me).

There are more tutorials on osdever.net as well.

Necessary reading: http://wiki.osdev.org/Introduction http://wiki.osdev.org/Beginner_Mistakes http://wiki.osdev.org/Getting_Started

PiMaster wrote:
There's a ton of ASM

Not so! I have at most about 5 functions in ASM so far; most of the ASM is for things like interrupt handling and, of course, booting. There will be more

A very, VERY important thing to remember is to ALWAYS use a virtual computer. Otherwise, if you mess up, you could very easily destroy your hard drive, among other things.

I disagree. Certain things, like displaying pixels on a screen, have absolutely no chance of causing damage. It depends on what you're testing. However, I would recommend you make sure everything you've written so far actually works on a VM. Once it works and you can't see any damage to your virtual computer, then test on the real hardware. No emulator is as good as the real thing, although QEMU and VMWare are quite close.
Last edited on Aug 23, 2010 at 3:36pm
Aug 24, 2010 at 2:13am
Thanks everyone!
Topic archived. No new replies allowed.