Author Topic: windows 7 - unwanted frameskip  (Read 62817 times)

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: windows 7 - unwanted frameskip
« Reply #45 on: October 14, 2010, 08:37:16 AM »
FBA and Windows 7 Frameskip / Stuttering (Update)

Recently I made a research of information and started doing lot of testing and found out that the Windows 7 problem is not FB Alpha problem.

It is a problem with the Desktop Window Manager Service (DWM), this service functions are located at DWMAPI.DLL and use functions from USER32.DLL and probably others. This DLL can be found only on Windows 7 operative system at the "System32\" directory and "SysWOW64\" respectively.

The DWM handle many drawing procedures for Windows 7 advanced UI system, and the Aero Themes depend on this service. So basically we cannot disable this service to solve the Frame Skipping / Stuttering problem.

After learning about all this I created a module on FB Alpha that will do the following:

- Detect Windows 7 (will specifically detect if running Windows 7)
- If Windows 7 is detected, Load "dwmapi.dll" handle, and import all needed functions.
- Set the FB Apha specific window parameters for DWM.

This will make DWM handle the FBA window without problems, and there is no more frame-skipping / stuttering.

This new module I created will consist of two main source files that should be on "src\burner\win32\" :

- dwmapi_core.cpp
- dwmapi_core.h

Files that will need to be modified at the FBA source will be:

- run.cpp
- burner_win32.h

At this moment I am trying to solve a problem with the FBA menu, because the menu / toolbar and its buttons are located on the main window Client Area, and DirectX uses the main window Client Area it will become completely black anytime DirectX is handling the main window Client Area. DWM displays the DirectX surface rectangle on top of anything drawn in the main window Client Area, so that means GDI drawing on the main Client Area while DirectX is using it will be problematic.

I am working on a solution and a improvement of FBA that will allow it to work as a MDI application, and instead of using the main window Client Area, use a Child Window client area to display DirectX graphics, this should solve the long standing problem with the menu and allow new UI features in the future.

So basically, if you didn't understand all the previous stuff, what it means is that the Frameskip / Stuttering problem has been solved  :biggrin: and FB Alpha is now working smoothly on Windows 7. There is a problem with the main menu but "should" be solved soon.

SeeYaa!
 :biggrin:
« Last Edit: October 14, 2010, 09:34:42 AM by CaptainCPS-X »

Offline manliodp

  • Newbies
  • *
  • Posts: 46
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #46 on: October 14, 2010, 09:46:09 AM »
Is the autoframeskip malfunction that you discovered real?
I'm asking because i've always feeled something weird also with autoframeskip off, especially in ssf2t ( also on xp -> http://neo-source.com/index.php?topic=1457.0 )
I hope that both fixes take FBA to the next level ;)

thank you for your great effort!
« Last Edit: October 14, 2010, 09:47:45 AM by manliodp »

Offline Aquashark

  • Newbies
  • *
  • Posts: 48
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #47 on: November 01, 2010, 04:15:35 PM »
great news CaptainCPS-X

thanks for looking into this issue

Offline FerchogtX

  • FBNeo Dev
  • ******
  • Posts: 375
  • Karma: +7/-0
  • FB Alpha Team ;)
    • FB Alpha Plus! Web Site
Re: windows 7 - unwanted frameskip
« Reply #48 on: November 01, 2010, 08:50:44 PM »
As Cap is adressing, the issue comes from DWM handling, but somehow, it affects other OSes, just because of DirectX 9c new handlers in the new or most modern GPU's (by modern, I talk about Geforce 7200 GT or greater GPU's and equivalents on ATI hardware).

What FBA is currently doing now, is creating a new window excluvely for video rendering (some sort of MDI, but with the whole interface), then, it can process every video instruction is set for it, and finally, enabling compatibility with DWM composition (this last just for Windows 7 or Vista).

In XP case, we got to adress whenever it is a DirectX issue (maybe enabling some sort of composition for XP) or maybe a multicore issue... remember that FBA cannot handle MORE than 1 core at once... but that is NOT an aplication issue, but a WINDOWS... XP is older than multicore technology, and even with the latest SP (currently on SP3... and I HIGHLY recommend to upgrading to it if you are not) XP is having issues handling the cores and distributing tasks for each core in a more efficent way, even is it's a dual core chip... Some people will be happy, this doesn't affect HT technology (Intel) because they are LOGICAL cores instead of physical, so, is like they were tied, no matter how independandly they work (I worked with HT long time, I know what I say XD)

