delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/08/18:06:48

Message-Id: <m0wwx4c-0003GiC@fwd05.btx.dtag.de>
Date: Fri, 8 Aug 97 23:59 MET DST
To: djgpp AT delorie DOT com
References: <199708080343 DOT NAA21616 AT rabble DOT uow DOT edu DOT au>
Subject: Re: Allegro question
MIME-Version: 1.0
From: Georg DOT Kolling AT t-online DOT de (Georg Kolling)

Brett Leslie Porter schrieb:
> This is no error, not even a feature of Allegro. VGA (indeed all graphics
> adapters) do this. You either get the border, or make sure your zero colour
> is black. Sorry, but it's da truth, and I don't think there are any hardware
> registers you can "tweak" to change it.

Fortunately there _is_ such a register (even on EGA cards; makes you able to 
display 17 colors at once on EGA :)). Assuming that you
have black somewhere in your palette the following piece of code may help you:

#include <pc.h>
outportb (0x3C0, 0x11);
outportb (0x3C0, number_of_black_somewhere_in_your_palette);

But I really don't know why clearing the screen with Allegro affects this 
register...I thought it just fills the BITMAP with zeros

Oh, I just read that someone called 'Tom' posted another answer to this issue...
but what he wrote is wrong! In VGA modes, the complete register is used as a
reference to the DAC palette whereas in EGA modes, the lower 6 bits of the
register describe a color that is totally independent from the 16-color-palette
thus, in fact, a real 17th color (although you can't use it ;-)) 

Why are we discussing about EGA? Why are we discussing about VGA?
Use VESA 2.0!!!
If your graphics card doesn't support it, get SDD/UNIVBE!
If your graphics card isn't supported by SDD, you *really* have to buy a new
one (and sell your old one to a museum...)


- Raw text -


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