Mail Archives: djgpp/2003/01/16/20:00:40
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 -