www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/11/16:46:51

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Dubble buffer problems in MODE-X
Date: Sun, 11 May 1997 13:53:46 +0100
Organization: None
Distribution: world
Message-ID: <bimlPKAaFcdzEw8f@talula.demon.co.uk>
References: <336F81FB DOT 1355 AT mailbox DOT swipnet DOT se>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 38
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Krystyna de Heras writes:
>1.5: Fill bitmap
>2: vsync()
>3: blit(bitmap,screen...)
>
>It works fine in mode 13h and vesa, but alas in 320*400 already I see
>these ugly  jawy things on the bottom of the screen. WHY!!??? 

Would I be right in thinking that you are getting an effect of the
bottom few lines of the screen lagging a frame behind the rest of the
display, and at the dividing line between the top and bottom regions,
there is a region that has alternating pixels from the previous and
current frames?

If so, the problem is that your blit() is taking longer than a single
retrace to complete, so the CRT beam is overtaking the draw code.
Because mode-X drawing is planar it copies every fourth pixel, then
every fourth+1, etc, so where the display crosses the blit you get a
nasty jagged effect.

Possible solutions:

Get a faster machine, so you can do the blit in a single retrace :-)

Don't use a memory -> screen blit in mode-X: there is enough video
memory for two 320x400 pages, so you can draw each frame directly into
video ram and then use the hardware scrolling routines to switch between
the two pages.

Remove the vsync(). This is still going to result in some flicker and
shearing, but your blit won't be in sync with the retrace any more, so
the shear will happen at a different place on every frame, making it
rather less obvious...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


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