Making a GUI

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Making a GUI

Post by djnorthyy »

Hi,

I have followed the tutorial at

http://www.osdever.net/bkerndev/index.php

and now I want to put a GUI on it!

Has anyone got any help on this topic?

Many Thanks!
Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post by Brynet-Inc »

There is a lot more about OS development you'll want to learn, Having a simple kernel with GUI on top is not going to be very useful.

I advise you to read the OSDev Wiki..

OS Development is not easy, Understanding the hardware you're programming on is highly recommended. Downloading hardware specifications and reading technical manuals will be beneficial, Reviewing peoples projects and the topics on the forum will help you get the gist of things.

http://www.osdev.org/wiki/Main_Page

Taking notice to the OS development category..

Asking silly questions like "How do I put a GUI on my OS" is frowned upon.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Brynet-Inc wrote:OS Development is not easy
Actually, it is. Doing it well is the difficult part.

As for a GUI. It's very difficult to create a GUI without a working file system, disk access, mouse drivers, etc. Which is why you're going to need those first. I would suggest you to work on memory management, however, before any of that. After that, try scheduling. Following that work your way to floppy drivers, then hard drivers, etc.

Good Luck!

PS: You will need the Intel\AMD manuals. :wink:
C8H10N4O2 | #446691 | Trust the nodes.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

Alboin wrote:
Brynet-Inc wrote:OS Development is not easy
Actually, it is. Doing it well is the difficult part.
Depends on your definition... I class OS development as doing it properly/well, not as doing some **** that just happens to boot cause some tutorial told them exactly how to do it. So OS Development is a hard topic... as is CompilerDevelopment, despite it being easy to write a simple parser that outputs machine code... etc etc.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Tyler wrote:
Alboin wrote:
Brynet-Inc wrote:OS Development is not easy
Actually, it is. Doing it well is the difficult part.
Depends on your definition... I class OS development as doing it properly/well, not as doing some **** that just happens to boot cause some tutorial told them exactly how to do it. So OS Development is a hard topic... as is CompilerDevelopment, despite it being easy to write a simple parser that outputs machine code... etc etc.
Creating a simple DOS clone in real mode is easy, but creating a Linux clone is more difficult. Both are osdev. Even though the Linux clone is more useful than the DOS clone, they are both operating systems nonetheless, Therefore, osdev may be easy and difficult.
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Sorry!

Post by djnorthyy »

Look sorry for posting a stupid question, but i am very new to these forms!

