[syslinux] [PATCH] core: Honor DISPLAY text background color when in VGA mode

H. Peter Anvin hpa at zytor.com
Fri Feb 18 10:36:15 PST 2011


On 02/18/2011 05:42 AM, Jeffrey Hutzelman wrote:
> When in VGA graphics mode, BIOS int 10h ah=09h doesn't seem to
> treat high-order attribute bits as a background color; instead,
> it apparently always uses black.  This means that a background
> color requested via <SI> in a DISPLAY file is not honored in
> VGA mode.
> 
> However, the BIOS supports an "XOR" mode, in which the pixels
> to be written are XORed with pixels already on the screen
> (background pixels are left untouched).  So, we can get the
> desired effect by first writing a solid block in the desired
> background color, followed by XORing in the character to be
> displayed, using a color which is the XOR of the foreground
> and background colors.
> 
> This depends on the existence of an all-pixels-set character
> at font position 0xDB.
> 
> Signed-off-by: Jeffrey Hutzelman <jhutz at cmu.edu>

Since we already write the graphics screen directly, perhaps we should
just generate the text ourselves rather than relying on the BIOS.  We
have to do that for VESA modes anyway.  There are a lot of BIOS bugs in
this area and relying on yet another bit of the BIOS (the XOR mode you
mention) seems like the wrong thing to do...

	-hpa




More information about the Syslinux mailing list