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: Game speed with black frame insertion, and frame delay.  (Read 4701 times)

0 Members and 1 Guest are viewing this topic.

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Game speed with black frame insertion, and frame delay.
« on: July 05, 2015, 11:41:04 am »
Hi, I have 2 questions, as a 120hz LCD user.

1. When I'm playing a ~59.5fps game with black frame insertion, the framerate in benchmarking tools shows 120fps instead of ~119fps. Is the game still running at its proper speed in this case?

2. I get an ugly horizontal line at the top of the screen when using frame delay 1 with black frame insertion. I want frame delay 1 to reduce input lag. Is there any reason why the two options don't cooperate?

Thanks  :)

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: Game speed with black frame insertion, and frame delay.
« Reply #1 on: July 05, 2015, 12:47:41 pm »
You can't use fd with black frame insertion. The fd option is still experimental and not suited for all situations. If you use W7 and want to reduce latency, use one of the d3d9ex builds recently posted in the gm asio thread.
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

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #2 on: July 05, 2015, 04:58:02 pm »
Ok. I read the last 3 pages of that thread, and I kind of got the impression that you'd concluded that d3d9ex wasn't that interesting: "I'm not so much interested about D3D9Ex any more". Do you still think I should use it? I have Windows 8, but I can turn off Aero, and I also have RadeonPro which it seems like I can use with GM according to Dr. Venom. Can you recommend me a frame_delay value?

Thanks

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: Game speed with black frame insertion, and frame delay.
« Reply #3 on: July 05, 2015, 05:06:42 pm »
The contents in that thread are misleading for your specific case. Just use the d3d9ex I posted, no extra configuration needed (RadeonPro, Aero, etc.). I recommended the d3d9ex so you can have minimum latency *without* frame_delay. As explained you can't use frame_delay with black frame insertion.
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

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #4 on: July 05, 2015, 05:19:45 pm »
Ah, I get you. I'm now using MAME 0.162 with the exe from mame64_d3d9ex_flush. Monitor set to lcd, black_frame_insertion 1, lcd_range 119-120, audio_latency 1.0, and everything else untouched.

And how about the game speed? Is it increased to 60fps in order to synchronize with black frame insertion, or is the game still running at ~59.5 and therefore not entirely in sync with the black frame insertion?

Edit: I timed 2 rounds of Street Fighter III 3rd Strike (59.583fps) using the same 2 characters and same stage. I made sure the transition between rounds was the same. The game ran quicker (same ratio of 59.583 to 60) with black frame insertion enabled, so it's no longer an option for me. I suppose this now means I should go back to regular GM + frame delay instead of the d3d9ex build, right? I have a few questions.

1. What value of frame delay would you recommend? I've got it on 8, based on what I understood from the ASIO thread.
2. Would you also recommend RadeonPro? I'm using it and not getting problems, but I also can't tell if it's helping.
3. I should disable Aero for the regular GM build, right?
4. Finally, am I right in thinking there's no consensus on multithreading yet? It's on the default setting currently.

Thanks
« Last Edit: July 05, 2015, 10:57:51 pm by filimpan »

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: Game speed with black frame insertion, and frame delay.
« Reply #5 on: July 06, 2015, 03:54:31 am »
filimpan,

Obviously the game is running at 120/2 = 60 Hz. Black frame insertion needs to be perfectly synchronized with the refresh or it will flash as hell, so the game speed needs to be adjusted. It's the same as if you were running it at 60 Hz without black frame insertion.

GM + frame delay is going to be the same, it'll run at 60 Hz. Besides, frame delay will cause static tearing on an LCD, that's why I was recommending you the d3d9ex build.

If you really want custom refresh rates for proper emulation consider using a CRT or an g-sync/free-sync LCD monitor.

1. Depends on your cpu
2. It won't harm but probably won't make any difference
3. No need, full screens apps bypass Aero
4. Rather than no consensus there's generally no understanding of it. Multithreading is required in some scenarios, may be benefitial  in usual setups, may be problematic if using invasive frontends, and seems to affect slightly to the stability of ultra low-latency audio setups that is what you've been reading.

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

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #6 on: July 06, 2015, 08:11:56 am »
Oddly enough, I timed the same thing (2 rounds of Street Fighter) using [GM + frame delay] and got the same time as I got with [d3d9ex], [GM without frame delay], and [ShmupMAME] (as a further point of reference). For consistency, I ran [GM without frame delay] and [GM without frame delay + black frame insertion] three times each and got 3:08.50 and 3:07.20 each time, respectively. [GM + frame delay] came out with 3:08.50, implying it was running at the same speed as [GM without frame delay].

