Mail Archives: djgpp/1996/09/29/11:11:19
Ben Lewis wrote:
>is there any graphics library for djgpp that uses 64K colors. I've =
checked
>books and the internet, but i can't find a dos graphics library or even
>help on how to do more than 256 colors. if there is no library, i will
>write one myself if sent the specs on VESA 64K colors.=20
First of all, I don't know, if there's a graphics library for djgpp =
supporting 64k colours. But I can give you some information for writing =
an own library.
I expect, that you have some experience with programming VESA-cards. If =
not, send me a email to get more information. It follows a short(!) =
summary of VESA 64k modes:
VESA spec v1.2
64k graphic modes and their resolutions:
0x10e - 320x200
0x111 - 640x480
0x114 - 800x600
0x117 - 1024x768
0x11a - 1280x1024
How to set a VESA graphic mode:
int setVESAmode(unsigned short mode)
{
__dpmi_regs regs;
regs.x.ax=3D0x4f02;
regs.x.bx=3Dmode;
__dpmi_simulate_real_mode_interrupt(0x10,®s);
return(regs.x.ah); /* returns 0, if success */
}
Set-up of the video-mem:
ScreenOffset =3D ( Width * y + x ) * 2; /* ScreenOffset in bytes */
Set-up of one pixel (word):
bits 0-4: blue
bits 5-10: green
bits 11-15: red
This summary is very short, so if you want to know more, send me a =
email.
-Daniel Jungbluth
email: danju AT t-online DOT de
internet: http://www.t-online.de/home/danju/index.htm
-semper fidelis
- Raw text -