delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/15/22:16:46

From: Larry Swanson <laswanson AT mwci DOT net>
Newsgroups: comp.graphics.algorithms,comp.os.msdos.djgpp
Subject: Re: Double Buffer not working in modes larger than 400x300x16(VESA 2.0)
Date: Wed, 15 Oct 1997 19:06:18 -0500
Organization: MidWest Communications, Inc.
Lines: 36
Message-ID: <34455A7A.2385EC0D@mwci.net>
References: <34417B92 DOT 7B82F875 AT mwci DOT net> <Pine DOT SOL DOT 3 DOT 96 DOT 971015113323 DOT 5682L-100000 AT sutf19 DOT reading DOT ac DOT uk>
NNTP-Posting-Host: dial-34.man.mwci.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> > void Buffer_Pixel(int x, int y, int color){
> >      DoubleBuffer[ y*screen_width + x ] = color;
> > }                               ^^^
                                ^^^
>                  Aren't you missing a '*2' for 2 bytes per pixel, if not
> then your screen_width is in bytes already and the '* per_pixel' in the
> copy routine is irrelevant.

Actually right now now my Double Buffer is a unsigned short * for some
reason.( I should change that to a void * so it would be better.  I just
noticed my Double Buffer wasn't working right so I hacked an example up
quickly.


> Also, are you sure that the LFB enabled properly, if not, you'll get a 64K
> bank at 0A0000h linear which may cause some problems...

Plotting pixels straight to video memory seems to work fine for me in
all modes.  My problem is that if I fill the Double Buffer with ,for
example, green, and then plot a few pixels of an other colour into the
double buffer, I will see those pixels for an instant and then the whole
screen will be green.


> As regards to the assembler thing, you sould not need to create or reload
> any selectors. Since the contents of memory SHOULD be mapped to one
> selector with a big limit, ds,es,fs,gs should be the same... Simply write
> to the (linear offset of buffer)+compiler base address to get your pixels
> there.
thanks



Thanks for responding

Jordan Swanson

- Raw text -


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