delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/12/09:56:34

From: "Matthew Conte" <spam AT somebody DOT else>
Newsgroups: comp.os.msdos.djgpp
References: <6vp6lh$g71$2 AT otis DOT netspace DOT net DOT au> <36209c73 DOT 0 AT d2o63 DOT telia DOT com>
Subject: Re: vsync
Lines: 16
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Message-ID: <tMnU1.109$Uc7.896@proxye1.nycap.rr.com>
Date: Mon, 12 Oct 1998 09:45:58 -0400
NNTP-Posting-Host: 24.92.55.44
X-Complaints-To: abuse AT nycap DOT rr DOT com
X-Trace: proxye1.nycap.rr.com 908200089 24.92.55.44 (Mon, 12 Oct 1998 09:48:09 EDT)
NNTP-Posting-Date: Mon, 12 Oct 1998 09:48:09 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Henrik Rydgård wrote in message <36209c73 DOT 0 AT d2o63 DOT telia DOT com>...
[...]
>framerate goes straight down to 30 FPS. And if your program can't cope with
>that, it will go down to 15. And the program will go four times as slow.
>Does anyone know how to maintain a constant speed?

Yes- you need to hook into the DOS Int 8h timer interrupt, and reprogram it
to fire off at say 60Hz or so.  Then you have it call a interrupt handler
which just increments a variable, and you can base your redraw function off
of the value of that tick counter.  It's really quite easy, just ask and I
will post some sample code.

Later,
Matt.


- Raw text -


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