Author Topic: FBA performance with FPS  (Read 110 times)

Offline RN

  • Newbies
  • *
  • Posts: 2
  • Karma: +0/-0
FBA performance with FPS
« on: March 08, 2018, 01:19:13 pm »
I would like some feedback concerning my findings using FBA on Windows 7 and 10.

Using various system setups I am unable to get full performance that is consistent with other versions of FBA or that I can achieve with MAME. This includes full fps that dont generate screen tearing or frame skipping.

I used a monitoring tool : "PresentMon" to display the true fps.

Mission: Full FPS with audio, vsync disabled, runs DX7 or DX9 in a window... that's it.

Windows 7 x86/x64 SP1
FBA v0.2.97.42 - Impossible to get full fps unless audio is disabled or vsync enabled, typically 20-30% fps loss.
FBA v0.2.97.41 - Same results as FBA v0.2.97.42
FBA v0.2.97.40 - Full fps (99%+ fps)
FBA v0.2.97.39 - Full fps (99%+ fps)
FBA v0.2.97.38 - Full fps (99%+ fps)

Windows 10 with creator (and without)
All FBA versions tested as above - Impossible to get full fps unless audio is disabled or vsync enabled, typically 20-25% fps loss.

A typical 60fps game runs at 16.6667 milliseconds per frame.

As an example of the performance of FBA v0.2.97.42 and FBA v0.2.97.41 vs older FBA versions I have conducted some tests and benchmarks.
System tested: i7, 32GB, 1060GTX 6GB Driver version 388.31, Win7 x64 SP1

This graph represents FBA v0.2.97.40 with a 60 second benchmark that has recorded all the displayed frames and the time intervals between each frame.
Ideally it should be a straight horizontal line along the 16.667 value. However as you can see there were 13 frames (out of 3600 frames) that displayed at 33.35ms which is around double the time expected. Note that there were no dropped frames.
Although not perfect it was perfectly playable and no complaints. 0.361111% performance loss.

This next graph represents FBA v0.2.97.42 running the exact same benchmark. This time the results were extremely dire. The massive amount of frames not achieving 16.667 were phenomenal. A total of 1060 frames ran too slow or dropped completely. This gives the game a warpy skippy look, screen tearing is very evident.  29.44444% performance loss.

These 2 graphs are extrememly typical and representative of the above system setup with the various FBA versions.

The Windows 10 setup using any version of FBA reveals similar results of a near 30% loss in performance.
Even though the FPS value on screen will show 59.9/60 fps the true genuine output of fps is far less.

If anyone can give advice or help out solve this issue, it would be greatly appreciated.
« Last Edit: March 08, 2018, 01:24:41 pm by RN »

Offline dink

  • Administrator
  • *****
  • Posts: 2763
  • Karma: +206/-0
  • I <3 fried chicken
Re: FBA performance with FPS
« Reply #1 on: March 08, 2018, 06:26:53 pm »
Hi RN,
Thanks for the info.
In v.41/.42 we set the system timer to be a bit higher resolution, and that actually improved frame timing on most win 8-10 systems.  It automatically detects win8+ and enables it if detected.  From what it sounds like, this might have had an adverse effect on your system, maybe another driver or something also wants a certain timer resolution, so the 2 are conflicting.  This is just a total guess.  I will make this a configurable option so it can be disabled, to see if that helps. 
Secondly, we now use synchronization semaphores with directaudio instead of polling - which will be available in the next release.  This substantially improves frame timing on the microsecond level, and performance on lower-end pc's.

Also, please check your PM's, I need a bit more info from you.

best regards,
- dink

Offline RN

  • Newbies
  • *
  • Posts: 2
  • Karma: +0/-0
Re: FBA performance with FPS
« Reply #2 on: March 09, 2018, 01:42:24 am »
Thank you for the reply. It is good to know that there is ongoing development to improve FBA.

I have various other *older* emulators and I picked one at random to conduct the same test.

MAMEUI32 v 0.154 (2014)

Here it is zoomed in:

Clearly this is the sort of result I expect to see (or better) from all recent versions of FBA on all systems (within reason).

High end systems should be more or less flat lined.
This test was conducted on an aging laptop:
AMD Turion 64x2 Mobile TL-60 2.00Ghz, 2GB, ATI Radeon x1270, Win 7 x86 SP1

Will post up a full Windows 10 test too.