From: Boris on
Hi,

I have the following configuration:

1. During boot, custom BIOS allows user to select display resolution via
menu;
2. When XP boots (this is XP embedded - but same applies to regular XP, as
per my understanding), it's supposed to use the display resolution selected
during step 1 (by fetching current settings from BIOS). But normally XP just
uses display settings stored in Registry (when booting).

I don't have source code for display driver (display adapter always the
same: Intel GMA950).

2 Questions:

1. Is it possible to write custom filter driver that sits between Video Port
and Video Miniport drivers (that custom filter driver would intercept
requests for setting display resolution and change them if necessary)?
2. Or is it possible to call BIOS from user-mode code (in order to get
current display resolution)? Either WIN32 or Native (user-mode) app would
work for me.

Thanks,
Boris

From: Tim Roberts on
"Boris" <boris(a)boris.net> wrote:
>
>I have the following configuration:
>
>1. During boot, custom BIOS allows user to select display resolution via
>menu;

Where does your BIOS put this information, and why would you choose a
design that is so contrary to the industry standards? People don't change
resolutions often enough to have that make sense.

>2. When XP boots (this is XP embedded - but same applies to regular XP, as
>per my understanding), it's supposed to use the display resolution selected
>during step 1 (by fetching current settings from BIOS). But normally XP just
>uses display settings stored in Registry (when booting).
>
>I don't have source code for display driver (display adapter always the
>same: Intel GMA950).

If you can't modify the source code, then you are pretty much screwed.

>1. Is it possible to write custom filter driver that sits between Video Port
>and Video Miniport drivers (that custom filter driver would intercept
>requests for setting display resolution and change them if necessary)?

You can't do that. The operating system doesn't ASK the driver what
resolution it wants, it TELLS the driver what resolution to set. If you
intercept the call and lie to the driver, the operating system would still
set the desktop to the wrong size.

>2. Or is it possible to call BIOS from user-mode code (in order to get
>current display resolution)? Either WIN32 or Native (user-mode) app would
>work for me.

That depends entirely on where your BIOS stores the information. If you
can read the information, you can modify the registry, but I don't think
the timing works out.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Boris on
Hello Tim,

Thanks a lot for your reply.
I have more questions (the system in question is 32-bit XP):

1. Is it possible to create custom filter driver to sit between display port
and display miniport drivers? For example, if I opened "device/vide0" and
walked down driver stack, I should be able to find pointer to DRIVER_OBJECT
for display miniport driver and then hook it?
2. If that's possible, would such filter driver be able to call
VideoPortInt10() function?
3. If user-mode 16-bit application just calls INT 10, for example, code 0FH:
to get current video mode setting in BIOS - will it return correct value or
just some junk?
4. What about Ke386CallBios() function: can it be called from some driver
that isn't display miniport driver?

Thanks,
Boris


"Tim Roberts" <timr(a)probo.com> wrote in message
news:mpuqq593vlvdtq5uf4l6iu4gqk256ohj1j(a)4ax.com...
> "Boris" <boris(a)boris.net> wrote:
>>
>>I have the following configuration:
>>
>>1. During boot, custom BIOS allows user to select display resolution via
>>menu;
>
> Where does your BIOS put this information, and why would you choose a
> design that is so contrary to the industry standards? People don't change
> resolutions often enough to have that make sense.
>
>>2. When XP boots (this is XP embedded - but same applies to regular XP, as
>>per my understanding), it's supposed to use the display resolution
>>selected
>>during step 1 (by fetching current settings from BIOS). But normally XP
>>just
>>uses display settings stored in Registry (when booting).
>>
>>I don't have source code for display driver (display adapter always the
>>same: Intel GMA950).
>
> If you can't modify the source code, then you are pretty much screwed.
>
>>1. Is it possible to write custom filter driver that sits between Video
>>Port
>>and Video Miniport drivers (that custom filter driver would intercept
>>requests for setting display resolution and change them if necessary)?
>
> You can't do that. The operating system doesn't ASK the driver what
> resolution it wants, it TELLS the driver what resolution to set. If you
> intercept the call and lie to the driver, the operating system would still
> set the desktop to the wrong size.
>
>>2. Or is it possible to call BIOS from user-mode code (in order to get
>>current display resolution)? Either WIN32 or Native (user-mode) app would
>>work for me.
>
> That depends entirely on where your BIOS stores the information. If you
> can read the information, you can modify the registry, but I don't think
> the timing works out.
> --
> Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.