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: Frame Delay: does it work with ddraw as well?  (Read 3683 times)

0 Members and 1 Guest are viewing this topic.

donluca

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Today at 05:10:19 am
  • I want to build my own arcade controls!
Frame Delay: does it work with ddraw as well?
« on: November 20, 2015, 02:25:08 pm »
Title.

Also, is it necessary to play around with frame delay using d3d9ex?

Most important then both these questions, actually: are any advantages using frame delay with ddraw or d3d9ex?
On a scale of fakeness, from more genuine to more fake, we'd have:

1.- Plastic plants (cf. Fake Plastic Trees)
2.- Inflatable dolls
3.- Arcade cabinets with LCD monitors

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 322
  • Last login:May 27, 2025, 02:19:06 pm
  • I want to build my own arcade controls!
Re: Frame Delay: does it work with ddraw as well?
« Reply #1 on: November 20, 2015, 03:51:23 pm »
Frame delay works just fine with ddraw/d3d/d3d9ex. I've noticed that d3d/d3d9ex performs better on my rig, but this can probably vary depending on your hardware configuration.

donluca

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Today at 05:10:19 am
  • I want to build my own arcade controls!
Re: Frame Delay: does it work with ddraw as well?
« Reply #2 on: November 20, 2015, 04:00:20 pm »
Frame delay works just fine with ddraw/d3d/d3d9ex. I've noticed that d3d/d3d9ex performs better on my rig, but this can probably vary depending on your hardware configuration.

Thanks for the reply!

Since ddraw already skips the frame queue, does frame delay actually do anything with this render? Like lower input lag or something?
I've made some tests and when using frame delay a lots of games become very slow, unless I enable multithreading and triple buffer.
On a scale of fakeness, from more genuine to more fake, we'd have:

1.- Plastic plants (cf. Fake Plastic Trees)
2.- Inflatable dolls
3.- Arcade cabinets with LCD monitors

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: Frame Delay: does it work with ddraw as well?
« Reply #3 on: November 20, 2015, 04:40:44 pm »
Since ddraw already skips the frame queue, does frame delay actually do anything with this render? Like lower input lag or something?
I've made some tests and when using frame delay a lots of games become very slow, unless I enable multithreading and triple buffer.

Frame delay doesn't work with triplebuffer, only with syncrefresh. Frame delay is very cpu expensive, that's why you can't use a general setting for it and you need to apply a custom value per game.

Once you remove the frame queue, you're in the theoretical situation described by the emulation literature where "emulation by definition always has one frame of lag compared to real hardware". The purpose of frame delay is to remove that remaining frame of lag and match the behaviour of actual hardware.
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

donluca

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Today at 05:10:19 am
  • I want to build my own arcade controls!
Re: Frame Delay: does it work with ddraw as well?
« Reply #4 on: November 20, 2015, 05:04:22 pm »
Ahhh that makes it clear.

Let me see if I understood it correctly.

Frame delay is used for:

1 - Remove the frame queue (3 frames of lag) – only applicable to d3d, ddraw doesn't have frame queue.
2 - Remove the remaining frame of lag due to emulation

and it only works with syncrefresh.


Triplebuffer doesn't work with syncrefresh, as such, it doesn't work with frame delay. This means that by using triplebuffer we still have the framequeue with d3d (3 frames of lag) plus the emulation lag (1 frame) and... theoretically more due to buffering?

But triplebuffer is needed in order to let vsync work in a separate thread with the multithread option.


Right? :P
On a scale of fakeness, from more genuine to more fake, we'd have:

1.- Plastic plants (cf. Fake Plastic Trees)
2.- Inflatable dolls
3.- Arcade cabinets with LCD monitors

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: Frame Delay: does it work with ddraw as well?
« Reply #5 on: November 20, 2015, 05:33:35 pm »
Frame delay is used for:

1 - Remove the frame queue (3 frames of lag) – only applicable to d3d, ddraw doesn't have frame queue.
2 - Remove the remaining frame of lag due to emulation

The purpose of frame delay is (2). (1) is a side effect and only applies to d3d.

Triplebuffer and syncrefresh are mutually exclusive. GM always tries to use syncrefresh when possible.

Triplebuffer with d3d must be affected by the frame queue (haven't checked). Triplebuffer with ddraw or d3d9ex must be only one frame of lag more than syncrefresh + frame_delay, in the worst case.

Triplebuffer requires mt in order to actually work. It's purpose is to perform tearing-free asynchronous rendering (an unsupported feature by default at least until DX 10).
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

donluca

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 275
  • Last login:Today at 05:10:19 am
  • I want to build my own arcade controls!
Re: Frame Delay: does it work with ddraw as well?
« Reply #6 on: November 20, 2015, 06:07:00 pm »
Triplebuffer with ddraw or d3d9ex must be only one frame of lag more than syncrefresh + frame_delay, in the worst case.

So it's better to use ddraw (win xp) or d3d9ex (win7) with triplebuffer instead of d3d, lag wise.

When you have some spare time, can you do a test to see if triplebuffer with d3d is affected by frame queue?

Also, I wanted to report that using triplebuffer + multithreading hasn't caused any kind of scrolling stutter so far on lots of games.
On a scale of fakeness, from more genuine to more fake, we'd have:

1.- Plastic plants (cf. Fake Plastic Trees)
2.- Inflatable dolls
3.- Arcade cabinets with LCD monitors

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: Frame Delay: does it work with ddraw as well?
« Reply #7 on: November 20, 2015, 06:24:16 pm »
Also, I wanted to report that using triplebuffer + multithreading hasn't caused any kind of scrolling stutter so far on lots of games.

It does cause scrolling stutter, it may be subtle but it does. Only use it when is strictly necessary.
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