This is the mail archive of the
cygwin-xfree@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: XServer
Mike MacDonald wrote:
> My thinking now, for initial Xserver stuff..
>
> modify the current vga256 x server to initialize a full screen Directx in a
> 256 color mode for now..
>
> do a lock in xf86MapVidMem
> do an unlock in xf86UnMapVidMem
If we create the surface in user-memory, we don't need to lock/unlock the back
surface. We can write to it whenever we want.
In the blit-function, we would have to lock the primary surface before the blit
call.
>
> I don't know if those sync up to work, (I'm not sure when X calls those
> functions) but thats my current thinking..
>
> I'm not sure how to handle the message loop, etc, but I'm sure it will get
> figured out. Then, later, I suppose use either asm calls, or gdi for 2d
> primitives.
> It should be easy to move to higher color depths after its up and running.
>
The code I sent shows how I handled it. It works pretty well.
>
> For the accelerated, I'm going to try using/modifying mapmem to provide
> memory mapping functionality, and getio for port access.
>
> For mouse, keyboard, ttys - mapmem, and getio.
Direct Input is probably best for mouse and keyboard as it gets raw data..
This is what I am working on now. The only 'problem'
is that DI return keyboard scan codes. I need to write a KB mapping function
to do this.
> getio may not be fast enough, and mapmem might not map memory properly, but
> I'll hit that when I get to it..