Unlike in previous runs where my benchmarking tool showed a solid 120fps (60fps) or a solid 59.6, [GM + frame delay] showed hitches in frametime of exactly 20ms and 8ms <1% of the time, indicating single frames rendered at 50fps and 120fps at regular (but long) intervals. I guess this means I shouldn't use frame delay either :hissy:. It's getting more and more tempting to build a secondary machine with XP+CRT+old AMD card.

I'm sorry to be a pain, but could you please provide a build of d3d9ex_flush with ASIO, or a diff (maybe I could apply it to GM 0.163?)? That build only came as a binary, but I want to make use of ASIO as well.

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: Game speed with black frame insertion, and frame delay.
« Reply #7 on: July 06, 2015, 08:28:25 am »
Hi filimpan,

Don't get frustrated ;)

When I recommend something, I usually don't have the time to explain all the reasons for everything and many users just don't care. I said "don't use frame delay for your case" for a reason: you are using 120 Hz. For frame delay you need to run the monitor at the exact refresh of the game, or either accept the speed adjustment. But if the speed is double, like 120 Hz, you'll get a unstable frame rate because frame delay is not designed for refresh scaling.

In the ASIO thread I posted a diff for the d3d9ex_flush iirc. But better use the first one I posted in there (without the flush thing).

But keep this in mind: you won't achive proper emulation at 59.60 Hz using an LCD. The refresh mismatch of 59.60 vs 60/120 means crappy animation, whatever you do.

And you don't need XP, you can use CRT Emudriver for W7.
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

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #8 on: July 06, 2015, 09:28:52 am »
I figured you can't baby every new member, so I really do appreciate your help :).

So, I should apply diffs in this order to MAME 0.163?

1) hi_163.diff
2) 0163_groovymame_015h.diff
3) d3d9ex_koopah.diff.txt OR fd_mod.diff.txt (which one?)
4) asio_163_r1.txt

Also I do badly want a CRT for scanlines, better input lag, smoothness, resolution, and correct refresh rate. Seems like a lot of reasons. I don't really know where to get a good one though, and I also don't have space yet to have two monitors. It'll be a project for the future :laugh:
« Last Edit: July 06, 2015, 09:32:57 am by filimpan »

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: Game speed with black frame insertion, and frame delay.
« Reply #9 on: July 06, 2015, 09:35:51 am »
3) d3d9ex_koopah.diff.txt OR fd_mod.diff.txt (which one?)
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

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #10 on: July 06, 2015, 03:47:54 pm »
I encountered a problem. I read various guides, but they all seemed to relate to Mingw rather than the Mame Dev Tools found currently on the MAME website, and I couldn't find out what the "-p0 -E --binary" flags do. Anyway, I downloaded and installed the tools from the MAME site and it installed into a folder called "buildtools". I downloaded the MAME source code, and then took out Mame.zip, and the contents of that, I put into the empty "src" folder in the "buildtools" folder.

I ran cmder.exe, then:
patch -p0 -E --binary <hi_0163.diff
patch -p0 -E --binary <0163_groovymame_015h.diff
patch -p0 -E --binary <d3d9ex_koopah.diff (I just renamed the txt file)
patch -p0 -E --binary <asio_163_r1.diff (same as above)

It all seemed to go well, but the last one says "can't find file to patch at input line 4". I'm not sure if I'm putting the right folders into the right places or running the right commands. Maybe "-p0 -E --binary" is the issue?

Can I just get some help on the last one, and confirmation that I'm doing this properly? If I just run "make" after this, will that be good?

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: Game speed with black frame insertion, and frame delay.
« Reply #11 on: July 06, 2015, 04:10:49 pm »
I encountered a problem. I read various guides, but they all seemed to relate to Mingw rather than the Mame Dev Tools found currently on the MAME website, and I couldn't find out what the "-p0 -E --binary" flags do. Anyway, I downloaded and installed the tools from the MAME site and it installed into a folder called "buildtools". I downloaded the MAME source code, and then took out Mame.zip, and the contents of that, I put into the empty "src" folder in the "buildtools" folder.

