Author Topic: FBA DirectX WIP  (Read 10532 times)

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
FBA DirectX WIP
« on: February 02, 2010, 11:20:52 PM »
Posting to let you know that I been doing research on DirectX again and I was finally able to fix the Vsync + Triple Buffer support on Windowed mode, this is for both: Direct3D7 Enhanced and Direct3D9 Experimental

Now Im gonna try to make Vsync work for the other 2 blitters ^^, if everything goes fine this should be in the next FBA release.

I have to say that the video looks a lot smoother using Vsync + Triple Buffer on windowed mode now  :smilie:.

SeeYaa!
 :biggrin:

Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: FBA DirectX WIP
« Reply #1 on: February 02, 2010, 11:54:41 PM »
Beautiful, these are the things I love to hear. Thanks for sticking with it CaptainCPS-X.

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FBA DirectX WIP
« Reply #2 on: February 03, 2010, 02:01:00 AM »
At least for now the only thing I could do for both DirectDraw 7 blitters was to add Vsync support, but Triple Buffer was originally implemented for Fullscreen mode, and since the code structure is different from the D3D7 and D3D9 blitters I cant add Triple Buffer, at least with what I know now.

In the future if I get better understanding of how Triple Buffering works I will try to add support for those 2 old blitters (I don't think anyone uses them anyway LOL). So far I know that Triple Buffering has something to do with flipping of primary buffer and a back buffer but I still need to know more about it  :p.

I have been thinking that DX10 support in FBA would be great someday but so far I still don't know very much of DirectX so Im just dreaming LOL xD

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Woot! Full VSync support!
« Reply #3 on: February 03, 2010, 07:42:33 PM »
Full Support for VSync in FB Alpha!

Yeah!! After doing lot of research and testing different hard-coded modules to make DX Blitters wait for VSync I found out the proper way to make FBA wait for Vsync without compromising its trademark speed :D

Triple Buffering / Page Flipping doesn't even need to be turned on in windowed mode, the video is displayed 100% smooth (unless of course your video card can't handle Vsync  :p)

Oh, and ALL blitters now can use Vsync  :wink:

I will submit the updates as soon as possible to Barry so they can be added for the next FB Alpha release ^^

FB Alpha Rules! xD

EDIT: In current FBA version when you select Vsync or Triple buffer from the menu it doesn't apply the changes until the video is restarted, now in my updated code when you select the options in the menu the video is automatically restarted with the new options  :smilie:.

SeeYaa!
 :biggrin:

« Last Edit: February 03, 2010, 07:50:07 PM by CaptainCPS-X »

Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: FBA DirectX WIP
« Reply #4 on: February 03, 2010, 08:33:49 PM »
OMG, that is BAD ASS! Please release a new version ASAP! Thanks Captain!
This will make FBA one of the few apps that can actually do DirectX Triple Buffering natively, something which already exists for OpenGL apps.

And someone please fix the audio problems in The Simpsons. :)
« Last Edit: February 03, 2010, 08:36:48 PM by Huggybaby »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3725
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: FBA DirectX WIP
« Reply #5 on: February 04, 2010, 12:55:38 AM »
@Cap - Nice work buddy!!

And someone please fix the audio problems in The Simpsons. :)

What's wrong with The Simpsons?


Offline Huggybaby

  • Jr. Member
  • **
  • Posts: 91
  • Karma: +2/-0
Re: FBA DirectX WIP
« Reply #6 on: February 04, 2010, 01:00:11 AM »
The sound is clipped/distorted, and left and right are reversed. Works fine in mame.

To check left/right, start a game and when the rabbit skates across the TV screen you can tell.
« Last Edit: February 04, 2010, 01:05:25 AM by Huggybaby »

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FBA DirectX WIP
« Reply #7 on: February 04, 2010, 03:06:16 PM »
@Cap - Nice work buddy!!

ThanX man! ^^

SeeYaa!
 :biggrin:

Offline isamu

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +2/-2
Re: FBA DirectX WIP
« Reply #8 on: February 04, 2010, 08:23:05 PM »
awesome awesome awesome Captain! That is very good news! Can't wait to try it out! I'm assuming the benefit of having v-sync enabled is to make the games look like they're running at a smooth, rock solid 60fps?
GENTLEMEN: START YOUR ENGINES!!

Daytona USA is emulated for the PC.

*NOTHING more needs to be said*

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FBA DirectX WIP
« Reply #9 on: February 05, 2010, 12:05:31 AM »
awesome awesome awesome Captain! That is very good news! Can't wait to try it out! I'm assuming the benefit of having v-sync enabled is to make the games look like they're running at a smooth, rock solid 60fps?

To be specific, VSync wait for all the vertical scanlines to finish the 'painting' from the last page buffer and then continue with the next page buffer and so on. Without VSync the pages are painted on screen but they don't wait for the last vertical scanline to finish, so this results in what is better known as 'Flickering'. Even when we are running at full 60fps and not doing Vsync quality will not be the same, but with Vsync 60fps are really 60 complete vertically synchronized frames per second.

SeeYaa!
 :biggrin:

Offline isamu

  • Jr. Member
  • **
  • Posts: 94
  • Karma: +2/-2
Re: FBA DirectX WIP
« Reply #10 on: February 05, 2010, 02:02:15 AM »
To be specific, VSync wait for all the vertical scanlines to finish the 'painting' from the last page buffer and then continue with the next page buffer and so on. Without VSync the pages are painted on screen but they don't wait for the last vertical scanline to finish, so this results in what is better known as 'Flickering'. Even when we are running at full 60fps and not doing Vsync quality will not be the same, but with Vsync 60fps are really 60 complete vertically synchronized frames per second.

SeeYaa!
 :biggrin:

Ahh I see, cool :)
GENTLEMEN: START YOUR ENGINES!!

Daytona USA is emulated for the PC.

*NOTHING more needs to be said*