www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/20/08:16:29

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Setpalette knowhow.
Date: Sat, 20 Sep 1997 09:50:34 +0100
Organization: None
Distribution: world
Message-ID: <pNDZXDAa54I0EwNO@talula.demon.co.uk>
References: <342372E9 DOT D9C27DB9 AT sr DOT flashnet DOT it>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 19
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Seby Carta writes:
>How i have to use the setpalette function provided by Vesa 2.0 protected
>mode interface ? what parameters i have to provide to this function ?

A mode flag in %ebx (0 to set the palette instantly, 0x80 to wait for a
retrace first), a counter of how many colors you want to set in %ecx,
the index of the first color you want to set in %edx, and a pointer to
the palette data (four bytes per color, ordered blue, green, red, pad)
in %edi. The selector for accessing the palette data should be in %es
(this will already be the case if it lives in your normal djgpp data
segment), and the IO selector required by the VESA driver should be in
%ds.

See the Allegro vesa.c file for a working example...


--
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