:( :?

Harry.
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Don't worry about it. 8)

We're just here to help.
C8H10N4O2 | #446691 | Trust the nodes.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

Alboin wrote:
Tyler wrote:
Alboin wrote: Actually, it is. Doing it well is the difficult part.
Depends on your definition... I class OS development as doing it properly/well, not as doing some **** that just happens to boot cause some tutorial told them exactly how to do it. So OS Development is a hard topic... as is CompilerDevelopment, despite it being easy to write a simple parser that outputs machine code... etc etc.
Creating a simple DOS clone in real mode is easy, but creating a Linux clone is more difficult. Both are osdev. Even though the Linux clone is more useful than the DOS clone, they are both operating systems nonetheless, Therefore, osdev may be easy and difficult.
A DOS Clone is not an operating system by todays standards though. Back in its day it was the best for the time it took and how efficient it was given there far worse PC Architecture... writing a clone as efficient would be no quick task for a single developer.

I still wouldn't class that as OS Development though. That is like someone studying biology from 200 years ago and taking a test in it today. You would fail because that is no longer biology.
Last edited by Tyler on Tue Apr 10, 2007 2:30 pm, edited 1 time in total.
INF1n1t
Member
Member
Posts: 60
Joined: Fri Dec 22, 2006 5:32 pm
Location: Somewhere Down...

Re: Making a GUI

Post by INF1n1t »

djnorthyy wrote:Hi,

I have followed the tutorial at

http://www.osdever.net/bkerndev/index.php

and now I want to put a GUI on it!

Has anyone got any help on this topic?

Many Thanks!
Harry.
One thing I know: don't do GUI, before you're done with the os. Memory Management, Processes, I/O, so many things are waiting and they have higher priority than the GUI.
What you might want to do now, is to create a simple console: just to help yourself with the testing (like you're in protected mode 80x25 and you print stuff)...functions like print_char, get_char, inportb, outportb to help you work with your keyboard. For now, your console is there, just because you need it, not because the future users need it.
And that's my design idea: I'm now in protected mode with paging and I'm writing the console, to help me with multitasking and paging and all kind of cool stuff.

Is it hard or easy to create an OS: I think it's hard. The coding itself is not hard (I mean when you develop the OS and code things to make it work properly). You just write code and there is no phylosophy there. BUT! As it was said before, the hard thing is that you need to read manuals, documentation and think. When you read them, you have to think about what you read and make changes in your os's design. And when you get a clear picture about EVERYTHING (I mean really EVERYTHING) you should start coding. And if you understand everything, it's not hard to code it.

Also, if you have the OS developed, hard thing is to make programs for it. It just takes time to create new programs for your OS and of course it takes time and health to support that OS. It's not about coding, it's about coding + supporting.

That's what I think, no matter you define it as right or wrong!
I think, I have problems with Bochs. The biggest one: Bochs hates me!
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

Tyler wrote:A DOS Clone is not an operating system by todays standards though. Back in its day it was the best for the time it took and how efficient it was given there far worse PC Architecture... writing a clone as efficient would be no quick task for a single developer.

I still wouldn't class that as OS Development though. That is like someone studying biology from 200 years ago and taking a test in it today. You would fail because that is no longer biology.
Have we forgotten that Linux is a UNIX clone? Now, when was UNIX created? Hmm? Let's see....What is the 1970's. Moreover, it was based on what? Multics. That goes back to the 1960's. Therefore, if you're saying age is a factor, you're mighty wrong. However, this somewhat debunks my theory now, doesn't it? I'm so very confused at the moment.......

How is DOS not an operating system? It can technically do whatever Linux can. Just in a less elegant way....

Too bad Dex wasn't here. He'd have some argument about DOS, I'm sure. :)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Kevin McGuire
Member
Member
Posts: 843
Joined: Tue Nov 09, 2004 12:00 am
Location: United States
Contact:

Post by Kevin McGuire »

Hi,

I have followed the tutorial at

http://www.osdever.net/bkerndev/index.php

and now I want to put a GUI on it!

Has anyone got any help on this topic?

Many Thanks!
Harry.
You will need some sort of video functionality. You would not really need any extensive memory management at that point. You would need interrupts and a global descriptor table. If you boot from GRUB you could just forget about the global descriptor table. I would just copy some code to setup the interrupt descriptor table and make one for the keyboard and mouse. You could just as well copy some code to switch the video card into a resolution and color depth you liked. Then go read a little on about graphical user interface concepts such as windows and events..try making some windows with events and you should be done.

You would not need to learn about executable images, memory management, drivers, threading, interrupts, ports, mmio, buses, system calls, or anything of the such. You do not even have to write any support for loading programs instead just hard code them into the kernel.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

Alboin wrote:
Tyler wrote:A DOS Clone is not an operating system by todays standards though. Back in its day it was the best for the time it took and how efficient it was given there far worse PC Architecture... writing a clone as efficient would be no quick task for a single developer.

I still wouldn't class that as OS Development though. That is like someone studying biology from 200 years ago and taking a test in it today. You would fail because that is no longer biology.
Have we forgotten that Linux is a UNIX clone? Now, when was UNIX created? Hmm? Let's see....What is the 1970's. Moreover, it was based on what? Multics. That goes back to the 1960's. Therefore, if you're saying age is a factor, you're mighty wrong. However, this somewhat debunks my theory now, doesn't it? I'm so very confused at the moment.......

How is DOS not an operating system? It can technically do whatever Linux can. Just in a less elegant way....

Too bad Dex wasn't here. He'd have some argument about DOS, I'm sure. :)
Well Linux adds a hell of a lot of features to UNIX, copying the original UNIX would be too hard, but cloning Linux would be... So to make a modern clone of DOS would be OS Development but would not be a simple task... And i am sure Dex would help myt argument as he considered his project to be no easy task as it is a modern take on DOS.
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Post by Alboin »

I think our ideas are becoming confused. I am saying that a simple OS would be by definition simple, and therefore osdev may, in some situations be easy. You, on the other hand, are saying that osdev is all difficult, because you do not consider simple OS's to be osdev as they are not modern operating systems by today's standards. Correct?

Therefore, we are discussing whether osdev covers all programming related to operating system development or if it only covers that which is considered modern.

Maybe we can reach a middle place here. What about calling the development of simple operating systems "nosdev"? (noob+osdev)
C8H10N4O2 | #446691 | Trust the nodes.
Tyler
Member
Member
Posts: 514
Joined: Tue Nov 07, 2006 7:37 am
Location: York, England

Post by Tyler »

Alboin wrote:I think our ideas are becoming confused. I am saying that a simple OS would be by definition simple, and therefore osdev may, in some situations be easy. You, on the other hand, are saying that osdev is all difficult, because you do not consider simple OS's to be osdev as they are not modern operating systems by today's standards. Correct?

Therefore, we are discussing whether osdev covers all programming related to operating system development or if it only covers that which is considered modern.

Maybe we can reach a middle place here. What about calling the development of simple operating systems "nosdev"? (noob+osdev)
Well i wouldn't use that term, i think noob is thrown around a little too much by noobs to actually mean anything anymore. But ok...
User avatar
AndrewAPrice
Member
Member
Posts: 2309
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Post by AndrewAPrice »

Tyler wrote:
Alboin wrote:
Tyler wrote: Depends on your definition... I class OS development as doing it properly/well, not as doing some **** that just happens to boot cause some tutorial told them exactly how to do it. So OS Development is a hard topic... as is CompilerDevelopment, despite it being easy to write a simple parser that outputs machine code... etc etc.
Creating a simple DOS clone in real mode is easy, but creating a Linux clone is more difficult. Both are osdev. Even though the Linux clone is more useful than the DOS clone, they are both operating systems nonetheless, Therefore, osdev may be easy and difficult.
A DOS Clone is not an operating system by todays standards though. Back in its day it was the best for the time it took and how efficient it was given there far worse PC Architecture... writing a clone as efficient would be no quick task for a single developer.

I still wouldn't class that as OS Development though. That is like someone studying biology from 200 years ago and taking a test in it today. You would fail because that is no longer biology.
DOS is a bootloader with a shell. :)
My OS is Perception.
Post Reply