Mail Archives: djgpp/1997/11/14/06:16:11
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 -