www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/16/20:00:40

From: "Ben Peddell" <killer DOT lightspeed AT bigpond DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <10780N882 AT web2news DOT com> <yruU9.23045$jM5 DOT 60769 AT newsfeeds DOT bigpond DOT com> <11200N092 AT web2news DOT com>
Subject: Re: VGA DAC programming
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
Message-ID: <MpIV9.26011$jM5.68068@newsfeeds.bigpond.com>
Date: Fri, 17 Jan 2003 10:55:25 +1000
NNTP-Posting-Host: 144.134.90.23
X-Trace: newsfeeds.bigpond.com 1042764524 144.134.90.23 (Fri, 17 Jan 2003 11:48:44 EST)
NNTP-Posting-Date: Fri, 17 Jan 2003 11:48:44 EST
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

By the way, how'd it go?

Joel_S <jbs30000 DOT news DOT invalid AT web2news DOT net> wrote in message
news:11200N092 AT web2news 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