Greg Haerr copied wine-devel a message he's sent to Alexandre Juliard:
I have created a small, completely working
re-implementation of the win32 user and gdi api's in about 42k ram, which I
call Micro-Windows. This project started out of a project I ran into called
nanoGUI, which was based on a small implementation of X for linux, called
mini-x. In any case, the project had just started, and I became the main
contributor. I completely redesigned the lower-level drivers so that the
mini-x api ran on top of linux 2.2 framebuffers, linux 2.0 svgalib, MSDOS,
ELKS and raw VGA hardware. As well, bare hardware and multi-os device
drivers for the keyboard and mouse were created.
My expertise though actually is windows api programming, not X, so I decided
to take the nano-X graphics engine that I created and implement the win32
graphics api on top of it. I have ended up with a small, portable, usable
implementation. The idea was to build a small win32 source compatible
implementation of a graphics engine that could be booted from floppy or run
on a wide variety of devices.
I'm writing you because most of the linux graphics community seems centered
around getting X or small versions of X moved forward. I am interested in
your opinion as to the usefulness of Micro-Windows and whether there are any
other developers that might be interested in this sort of thing. I've looked
at wine, and think it's a great project. One of it's potential shortcomings
is that it requires X. Perhaps I should work on getting it running on top of
bare hardware or framebuffers... I have a lot of cool ideas for projects that
center around getting the windows api's running on more machines.
Micro-Windows currently supports, in < 64k, the following:
Exact win32 compatibility for api's that are implemented based on portable
graphics engine
Win95/NT identical 3d overlapped window look-and-feel
WM_NCLBUTTONDOWN user window moves with real-time repaint
Full window area, client area, child window clipping
256 color palettized color implementation with 1, 4, 8 bpp bitmap drawing
Child windows
GetSysColor color schemes
Ability to run on any device supporting drawhorzline, drawvertline, drawpixel,
and getpixel.
Driver support for linux 2.2 framebuffer, 2.0 svgalib, MSDOS,. ELKS and bare VGA
hardware (currently planar mode only)
Truecolor and 256 color modes
Great architecture
Windows bmp and font file grabbers written
Greg also gave the list of supported API.
This project is (of course) Open Source (licence is MPL) and can be found at
Censoft.com
Patrick Stridvall, who is working on removing X11 dependency from Wine (and
also allowing Wine to run on some other platforms) gave the current state of
his effort: Yes and no. I have been working
on some kind of driver system for Wine and which moved all X code to special
driver and make it possible to make other drivers. The work is almost done
and most of the code is in the current distribution. I have a patch that
does the rest and makes Wine _compile_ (but not work) completely without X.
There are some untested/unsolved issues in that patch that I haven't yet
fixed, so it was been put on ice when I found other interesting things to
work on.
Patrick was very interested in Greg's work, and proposed a joint effort to
reduce size of Wine, like to add compilation
flags to Wine that makes only the core USER, GDI, KEYBOARD, MOUSE and CRTDLL
compile. Of course it is easily said but more hard to be done. This
would allow the creation of a light Wine (in fact a subset of current Wine)
that could mimic Windows CE, and also be ported to PDAs (running Linux).
In order to make this happen, Patrick Stridvall provided a TODO list:
There are dependencies that shouldn't exist between various parts of
Wine. This will eventually be needed to be done anyway.
All dependencies, in the core parts at least, to libc need to be
eliminated. This should IMO be done anyway all such call go through the
CRTDLL.
If we really want low memory footprint, the calls between the 16 and 32
bit parts of should only go in the 16 bit to 32 direction to make it
possible to disable the 16 bit parts. This should IMO be done anyway
some day.
If we really really want a low memory footprint, all dependencies
between GDI/USER and the KERNEL, that is not absolutely needed, must be
eliminated and/or #ifdef:ed. I am not sure Alexandre will like that, I
am not even sure if I like it.
Drivers for Linux Framebuffer etc need to be written.
The thread then forked in a more in-depth discussion of this Wine
dependencies
list.
Patrick Stridvall got his hands on Greg's source, and gave his first
understanding of the situation:
I think your original suggestion making Wine
run on top off Micro-Windows driver is better.
It seems Micro-Windows driver systmem (graphics engine) is designed
(optimized) with the assumption that the underlying drivers only can do very
low-level operation like pixel drawing that is they are basically dumb frame
buffers.
Wine's driver system (graphics engine) on the other hand is designed
(optimized) with the assumption that most drivers are capable of very high
level operations like polygon drawing, font rendering etc.
Each of these assumptions makes very much sense for the environments for which
Wine and Micro-Windows was designed.
So having a unified (Wine/Micro-Windows) driver system (graphics engine)
really doesn't make sense. However a Wine driver system frame buffer driver
(fbdrv) using Micro-Windows graphics engine does. Which was what you
proposed in the beginning IIRC.
However I think both Wine and Micro-Windows will have its place in the
future.
Wine, I think, will probably always be optimized for speed, with a driver
system that makes it possible to make underlying drivers that can use the
hardware (X on local computer) or bandwith (X Window on remote computer)
efficiently.
Micro-Windows, I assume, will probably be optimized for size with a driver,
system that makes it possible to write small underlying drivers.
A lot of the code Wine and Micro-Windows code, could be probably be shared.
There are serveral things that could be done at an early stage.
Making the USER controls implementation in Wine indepent of Wine's core,
so that it could be used by Micro-Windows.
Starting on a Wine frame buffer driver (fbdrv) that uses Micro-Windows
graphics engine. This required that the concerned files in Micro-Windows
is organized so that they could be used by Wine. Not very difficult I
think."
Patrick and Greg agreed to keep on working: Patrick will be providing a
frame buffer driver for Wine, and Greg will work on linking it to the
Micro-Windows graphical engine and also to provide a portable controls
implementation. Keep posted for more on this!
|