GUI Development

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.
Post Reply
jcraig

GUI Development

Post by jcraig »

Hi,

My operating system is a single user, multi tasking kernel, and I would like to make a graphics environment for that, like X. I am stuck on following, could not determine what to do:

How can that application run in v86 mode?
How can that application get permission from OS to use privileged instructions to change video mode, and access to the graphics card?

I know how to switch to v86 mode, from kernel. However, this is a user application, running in user space, and I could not figure out how can I run that application in v86 mode, or give it permission to access graphics card stuff.

I would be very happy, if you enlighten me about these.

Jason
AR

Re:GUI Development

Post by AR »

This all depends on the design, assuming you want it to be reasonably secure and safe from random crashes then you will want to not give it direct access like that.

The general mainstream idea is that the server talks to a driver and the driver does the actual work (change modes, copy buffers onto the video RAM), again this depends on your design.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:GUI Development

Post by Pype.Clicker »

you usually won't switch modes within an application. Either your application runs in protected mode, or it runs in virtual mode. The best thing to do is probably to have the video mode selected by some kernel service using the video driver, and the application should be happy with that mode or complain to the user.

Once the video mode is enabled, you could have the video memory mapped into the application's space so that it can do direct rendering. You could also (alternatively) have some special application (the GUI server) mapping the video memory and interpreting commands from other applications (based on a "window" context, for instance)
Post Reply