delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/10/08:47:13

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Mouse Cursors again!
Date: Fri, 10 Oct 1997 09:53:04 +0100
Organization: None
Distribution: world
Message-ID: <iL+7GEAwzeP0EwV8@talula.demon.co.uk>
References: <3 DOT 0 DOT 16 DOT 19971008134548 DOT 29a7ca66 AT hem1 DOT passagen DOT se>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 36
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Peter Palotas writes:
>Now this made me wonder... What is a hardware mouse cursor then? Is it
>implemented by the mouse-driver? Because in that case it seems kind of
>software to me, and anyone should be able to do it. 

If it was software, of course anyone could do the same thing, but
"hardware" means exactly that!

To display a mouse cursor in software, you need to store a copy of the
screen image from behind it, so you can restore this when the mouse
moves. If you then draw over the top of the pointer, this background
image will become invalid, so next time the mouse moves, an incorrect
background will be restored. The only way round this would be to make
every single drawing function know about the mouse and check for an
overlap, updating the background buffer as required, but this would be
prohibitively expensive.

With a hardware cursor, the pointer image is stored in a totally
different part of vram and overlayed by the display circuitry, so it
doesn't interfere with your display updates. This is very much like the
way hardware sprites worked on the C64, SNES, etc, but specialised for a
pointer display (typically only monochrome 32x32 cursors are supported).

>Or is it a feature of the graphics card, that varies for each graphics 
>card? If that is the case, it must be able to do it using VESA, right!?

No. VESA is an interface for direct framebuffer access: it doesn't
provide any accelerated hardware routines. Such things are supported by
the VBE/AF API, but SciTech are still working on their drivers for that,
so it isn't widely supported at the moment. The /AF spec isn't available
anywhere on the net, but you can order it from www.vesa.org...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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