www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/28/09:16:25

From: Michal Mertl <xmerm05 AT manes DOT vse DOT cz>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Blit timing - complicated?
Date: Fri, 28 Nov 1997 12:31:37 +0100
Organization: Prague University of Economics
Lines: 50
Message-ID: <Pine.ULT.3.95.971128120724.27257B-100000@manes.vse.cz>
References: <65m5fp$k73$1 AT news2 DOT xs4all DOT nl>
NNTP-Posting-Host: manes.vse.cz
Mime-Version: 1.0
In-Reply-To: <65m5fp$k73$1@news2.xs4all.nl>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 28 Nov 1997 rkramer AT xs4all DOT nl wrote:
> In a discussion with a friend of mine, he was trying to convince me that it's
> possible to blit a full 800x600 screen in less than a millisecond. I tried to
> tell him otherwise, but couldn't quite get my point through :)
>
I don't believe there is such a graphics card. It would mean moving
800x600x1000xbyteperpixel bytes per second. In 256 color mode this would
be about 457MB. I don't remember the speed of AGP (the newest and fastest
bus especially designed for fast graphics) but I think even it is
slower than that and sure not fast enough for true color (1831MB/s). 

> Can anyone tell me how I could calculate the time it would take to blit a
> full VESA 0x103 screen, using a 486DX2 66 MHz? Is this an easy task, or a
> very difficult one? Do I have to keep in mind:
> 
> - Access time of video RAM,
> - Whether real or protected mode is used,
> - other system characteristics?
> 
The most important thing is definitely the graphics card. Even 386 would
outperform Pentium II with an ancient SVGA card.

To measure the time something takes to execute you can usually measure it with
some small precision but repeat the operation many times so that total time
is long and the precision doesn't matter so much.
You could use even 1 sec precision if task take say a minute. 
If you need high presicion you can use uclock() which unfortunately doesn't
work reliably under WIN95. The most precise timing you can easily get is
using timerstampcounter on >new 486 processors. Unfortunately this is
privileged instruction so you can't run it under WIN95 and even cwsdpmi. You
can you cwsdpr0 which is dpmi server which allows your application to execute
privileged instructions. You can download pentium profiling tool from DJGPP
page of www.goof.com/pcg/ and use it's macros.

> Would a REP MOVSD loop in protected mode be faster than one in real mode? 
> (Assuming transfer within a linear bit of memory, for simplicity)
> 
I expect they would run at the very similar speed but am not sure.

I'm a bit sorry thet I answered the question in part with DJGPP specific
functions, I noticed it too late that you send the post to more newsgroups.
BTW it isn't also on-topic here.
If you need that pentium profiling tool for other compiler than DJGPP I could
send it to you in intel syntax asm. But don't ask for it just because of being
lazy to look at the original, please :).

Michal "MiMe" Mertl
  xmerm05 AT vse DOT cz


- Raw text -


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