delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/10/10:21:04

To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Grx Drivers
Date: Fri, 10 Jun 94 08:48:36 CDT
From: sasbnb AT unx DOT sas DOT com

Gilliard Laurent Pierre,

If you have 1 MB of video ram, you can probably use 640*480*32k or 
possibly even 640*480*16M if you have the specs on your card. As far as
I know, the Grx drivers support only 256 colors via the VGA color
selector. One must bypass the selector and write directly to video
memory in order to get to the high color modes. That also involves
moving the base pointer on your card around when you run out of memory
in the 64k chunk of CPU ram dedicated to video and mapped to your card.
Both setting the mode, and setting the base pointer are 5 lines of
assembler and are trivially simple once you have done it. I had to
operate only on specs from Cirrus and it took me 2 evenings of hair
pulling. I was, however, disappointed when I got it in true color mode,
the first 640 points looked amazingly smooth and vibrant, but the next
43 points were sent to oblivion. Point 683 showed up where point 640
should have been, so my fractal was horribly mangled. Each line looked
great though. I did get 64k mode to work (5-6-5 bits of R-G-B), but 32k
mode (555) didn't even switch to graphics mode ( I still saw my last DOS
screen).

I used Borland 3.1 to inline the assembler by prefixing each line with 
"asm" because I am not sure how to link assembler routines into djgpp.
Does djgpp support inline assembler?

Cirrus alleges (but gives no details whatsoever) that the card can be
put in linear mode where 1 MB of motherboard memory can be mapped 
directly to the card, obviating switching base addresses. This would 
solve 1 problem I would have had had 16M color mode worked. 64k is
not evenly divisible by 3 bytes meaning that the first byte of pixel
21845 is the last byte on segment 1 and the other 2 are the first 
bytes on segment 2.

Go hog wild, get the specs for your card, explore the outer reaches of
video hacking and tell DJ how you did it. Perhaps he will add it to 
the next release of the graphics library.

Good luck,

        Brian P. Barnes

- Raw text -


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