VGA driver for XP, deploying on VMWare possible?

I understand VGA hardware, so want to write VGA driver that will be used on Windows XP. I am sure XP does use this, had read long back that BSoD is displayed using VGA driver only. So

  1. Is it possible to deploy and test it on VMWare Player? It is currently using VMware SVGA driver(vmx_svga.sys), but I think I can always update the driver, giving my own .inf and .sys file. Is this right thinking?

  2. Are there any resources for VGA driver with XP? There are many online but they are not specific to XP, so there has to be some barrier that is stopping people from writing this VGA driver for XP. Wants to know beforehand what kinda problems can be there>?

Sorry if me english is not very readable.

Regards
Adorn

The VGA driver is notoriously complex. Please explain why you need to
re-create a driver that already comes with the system, and why you need to
support a display as obsolete was the VGA. Note that it is a very small
step from wanting a VGA driver to wanting a punched-card reader; both
technologies are largely dead. “Pure” VGA mode is never used when Windows
is running, and is used only for part of the boot cycle and for the BSOD
display. In addition to the complexity, pure VGA is abysmally slow,
because the CPU has to emulate the functions of modern display cards.

Note that a “driver” is not used for the boot/BSOD events; my
understanding is that the old BIOS interface is used, in character mode.

Even in a VM you should be using the driver for your native card.

It is worth pointing out that “bargain” display cards are far, far smarter
than the old VGA, and “serious” display cards, or the built-in support in
most laptops and tablets, have GPUs as fast as, or in some cases faster
than, the CPU to which they are attached. “High-end” graphics cards are
used to build supercomputers in the petaflop range. So why do you feel
compelled to spend months of your time re-creating a driver that already
exists, is highly optimized, and in spite of that optimization is
abysmally slow? For an obsolete technology? And the last I looked, the
VGA driver was already installed on all systems, a fallback if the right
graphics driver could not be found. Note: I once had display card
problems, booted with a new card that could not be identified, and ended
up in VGA mode until I downloaded the correct driver. Ten minutes in VGA
mode is not fun. Slow. Crappy color. Poor fonts.

joe

I understand VGA hardware, so want to write VGA driver that will be used
on Windows XP. I am sure XP does use this, had read long back that BSoD is
displayed using VGA driver only. So

  1. Is it possible to deploy and test it on VMWare Player? It is currently
    using VMware SVGA driver(vmx_svga.sys), but I think I can always update
    the driver, giving my own .inf and .sys file. Is this right thinking?

  2. Are there any resources for VGA driver with XP? There are many online
    but they are not specific to XP, so there has to be some barrier that is
    stopping people from writing this VGA driver for XP. Wants to know
    beforehand what kinda problems can be there>?

Sorry if me english is not very readable.

Regards
Adorn


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Neither bugcheck nor boot stage phase uses “external” VGA driver (at
least it’s the case on xp, vista and win7). Instead bootvid.dll is
used. It implements some simple functionality like bitblt, solidfill
or textout. bootvid accesses graphics adapter directly (ie. IO ports).

Btw. there already is standard inbox vga driver on XP, why do you
think you need something else?

Kris

On Thu, Jan 2, 2014 at 6:47 AM, wrote:
> I understand VGA hardware, so want to write VGA driver that will be used on Windows XP. I am sure XP does use this, had read long back that BSoD is displayed using VGA driver only. So
>
> 1. Is it possible to deploy and test it on VMWare Player? It is currently using VMware SVGA driver(vmx_svga.sys), but I think I can always update the driver, giving my own .inf and .sys file. Is this right thinking?
>
> 2. Are there any resources for VGA driver with XP? There are many online but they are not specific to XP, so there has to be some barrier that is stopping people from writing this VGA driver for XP. Wants to know beforehand what kinda problems can be there>?
>
> Sorry if me english is not very readable.
>
> Regards
> Adorn
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Kris

xxxxx@gmail.com wrote:

I understand VGA hardware, so want to write VGA driver that will be used on Windows XP. I am sure XP does use this, had read long back that BSoD is displayed using VGA driver only. So

  1. Is it possible to deploy and test it on VMWare Player? It is currently using VMware SVGA driver(vmx_svga.sys), but I think I can always update the driver, giving my own .inf and .sys file. Is this right thinking?

The VMware driver is fake. It doesn’t write to hardware at all.
Instead, it uses a back door to connect directly to the VMware host so
it can write to the window. COULD you replace it? I don’t know.

  1. Are there any resources for VGA driver with XP? There are many online but they are not specific to XP, so there has to be some barrier that is stopping people from writing this VGA driver for XP. Wants to know beforehand what kinda problems can be there?

The reason no one writes this kind of driver is that there is no need.
The VGA hasn’t been relevant for about 15 years. Everyone uses an
accelerated graphics device, which are well beyond what a VGA is capable
of. Further, that problem has been solved. There is nothing left to be
achieved. Windows NT has included a perfectly capable VGA driver since
1990. In fact, the NT 3 and NT 4 DDKs include the full source code for
the standard VGA driver, for 4-bit, 8-bit, and 16-bit pixel formats.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

There is no need, but i wants to learn. In future I want me to write display driver. So clearly, that is very very complex. Hardware itself and OS binding would of course make it hard to understand what was going on.

SO I have to start somewhere, and my professor said that “writing VGA for some OS will be 1st step to write to learn display(3D) driver”. So I am choosing Windows as it is the most used OS.

@Tim Roberts Sir – Where can I get this NT 3/4 DDK? I would like to study the source code given for that VGA driver. Though it is out of date, I personally think that basics would be the same.

