Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Direct3D vs. Directdraw Question  (Read 9133 times)

0 Members and 1 Guest are viewing this topic.

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Direct3D vs. Directdraw Question
« on: May 11, 2014, 02:06:31 pm »
Hi i was wondering when using groovymame, what are the differences between using direct3d vs. directdraw with regards to the following:
1. overall emulation speed
2. input lag
if there are any other advantages/disadvantages between using direct3d vs. directdraw, i'd be interested to know. many thanks

machyavel

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 67
  • Last login:December 25, 2016, 10:23:52 am
Re: Direct3D vs. Directdraw Question
« Reply #1 on: May 12, 2014, 03:34:19 pm »
Hi, Regarding input lag and according to these measurements made by Calamity: http://forum.arcadecontrols.com/index.php/topic,133194.msg1374879.html#msg1374879,
ddraw is preferable over d3d without frame_delay option. Else (frame_delay on) it's about the same.

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: Direct3D vs. Directdraw Question
« Reply #2 on: May 13, 2014, 01:12:56 pm »
cool thanks for the response
hmm so are there any other advantages/disadvantages, just wondering if there is no real difference between the two lately (when using groovymame), or if it's still preferable to use directdraw over direct3d (it seems that using directdraw has been a long running preference amongst real arcade monitor/crt users)

cyb

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 81
  • Last login:December 20, 2023, 04:25:20 pm
Re: Direct3D vs. Directdraw Question
« Reply #3 on: May 14, 2014, 12:24:08 am »
I could be wrong here, but the biggest reason to use direct3d is for HLSL effects. I personally use directdraw since I'm running 15khz crt.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Re: Direct3D vs. Directdraw Question
« Reply #4 on: May 14, 2014, 03:26:59 pm »
Since the video rewrite in MAME v0.107 ddraw was preferred for 15kHz setups because it was the only way to achieve integer scaling with vanilla MAME (leaving apart SDL). But then Cabmame came out with the -cleastretch patch making d3d just as usable.

D3D performs much better than ddraw when scaling is involved. That's why it's almost a requirement with LCD screens or high resolution CRTs.

Sometimes the video card or Windows decide that certain modes are unsupported by your monitor and these are filtered out. You can still force Windows to list them. But trying to set those with d3d will fail. Only ddraw allows you to use the theoretically unsupported modes.

Then it was discovered that the video drivers (ATI at least) set a frame queue when using d3d that adds 2 frames of lag. This frame queue is bypassed when using ddraw. It can also be bypassed with d3d & frame_delay, *but* this produces static tearing when working with high resolutions. Being d3d the only decent alternative for LCDs, this means there's not a good solution for lagless v-sync on LCD screens.

Then it was discovered that in W7, interlaced modes report a halved refresh rate so you can't v-sync on them. This doesn't happen with ddraw. But ddraw is terribly flawed with W7, its set-display-mode api just can't handle interlaced/progressive mode switching and bilinear filtering is only supported with flipping surfaces. So some dirty workarounds had to be implemented in GM to make ddraw an usable option.

Finally the situation with W8 and current drivers looks like ddraw is a fake/emulated interface and not an option anymore.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1547
  • Last login:Yesterday at 04:09:52 pm
  • retro maniac
Re: Direct3D vs. Directdraw Question
« Reply #5 on: December 17, 2014, 02:23:56 am »
Calamity, I'm using windows xp x64 so what method is preferable? Is it better to use D3D with syncrefresh/throttle or DDraw with tripplebuffering ? Many people reporting that using D3D with vsync is less laggy than ddraw with tripplebuffering.

Note that I'm not using frame_delay generally as this caused some games to work at erratic speed even with various games in the same driver.

bulbousbeard

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 522
  • Last login:August 25, 2015, 11:58:25 pm
  • I want to build my own arcade controls!
Re: Direct3D vs. Directdraw Question
« Reply #6 on: December 17, 2014, 10:01:25 pm »
Being d3d the only decent alternative for LCDs, this means there's not a good solution for lagless v-sync on LCD screens.

If you go the LCD route, it's basically G-Sync monitor or don't even get out of bed at this point. It's the only way I'd run an LCD.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7463
  • Last login:July 19, 2025, 04:03:33 am
  • Quote me with care
Re: Direct3D vs. Directdraw Question
« Reply #7 on: December 22, 2014, 04:47:24 pm »
Is it better to use D3D with syncrefresh/throttle or DDraw with tripplebuffering ?

That's a false disjunctive.

If you're talking about GroovyMAME, syncrefresh/throttle should be used always when possible with both D3D & DDraw. When combined with -frame_delay, both methods are equivalent in terms of lag.

Triplebuffering is used when you want asynchronous flipping, either with D3D or DDraw. Multithreading must be enabled for triplebuffering to make sense.

Quote
Many people reporting that using D3D with vsync is less laggy than ddraw with tripplebuffering.

Maybe with regular MAME, not with GroovyMAME.

Quote
Note that I'm not using frame_delay generally as this caused some games to work at erratic speed even with various games in the same driver.

Don't trust the on screen speed percentage when using frame_delay. Use your eyes to judge if the scroll is smooth. If you notice any hiccup, lower the frame_delay value. This option needs to be adjusted game by game.
Important note: posts reporting GM issues without a log will be IGNORED.
Steps to create a log:
 - From command line, run: groovymame.exe -v romname >romname.txt
 - Attach resulting romname.txt file to your post, instead of pasting it.

CRT Emudriver, VMMaker & Arcade OSD downloads, documentation and discussion:  Eiusdemmodi

haynor666

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1547
  • Last login:Yesterday at 04:09:52 pm
  • retro maniac
Re: Direct3D vs. Directdraw Question
« Reply #8 on: December 22, 2014, 05:44:33 pm »
frame_delay in some really produces strange results (Air Attack is good example) and this I've seen just observing game bit majority it didn't causes problems. I've now build new arcade pc based on G3258 clocked to 4,2 GHz on Asus H81M-E so I have more power for games that previosly didn't even enough power to work correctly with frame_delay 1 (like some stv games).

I'm not professional player but I'll try to enable frame_delay 1 just to bypass D3D queue and reduce lag. Probably I won't notice any difference but worth try :)