Main > Software Forum
DirectDraw vs D3D for native resolutions. Aarons view.
AndyWarne:
On another thread there was a debate about not being able to use D3D for native resolutions.
To recap, when running a game which "almost" fits one of the native resolutions on the ArcadeVGA card (or whatever other method being used), when in D3D mode the game will be stretched to fit. This means one or two pixel-rows will be duplicated. As the pixels at these resolutions are large, this renders the screen distorted.
When using DirctDraw, this does not happen. The game screen is automatically centered on the screen with small borders inserted as required, which are not noticeable. The game screen runs pixel-perfect.
There is a view that D3D is better (apart from this issue) in that it is faster, but I am not sure this is correct because at these low resolutions, and without any stretching, the video API, drivers and card are having to do very little work.
I mentioned this to Aaron and he seems to have the same view as follows:
Quote:
The reason D3D doesn’t work is that I specifically designed it not to work for the fixed resolution case. I don’t see any advantage to using D3D when you are not doing any scaling, and it complicates things to make it work.
I’m curious why people want to use D3D with the AVGA? If I hear a convincing argument, I can be swayed, but I want to understand the logic.
I don't disagree with what he says. But over to the assembled audience, any other views on this?
Andy
Howard_Casto:
Well my agument would be that if you use d3d you don't have to scale. Set your resolution to the highest your arcade monitor will handle and you are done. Assuming the d3d scales properly of course. Because d3d is what newer cards support and ddraw is virtually dead, d3d is quicker in this respect. Also those un-noticable small borders, on some games are very noticable.
I think that is the misconception.... many people assume that users want to run the games in their original resolutions. This isn't true. We want to run them in such a way that they look arcade perfect (or close to it) with as little effort as possible.
With that aside, the reson people have a problem with ddraw is two-fold.
1. There are sound issues. That is what that other thread was about. I can attest that the new -speed flag does little to help it.
2. Those borders can get really big on certain setups. Of your arcade monitor/video card combo is capable of a very close resolution then it isn't a big deal, but this isn't always the case.
The thing is d3d works really well and all of it's options work well and ddraw, simply put, does not. It's not necessarily the fault of the two protocols/libraries but maybe how mame uses them. I honestly don't know enough about mame's rendering system to tell.
Slightly different from what others may be facing, but just as an example. I've got a dual monitor setup, with one of my monitors being a hacked psone screen that runs at a fixed resolution of 640x480 interlaced only. The video card running it, for cost reasons, is an old matrox card. It is so old it can't run d3d so for dual screen games I have to run both monitors in ddraw mode. Well, punchout, for example has a very low screen resolution so on both of my monitors I have a border of around 10-20 percent around the gameplay area which is just unacceptable. I can stretch it, with hwstretch, but the hwstretch in ddraw is so poor that it blurs the screen very badly. In either case when ddraw is enabled, even with no hwstretching, regardless of if I even use the secondary monitor, I loose about 10fps and the sound stutters badly. Mind you this happens even if the matrox card is turned off and I only use my primary screen and I don't have hwstretch on (which leaves a huge border). Now all I have to do is switch to d3d and the problems are solved. The game fills the whole screen with hwstretch turned on and it doesn't blur the image at all. I also get the full framerate. Of course I can't use d3d though if I want to use my secondary screen. So I'm stuck, I have the option of either having a wierd display with bad framerates on two screens or a pefect display on one.
This is the issue a lot of people are running into, namely we'd use either one if it worked with our hardware setup but as-is neither does. :(
I wasn't even aware the problem was so bad until that thread came up and I started doing testing. I had always assumed the framerate drop when using dual monitors was due to the fact that the card I was using was a pos until I went back and tried several options. Turns out it's just mame doing it.
AndyWarne:
--- Quote from: Howard_Casto on August 26, 2007, 09:01:29 am ---Well my agument would be that if you use d3d you don't have to scale. Set your resolution to the highest your arcade monitor will handle and you are done.
--- End quote ---
Absolutely cant agree here Howard.
This will result in a terrible picture.
If you really mean the highest resolution a standard-res arcade monitor will handle, thats 640 X 480 interlaced. Forget about anything resembling an arcade picture with an interlaced screen.
Or maybe you mean non-interlaced, ie 320 X 240. (well most arcade monitors will handle up to 288 lines but theres not going to be a great deal of difference). Running all games at 320 X 240 using any available scaling method will also be poor.
In the situation you mention you are forced to use scaling because you only have one resolution available. So in that situation there is little doubt that D3D is better, although the picture must be poor with any method.
If you have a range of approx 30 low resolutions to choose from, then most games are a very close fit and can run with very small borders. The ones which don't fit can be run with scaling (ie D3D) but the majority look far better if run native with borders ie DDraw than they do with scaling (using DD or D3D). The difference is night and day.
As an aside, your monitor might well be capable of non-interlaced arcade resolutions presumably. It must be a 15Khz monitor so no apparent reason why not.
Any interlaced screen is not going to be arcade-real.
Andy
headkaze:
The issue isn't so much that DD is dead which it is as a supported API by Microsoft. It's the fact that video card manufacturers have dropped adding support for Direct Draw in their video drivers.
A case in note is that GameEx runs in Direct Draw. I have Catalyst drivers from 2005 for use with my Radeon 9800 Pro. If I install the latest drivers (which I tried the other day) things like alpha blending in DD is so slow you can count seconds between each rendered frame. I obviously had to go back to using the older driver.
Also people are experiencing sound stuttering (which the old post was about initially) when using Direct Draw. Explain to me why this problem dissapears when they change to using Direct3D?
So I have to agree with Howard on this point. But it's hard to know exactly what combination of hardware/drivers/software is causing the issues people are experiencing.
Space Fractal:
Any plans to convert MAME to use OpenGL instead the slow DirectDraw?
Yes I noticed it while I developed MultiJuke.
I'm using BlitzMax to develop MultiJuke and also have noticed DirectDraw was painfully slow in Vista. I have since the lastest version of MultiJuke needed to change the default driver to OpenGL, so it could run MultiJuke at full speed again, due DirectDraw only could run about 1/3 speed and lagged very much....
So DirectDraw is dead now in my eyes and is not even supported by Microsoft since DirectX7. So here I have to agree with Howard in that point.
Navigation
[0] Message Index
[#] Next page
Go to full version