Even, when I was on MUGEN stuff, there were issues in the engine, just because of that, the mos significant, the FPS counter not working and always showing 0 frames, while the engine was working properly.

You may try a fix for dual core issues, I'll try to find that info again and post here, and see if you people still get FPS problems on XP.

Cap is still working on this, so don't worry, you know that whenever he get his hands on this, it works XD

See ya!!! :D

Good and evil co-exist because of the balance, lies are not part of it...

FB Alpha Plus! site infos updated, see the latest info clicking on my profile link...

Offline delatroy

  • Newbies
  • *
  • Posts: 16
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #49 on: February 07, 2011, 01:08:41 PM »
Quote
Files that will need to be modified at the FBA source will be:

- run.cpp
- burner_win32.h

Hihi, how can I do this for the ggpo client?

Offline delatroy

  • Newbies
  • *
  • Posts: 16
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #50 on: February 20, 2011, 03:25:34 AM »
Hi AtTheGates & CaptainCPS-X - any idea on how I can implement the run.cpp and burner_win32.h for the ggpo client please?

Offline mawenwu1983

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #51 on: May 14, 2011, 11:58:45 AM »
I used to feel frameskip on fba,now this configuration will solve the problem for me.
You can try to config your fba like this:



My PC:
Intel E7300 266*10
ASUS P5Q
GEIL 2G DDR2 800 * 2
ZOTAC GTS 250 512M GDDR3 256BIT
Windows 7 SP1 X64
Hope this will do some help!
See ya! :biggrin:
« Last Edit: May 14, 2011, 12:06:28 PM by mawenwu1983 »

Offline AtTheGates

  • Newbies
  • *
  • Posts: 19
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #52 on: September 12, 2011, 04:35:37 PM »
@ mawen: vsynch is a different thing alltogether and adds another frame of lag, this is not the right solution for the problem i'm afraid, although it does help with other problems.


@ fba devs: is the fix implemented yet? if so, in which version, and where can i get it?

Offline The Original Z

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #53 on: October 03, 2011, 12:13:23 AM »
Lol....this is easy. Win7 and Vista use the d3d10/11 dll's as opposed to the REAL DX9 dll's (sxs paths make sure of this) Just type d3dx9_43 in the run/search bar in start and use winrar(or other) to extract the x86 cab ver(important as FBA is single threaded) and move the d3dx9_43.dll DIRECTLY into the FBA folder. I can run at 1600x1200 with frameskip off and no vsync and get a SOLID 300+fps with most blitters (proc locked at 100% on purpose to keep FrmRte steady).

this msg is for At_the_Gates.  I know about timing man, I used to be a regional SF champ a very long time ago  :biggrin: Hope this helps.

ZOUT.

Offline AtTheGates

  • Newbies
  • *
  • Posts: 19
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #54 on: October 21, 2011, 09:24:18 PM »
thanks for the tips original Z,
i tried putting 2 different versiont of d3dx9_43 into the fba folder (which version, btw? i guess it should work with most), and so far no change to the micro stutter. a good way to see it is if you run jojo's bizarre adventure and check the story / challenge mode selection and watch the background, which should pan smoothly (which it doesnt half of the time). also, i guess putting the "raw" d3dx9_43.dll into the folder should be ok, right? no cabs to extract for me on my system, i did have the dll in my system32 folder though and tried this version as well as a more up to date one. also, the framerate isn't really the problem if i understood the developer's explanation correctly, since this appears to be something that happens "after" the framerate, in the way in which the display is handled (or something?).

cheers,
atg

Offline DDP

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
Re: windows 7 - unwanted frameskip
« Reply #55 on: November 16, 2012, 08:16:41 PM »
sorry for bumping such and old topic, but im having the same problem aswell.

i used ggpo for 2 years without any problem, then i bought a new monitor (same pc still) and the stuttering started. at first i thought it was something related to the resolution (old monitor was 1440x900, new one is full hd), but even when i lower the resolution the stuttering continues, its very odd. and if i use the old monitor everything works just fine.

i tried everything in this thread but nothing worked. any new solutions?