But 90% of the effort in a VGA driver is in simulating functions that
modern graphics cards do in the hardware. Consider the following simple
problem: two lines in a poly line meet at a shallow angle, and the
specification is to use a miter join. However, at shallow angles, the
miter can get too long, so in these cases, you want to use a bevel join.
Do this at the bitmap level. Get it perfect. And this is one of the
simpler computations. Modern drivers don’t worry about this, they just
pass the request to the GPU.

So you want to do 3D graphics. In 3D, you begin to worry about kilo
triangles per second, with texture mappings applied according to a
transfer function. Hidden line elimination will be handled by the GPU, as
will the texture mapping. As far as I can tell, writing a VGA driver has
about as much relevance to this as writing a driver for a
punched-card-reader. A VGA driver works in 2D space; a 3D driver works in
3D space, which is more that 150% harder than a 2D driver (3/2). I know
someone who wrote the Linux NVidia driver, which he refers to as “the
NVidia operating system with a small Linux emulator attached” because the
source code for the NVidia driver is larger than the Linux core. I
suspect that writing a VGA driver would contribute little or nothing to
this effort.

Remember the observation that display driver knowledge is concentrated in
a very small number of companies. You would be spending a lot of time
learning a skill of limited opportunity. And knowing how to write a VGA
driver is neither relevant nor valuable. There seems to be a lot of
opportunity in Bluetooth, network, data acquisition, file systems, and
mini filters, and as cool as display drivers might be, modern display
drivers work with extremely sophisticated built-in capabities, and bear
about as much relation to VGA drivers as a modern high-performance race
car does to a Stanley Steamer. While I normally would not discourage
learning, I think this would be a pointless exercise with little return
for the considerable effort. Display drivers are almost, but not totally,
unlike all other drivers.

I suspect your professor has no idea what a modern high-performance GPU is
like, or how complex the software interface to a display card is now like.
The remaining 10% of the effort is understanding the complex interface to
the OS. Oh, yes, you might spend as much as a whole day writing the code
that actually talks to the VGA hardware registers. So “knowing the VGA
hardware” doesn’t buy you all that much traction on the steep learning
curve of Windows display drivers. Years ago, I was an expert in VGA
programming; I could make one tap-dance. I would never consider taking on
a Windows VGA driver project, because my knowledge about the VGA registers
and all the tricks I could do with it had no relevance. But writing all
the graphics functions, including clipping regions, optimizing the
performance for flood fills, lines and curves in the presence of clipping
regions, and a ton of other techniques of 2D graphics that I’ve learned
over the decades, and making sure that the interface to GDI is fully and
correctly implemented, is an amazing amount of effort.

I think you have no idea of what you are getting into.
Joe

There is no need, but i wants to learn. In future I want me to write
display driver. So clearly, that is very very complex. Hardware itself and
OS binding would of course make it hard to understand what was going on.

SO I have to start somewhere, and my professor said that “writing VGA for
some OS will be 1st step to write to learn display(3D) driver”. So I am
choosing Windows as it is the most used OS.

@Tim Roberts Sir – Where can I get this NT 3/4 DDK? I would like to
study the source code given for that VGA driver. Though it is out of date,
I personally think that basics would be the same.


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The most realistic initial small step to start contemporary
Windows display driver development is the KMDOD source
code sample in the current Windows Driver Kit.

PS: Translating “I want to write Windows display drivers”
to mountain climber language might result in
“I want to climb the Annapurna”. Good Luck! :slight_smile:

Marcel Ruedinger
datronicsoft

xxxxx@gmail.com wrote:

SO I have to start somewhere, and my professor said that “writing VGA for some OS will be 1st step to write to learn display(3D) driver”. So I am choosing Windows as it is the most used OS.

There was a time when Windows was a nice place for experimentation like
this. However, that is no longer the case. It is now an industrial
strength mainframe operating system, and the barrier for entry is quite
high.

You might consider starting with Linux instead. There are a number of
different windowing systems on Linux with varying degrees of maturity.
Ubuntu currently uses X as their windowing system, and X has reached a
maturity and complexity approaching that of Windows, but the fun of
Linux means that’s not the only choice. You can also run something like
Nano-X or Microwindows (among others), which have a much simpler
structure that invites experimentation and extension.

@Tim Roberts Sir – Where can I get this NT 3/4 DDK? I would like to study the source code given for that VGA driver. Though it is out of date, I personally think that basics would be the same.

The NT 3.51 DDK is still available from MSDN. I don’t see the NT 4
DDK. That’s an issue, because one of the big internal changes between
NT 3.51 and NT 4 was that the display driver model moved from user mode
to kernel mode. Thus, you couldn’t build the NT 3.51 driver and use it
on XP.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I’m always amazed by the 'tude here. VmWare might not be the best place to
start. Instead one of the open source hypervisors - xen, kvm, or vbox would
be a better launchpad.

If the DOMU device model is based on QEMU then there are open source
framebuffer based XPDM VGA drivers out there that will work with the QEMU
based VGA bios. VBOX has one, for example.

Mark Roddy

On Fri, Jan 3, 2014 at 12:30 AM, wrote:

> There is no need, but i wants to learn. In future I want me to write
> display driver. So clearly, that is very very complex. Hardware itself and
> OS binding would of course make it hard to understand what was going on.
>
> SO I have to start somewhere, and my professor said that “writing VGA for
> some OS will be 1st step to write to learn display(3D) driver”. So I am
> choosing Windows as it is the most used OS.
>
> @Tim Roberts Sir – Where can I get this NT 3/4 DDK? I would like to
> study the source code given for that VGA driver. Though it is out of date,
> I personally think that basics would be the same.
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

On 1/3/2014 11:38 AM, Tim Roberts wrote:

You might consider starting with Linux instead.

Or MINIX? http://www.minix3.org/manpages/html4/console.html


Bruce