www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/29/11:11:19

Message-ID: <01BBAE21.6FD4EE40@slip00-17.btx.dtag.de>
From: Daniel Jungbluth <danju AT t-online DOT de>
To: "'DJGPP Mailing List'" <djgpp AT delorie DOT com>
Subject: Re: graphics
Date: Sun, 29 Sep 1996 14:51:08 +-100
MIME-Version: 1.0

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,&regs);
  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 -


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