I ran cmder.exe, then:
patch -p0 -E --binary <hi_0163.diff
patch -p0 -E --binary <0163_groovymame_015h.diff
patch -p0 -E --binary <d3d9ex_koopah.diff (I just renamed the txt file)
patch -p0 -E --binary <asio_163_r1.diff (same as above)

It all seemed to go well, but the last one says "can't find file to patch at input line 4". I'm not sure if I'm putting the right folders into the right places or running the right commands. Maybe "-p0 -E --binary" is the issue?

Can I just get some help on the last one, and confirmation that I'm doing this properly? If I just run "make" after this, will that be good?

You can skip the last patch (asio_163_r1.diff) if you only want the benefits of d3d9ex.

If you want ASIO, see this post about how to apply the patch, http://forum.arcadecontrols.com/index.php/topic,142143.msg1517321.html#msg1517321 and read the first post in the ASIO thread of how to configure it with ASIO4ALL (if you don't have a sound card that handles ASIO natively)
« Last Edit: July 06, 2015, 04:15:55 pm by intealls »

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #12 on: July 06, 2015, 04:51:22 pm »
Thanks. I definitely want Asio. What I did was patch -p1 -E --binary <asio_163_r1.txt. I still don't know what p1 and p0 are, but it ran.

I got "hunk #1 failed at 26" and "1 out of 6 hunks failed". It's the only patch that had what looks to be an error in it. Apparently this happens when the code isn't the right version for the patch. I'll try MAME 0.162 and all the patches for 0.162 instead of 0.163, and hopefully that works?

BTW, what is the --binary flag for? I ask because your instructions don't use that flag.

Edit: Using 0.162 versions of MAME and GM worked. I got some "Hunk #n succeeded at nnn (offset n lines)" messages with the 0.163 ASIO patch, but it did say in the thread it was meant for 0.162/0.163 so I guess it's OK?
« Last Edit: July 06, 2015, 05:05:35 pm by filimpan »

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: Game speed with black frame insertion, and frame delay.
« Reply #13 on: July 06, 2015, 05:05:00 pm »
Thanks. I definitely want Asio. What I did was patch -p1 -E --binary <asio_163_r1.txt. I still don't know what p1 and p0 are, but it ran.

I got "hunk #1 failed at 26" and "1 out of 6 hunks failed". It's the only patch that had what looks to be an error in it. Apparently this happens when the code isn't the right version for the patch. I'll try MAME 0.162 and all the patches for 0.162 instead of 0.163, and hopefully that works?

BTW, what is the --binary flag for? I ask because your instructions don't use that flag.

Where did it fail? I can apply it cleanly to 0.163 by following the instructions outlined in the post.

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: Game speed with black frame insertion, and frame delay.
« Reply #14 on: July 06, 2015, 05:09:16 pm »
Edit: Using 0.162 versions of MAME and GM worked. I got some "Hunk #n succeeded at nnn (offset n lines)" messages with the 0.163 ASIO patch, but it did say in the thread it was meant for 0.162/0.163 so I guess it's OK?

0.162 should work as well.

filimpan

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:November 28, 2017, 01:54:38 pm
  • I want to build my own arcade controls!
Re: Game speed with black frame insertion, and frame delay.
« Reply #15 on: July 06, 2015, 05:10:26 pm »
OK, unfortunately, when running "make -j5" I got "makefile:677: recipe for target 'windows_x64' failed" and "make: *** [windows_x64] Error 2".

Edit: let me try one more time. Maybe the --binary flag is doing something

Edit 2: got no "Hunk #n succeeded at nnn (offset n lines)" this time by doing the same thing but without the "--binary" flag. Running "fix_bassasio_mingw.bat" didn't seem to do anything though. I'm running "make -j5" now

Edit 3: k, i got it :). Thank you intealls!
« Last Edit: July 06, 2015, 08:09:50 pm by filimpan »