www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/14/09:00:07

From: "Joel_S" <jbs30000 DOT news DOT invalid AT web2news DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: VGA DAC programming
Date: Tue, 14 Jan 2003 14:44:52 +0100
Organization: Web2news.com
Message-ID: <11200N092@web2news.com>
References: <10780N882 AT web2news DOT com> <yruU9.23045$jM5 DOT 60769 AT newsfeeds DOT bigpond DOT com>
MIME-Version: 1.0
NNTP-Posting-Host: 198.81.26.238
X-Complaints-To: abuse AT web2news DOT net
Lines: 52
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Great, I'll give it a try.  Thanks, I appreciate it.
> Check the values of the ATC Palette values.
> Believe it or not, all VGA modes, except 8-bit or higher,
> use *both* the ATC
> Palette and the RAMDAC Palette.
> The reason that it works under BASIC is that BASIC sets
> all of the ATC
> palette
> values to their indexes.
> However, INT 0x10 does not do so.
>
> If you don't believe me, try the following BASIC code:
>
> SCREEN 12
> FOR N=0 TO 15
>     LINE (N*20,0)-STEP(19,100),N,BF
> NEXT
> SLEEP
> FOR N=0 TO 15
>     X = INP(&H3DA)
>     OUT &H3C0, N
>     OUT &H3C0, RND * 64
> NEXT
> X = INP(&H3DA)
> OUT &H3C0, &H20
> X = INP(&H3C0)
> X = INP(&H3DA)
> SLEEP
> END
>
> This should first produce the expected colour bars, then
> after pressing a
> key, change the colours to random ones.
>
> Try the following code:
> {
>     char n, x;
>     for (n=0; n<16; n++){
>         x = inportb (0x3DA);
>         outportb (0x3C0,n);
>         outportb (0x3C0,n);
>     }
>     outportb (0x3C0, 0x20);
>     x = inportb (0x3C0);
>     x = inportb (0x3DA);
> }
>
> Hope this helps.
>

--
Posted via http://web2news.com the faster web2news on the web

- Raw text -


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