[syslinux] syslinux ansi <-> vesa color mapping

James Buren ryu0 at ymail.com
Tue Nov 12 00:17:47 PST 2013


I have noticed anything using ANSI escape sequences to color text does not work
if syslinux is in VESA mode. It only works if the \1#, \2#, or \3# are used.
This means that libmenu which relies on csprint fails to render colors in
VESA mode. I noticed the default color table has a complete table generated at
runtime for all VGA color combinations, which csprint also does but from VGA
attributes on an as needed basis. I was thinking maybe I could find a way to
bridge it so that csprint can switch from ANSI to the other color API that works
if a compatible match can be found. In the mean time, I have prepared a simple
patch that fixes a small bug in the existing cindex that ANSI uses. The cindex
is currently uint8_t, which limits the colors VESA mode can use to 256 colors
while the VESA uses attr_t, a uin16_t type. I have patched the ansi.h header to
include the vesa header where this type is exposed and then change the cindex
type to attr_t. This should mean the full table can now be accessed. This does
matter because the default color table size is 274 or so.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ansi-switch-cindex-type-to-attr_t-to-fully-support-c.patch
Type: text/x-patch
Size: 945 bytes
Desc: not available
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20131112/e6a64d95/attachment.bin>


More information about the Syslinux mailing list