delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/14/06:16:11

From: Avi Fogel <avif AT israel DOT sun DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: mouse functions
Date: Sun, 09 Nov 1997 18:16:42 +0200
Lines: 50
Message-ID: <3465E1EA.5D4A3F6D@israel.sun.com>
References: <346130FC DOT 167E AT jcu DOT edu DOT au>
NNTP-Posting-Host: yarkon.israel.sun.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Oon Lin wrote:

> Hi !
>
> I'm currently writing a program in which the display is in VESA 1.2
> SVGA
> 640 x 480 x 256 colors.
>
> I have the all the codes working and I want to implement mouse
> functionality into it. The problem is that (surprise , surprise ) the
> mouse driver doesn't support SVGA .
>
> Tried coded it myself but failed miserably ...
>
> I got the Allegro library ... but can the mouse routines be used in my
>
> own program since I'm ONLY using the mouse routines and not other
> functions like Allegro's own VESA libary ? I tried putting in the
> codes
> found in ex6.c in Allegro's examples directory but my program crashed
> .
>
> Lastly , does anyone know of any tutorials on programming the mouse in
>
> SVGA mode ?? I had taken a look in Allegro's mouse codes but (due to
> my
> inexperience in mouse programming) I can't understand them...
>
> Thanks in advance ,
> Kean
>
> Oon DOT Lin AT jcu DOT edu DOT au
> http://lionfish.jcu.edu.au/~sci-okl

   Hi,
Youe mouse problem has 2 parts:
1. Servicing an async mouse event - This is done by using a DPMI "alloc
real mode call back function", and than you register  this real mode
function pointer with the mouse driver. The mouse reports any change in
its status including button press and relese, and mouse movment. The DOS
mouse driver can not draw in SVGA mode so you must draw the cursor
yourself. The protected mode handler must be an assembly function
because parameters are passed in registers.
You need to have documentation of DPMI and int 0x33 API's for the mouse
call back.
You need VESA 1.2 doc's for the cursor drawing functions.
(coding it your self is not a  trivial task)
Good luck
Avi Fogel

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019