myelin: atheos - message from Kurt Skauen
Some notes from Kurt on writing a VNC server for AtheOS
Subject: Re: [Atheos-developer] Kernel / appserver hacking notes
From: Kurt Skauen kurt @+ funcom d0+ com
Date: 07 Aug 2001 15:15:37 +0200

"Phillip Pearson" pp @+ myelin d0+ co d0+ nz writes:

> Hi all,
> Just wondering if anyone who's been working on driver dev has written
> anything about the structure of the kernel & appserver in AtheOS?
> I've been looking through the code and have deduced the following:
> Nothing particularly useful yet; just a brief summary of the modules that
> load in the process of booting the system.
> If anyone's written something along these lines, can they get in touch, to
> give me a bit of a head start?
> I've almost figured out what I want to know, which is where a VNC server (or
> some other remote desktop app) would interface to the appserver.  Should it
> be written as a video driver?  Can the appserver use multiple drivers at
> once?  e.g. if you have several (different) video cards and several
> monitors, can it display on them all at once?  

The appserver is not ready to support multi-head displays yet. I have
planned a major redesign of the gfx-driver interface and other things
inside the appserver that will make it possible to support multi-head,
bitmaps in video-mem, bitmap-overlays, etc etc but nothing of this is
possible with the current version.

The trick with VNC I guess is to find out exactly what part of the
frame-buffer have changed since the last update. If it was possible to
intercept calls to the video-drivers in some way it would be possible
to track what was rendered to by the driver but that wouldn't really
solve the problem since the appserver do some rendering without going
to the driver at all and applications can write directly to the
frame-buffer on their own (not easy to do anything useful now but it
will be when the direct-framebuffer system for syncing the app with
the appserver in regards of clipping list's and such are in place).

So from the top of my head the only way I can think of that it could
be made working is by "diff'ing" each frame and figure out what's
changed. This would be nice for the network but probably to hard for
the server (reading the entire frame-buffer take ages).

You can easily get access to the framebuffer from a normal application
so there is no need to put it in the appserver for that.

Another problem is user-input. I have also planned to move all input
handling into a separate server and make it possible to intercept all
input events with plugins and maybe other kinds of filters but at the
moment everything is inside the appserver and rather hard to get
at. You can write a mouse-driver to provide mouse-input from the VNC
client but there is not much to do about the keyboard since that is
handled entirely internally by the appserver ATM.

> And if I have a VNC server or an X display manager running, can I
> have that working at the same time as my local display?

If I have understood it correctly VNC is normally used to "clone" the
local desktop on another machine so you will still have the local
display but you will "compete" with the remote user about giving input
to apps. VNC is not really comparable to X. An X-client would just be a
little library handling the connection to the X-server and the AtheOS
GUI wouldn't be involved at all (remember that the terminology is a
bit twisted with X. The server is what's run on the machine displaying
the GUI). If you ment to run the display on AtheOS I guess the VNC
display would just be a normal window, and for X the X-server would
just open windows on the AtheOS desktop and execute the render
commands it received inside that window using the native API. Or it
could render the entire X-desktop into a bitmap and display that in a
window but that would be very inflexible and to slow to be usefull.

Kurt Skauen. ( )

"There are two kinds of people, those who do the work and those who take
credit. Try to be in the first group, there is less competition there." __
Indira Gandhi 

AtheOS-developer mailing list
    ⇒ myelin | notes | christchurch | net [ video hire ] | software [ dbwrappers | xmlrpc | pycs | pss ] | contact