Board index » delphi » Mouse, Vesa in Protected Mode

Mouse, Vesa in Protected Mode

Help!

I am trying to write a graphics-based program that uses VESA mode $103
(800x600x256) under Protected-mode DOS.  I can set up the program, draw my
graphics onscreen and use cursor key control to move it round.  What I
can't do is get the mouse to work.

Does anyone have any docs or code that show how to use the mouse under
VESA graphics modes, as it is really essential that the mouse be usable
with this program.

Any suggestions (preferably really detailed discussions of how to do it,
in words of one syllable or well-commented source) would be much
appreciated.

Cheers,

JB

+----------------------------------------------------------------------------+
| John Breen                                        wom...@mad.scientist.com |
| External Student Representative                   +61-97-91-5646           |
| Edith Cowan University ISRC                       0411-378-443             |
|                                                                            |
|             http://www.geocities.com/SiliconValley/Heights/8192            |
+----------------------------------------------------------------------------+

 

Re:Mouse, Vesa in Protected Mode


Hi John,

Quote
On Sun, 2 Feb 1997 17:39:12 +0800, John Breen <wom...@mad.scientist.com> wrote:
>I am trying to write a graphics-based program that uses VESA mode $103
>(800x600x256) under Protected-mode DOS.  I can set up the program, draw my
>graphics onscreen and use cursor key control to move it round.  What I
>can't do is get the mouse to work.
>Does anyone have any docs or code that show how to use the mouse under
>VESA graphics modes, as it is really essential that the mouse be usable
>with this program.
>Any suggestions (preferably really detailed discussions of how to do it,
>in words of one syllable or well-commented source) would be much
>appreciated.

I've made a graphical interface unit for the same purpose, with mouse, but in
real-mode. I do however think that it is possible to convert my real
implementation of the mouse routines to protected mode code. The source is
somewhat documented, and you can find it at:

http://home.worldonline.nl/~wpdejong/vesa.html

It's a VESA 256 color unit for several resolutions with 256 color (big!) mouse
and PCX support.

I hope this will help you.

Re:Mouse, Vesa in Protected Mode


Quote
> I am trying to write a graphics-based program that uses VESA mode $103
> (800x600x256) under Protected-mode DOS.  I can set up the program, draw
my
> graphics onscreen and use cursor key control to move it round.  What I
> can't do is get the mouse to work.

For any non-VGA mode (above 640x480x16 and 320x200x256) the mouse driver
can't show the cursor anymore. You have to create your own 'show' and
'hide'
mouse and event handler. You can install your handler using one of the INT
33h
functions.

Re:Mouse, Vesa in Protected Mode


Quote
On Sun, 2 Feb 1997, John Breen wrote:
> Help!

> I am trying to write a graphics-based program that uses VESA mode $103
> (800x600x256) under Protected-mode DOS.  I can set up the program, draw my
> graphics onscreen and use cursor key control to move it round.  What I
> can't do is get the mouse to work.

> Does anyone have any docs or code that show how to use the mouse under
> VESA graphics modes, as it is really essential that the mouse be usable
> with this program.

> Any suggestions (preferably really detailed discussions of how to do it,
> in words of one syllable or well-commented source) would be much
> appreciated.

> Cheers,

> JB

It's a shame that nobody has ever attempted to write a new mouse driver
standard. The existing standard is mainly designed for textmode use, and
is of limited use in older graphics modes, let alone the newer. I did get
it working under 640x480x256 using the functions to get the number of
mickeys moved since the last call, and I using my own routines to display
the mouse cursor. However, it doesn't work with all mouse drivers. If
anyone kwows how to program the mouse without using the mouse driver, I
would appriciate if you let me know how.

Daniel Mantione

Other Threads