Silly question, since it's been a while since I've looked at that code, but 
isn't the timer a Sleep call or similar? Or, is it a busy wait? A sleep 
shouldn't suck up processor time...

--
Mike Caron

-----Original Message-----
From: "Jay Tennant" <[email protected]>
Date: Tue, 24 Nov 2009 10:20:19 
To: <[email protected]>
Subject: Re: [Ohrrpgce] Half the frame rate



-------- Original Message --------
> From: "Jay Tennant" <[email protected]>
> Sent: Tuesday, November 24, 2009 11:26 AM
> To: [email protected]>, <[email protected]
> Subject: Re: [Ohrrpgce] Half the frame rate
> 
> -------- Original Message --------
> > From: Ralph Versteegen <[email protected]>
> > Sent: Tuesday, November 24, 2009 10:33 AM
> > To: [email protected], [email protected]
> > Subject: Re: [Ohrrpgce] Half the frame rate
> > 
> > 2009/11/24 Jay Tennant <[email protected]>:
> > > I was testing out the directx backend with the latest commit, and I 
> > > noticed the frame rate was cut in half: 9 fps. Usually it's 17. The 
> > > backend is capable of much more, which is obvious when gfx_setpalette() 
> > > is called continuously to fade to black and fade to color--the fps jumps 
> > > to around 45. (The standalone test app can reach > 1300 fps when vsync is 
> > > disabled.)
> > >
> > > Something in the engine is seriously lagging now. Unfortunately, the last 
> > > commit I used was from the 13th until I updated tonight/morning. 
> > > Somewhere between then and now the fps have dropped.
> > 
> > I tried Game and Custom, but did not see deviation from normal
> > anywhere. The framerate is meant to be 18.2. You can enable the
> > builtin FPS display by pressing Ctrl+~. I see a rock steady 18.2
> > everywhere (except during fades and loading and the menus in Custom
> > that run at a higher rate), and your FPS display reports 19. CPU usage
> > is about 5% (so 10% actually, it's a dual core). See whether those two
> > FPS values agree for you.
> 
> Well the fb backend has the correct framerate. I'll have to trace my steps in 
> the directx backend. Btw, the binaries I sent you didn't fix the rendering 
> bug--actually made it worse. Here's the latest binary, which stretches the 
> texture in the correct direction:
> http://www.crazyleafgames.com/OutSourced/gfx_directx_bin.zip
> 
> > I checked all the changes to allmodex.bas since the 13th and found
> > nothing, really. I can't think of any possible explanation. Do you get
> > the same framerate everywhere (in both Game and Custom)?
> 
> Using the dx backend, yes--even the test app. Maybe I just need to reboot 
> (been 3 weeks).

Nevermind. Just needed to reboot.

> > > Btw, is there consideration being given to updating the timer mechanism? 
> > > Is there a need for a dos timer still?
> > 
> > Well, what do you mean? Increase the frame rate, yes, we want to do
> > that, improve the way that the frame delay and key repeat rate are
> > calculated, yes, but the graphics backend doesn't have anything to do
> > with these, except maybe for returning the monitor refresh rate. 
> 
> Yes, all of that. The window procedure is being by "stealing" cpu time when 
> the engine is sitting for 55ms on the timer. Because I cannot accurately 
> gauge how much time is really being used constructively, I'm assigning an 
> estimated 6ms for the window procedure each frame show. Really, the window 
> procedure should be run during the time the engine sleeps between tasks. This 
> may be more or less than the estimated 6ms, depending on the computer.
> 
> 
> 
> _______________________________________________________
> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
>               http://www.doteasy.com 
> _______________________________________________
> Ohrrpgce mailing list
> [email protected]
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org 




_______________________________________________________
Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting
              http://www.doteasy.com 
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to