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: New 120Hz TFTs how to configure MAME for zero motion blur  (Read 23351 times)

0 Members and 1 Guest are viewing this topic.

mdrejhon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:September 12, 2022, 01:24:28 am
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #40 on: May 31, 2013, 09:17:19 pm »
You know I thought maybe I was just getting better at timing the combos in street fighter but I guess if you think about it, your given an extra frame to pull off a move. Which I guess is kind of cheating.. but I'm not playing competitively or anything. And it evens the score against the cheap CPU. ;)

So it's not really input lag but extra input time.
It's still input lag.

1. This is because original arcade games didn't have a buffer.  They scanned out the graphics in real-time to a CRT.
2. Emulated MAME adds input lag, compared to the original machine, because MAME uses a framebuffer where none originally existed.
3. Using 120Hz reduces this MAME framebuffer lag.

So you're actually getting closer to original manufactured videogame responsiveness, by reducing the MAME framebuffer lag.
« Last Edit: May 31, 2013, 09:18:52 pm by mdrejhon »

skullwolf

  • Trade Count: (0)
  • Newbie
  • *
  • Offline Offline
  • Posts: 1
  • Last login:June 01, 2013, 01:42:08 am
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #41 on: May 31, 2013, 11:18:39 pm »
Mind re-uploading the source patch or binaries since free-game.es fell off the face of the earth?

Edit: Saw you posted the diff on the previous page, got it to compile and it works great even on my old Samsung 2233RZ.  Thanks for all your hard work on this!
« Last Edit: June 01, 2013, 01:37:16 am by skullwolf »

mdrejhon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:September 12, 2022, 01:24:28 am
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #42 on: June 02, 2013, 06:52:56 am »
Mind re-uploading the source patch or binaries since free-game.es fell off the face of the earth?
Edit: Saw you posted the diff on the previous page, got it to compile and it works great even on my old Samsung 2233RZ.  Thanks for all your hard work on this!
Can someone please make this an official part of one of the public MAME releases?

Sincerely,
Mark Rejhon

cpharlok

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:June 26, 2013, 07:24:46 pm
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #43 on: June 15, 2013, 08:00:29 pm »
Hi, sorry for being offline for some time. I saw that freegame went offline, tomorrow I will upload it to another place and update it.


cpharlok

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19
  • Last login:June 26, 2013, 07:24:46 pm
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #44 on: June 16, 2013, 11:56:03 am »
Here you are, the updated links:

DIFF:

http://db.tt/linhVuTQ

COMPILED:

http://db.tt/jOknzHEU

And soon Openmsx also :D . Just trying to fix some sound sync issues. BTW Openmsx do not use Directx and I thought it is mandatory to do the trick, but seems that SDLGL when going fullscreen it uses the same desktop resolution and refresh rate so in fact is 3D enabled already, so black frame trick works perfectly.

Silverwind

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 807
  • Last login:September 26, 2022, 12:49:09 am
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #45 on: July 10, 2013, 04:12:04 pm »
Hi mdrejhon,

Thanks for spreading this. I just want to clarify I'm not one of the MAME devs, so I can't add anything into MAME documentation. Of course I will add your link for reference on the new GroovyMAME update when this feature is included.

The new version is a bit delayed as there are some bulk changes to the source that need to be done, probably not so exciting stuff but defintely required.

The -strobe patch (or "-black_frame_insertion" if we rename it finally), as it is now, is just too hacky for MAME devs to consider, however a reworked version of it might have some chance some day, especially when there's general awareness (i.e: mameworld forums) of the improved visual experience (it might be early for this yet, as most of us still use 60 Hz panels). If you think about it, HLSL is definitely much more baroque and managed to get its way into baseline MAME.

Just thought I'd copy the patch here so people following this thread understand what we're talking about. This is to be applied to baseline MAME v0.148, NOT GroovyMAME. It adds a new option named -strobe, so create a new mame.ini (mame -cc). This is for 120 Hz LCD only.

For proper operation, these parameters are *required*: -strobe -video d3d -syncrefresh -nothrottle -nomultithreading

Code: [Select]
diff -rupN ./src/osd/windows/drawd3d.c ./src/osd/windows/drawd3d.c
--- ./src/osd/windows/drawd3d.c 2013-01-11 08:32:46.000000000 +0100
+++ ./src/osd/windows/drawd3d.c 2013-03-01 22:34:18.000000000 +0100
@@ -545,6 +545,7 @@ static int drawd3d_window_draw(win_windo
 {
  d3d_info *d3d = (d3d_info *)window->drawdata;
  render_primitive *prim;
+ static bool blank_frame;
  HRESULT result;
 
  // if we're in the middle of resizing, leave things alone
@@ -581,6 +582,9 @@ mtlog_add("drawd3d_window_draw: begin");
 
  d3d->hlsl->record_texture();
 
+ blank_frame = !blank_frame;
+ if (!video_config.strobe || !blank_frame){
+
  // first update any textures
  window->primlist->acquire_lock();
  for (prim = window->primlist->first(); prim != NULL; prim = prim->next())
@@ -629,7 +633,7 @@ mtlog_add("drawd3d_window_draw: primitiv
  }
 mtlog_add("drawd3d_window_draw: primitive loop end");
  window->primlist->release_lock();
-
+}
  // flush any pending polygons
 mtlog_add("drawd3d_window_draw: flush_pending begin");
  primitive_flush_pending(d3d);
diff -rupN ./src/osd/windows/video.c ./src/osd/windows/video.c
--- ./src/osd/windows/video.c 2011-12-15 15:10:46.000000000 +0100
+++ ./src/osd/windows/video.c 2013-03-01 21:57:39.000000000 +0100
@@ -427,6 +427,7 @@ static void extract_video_config(running
  video_config.syncrefresh   = options.sync_refresh();
  video_config.triplebuf     = options.triple_buffer();
  video_config.switchres     = options.switch_res();
+ video_config.strobe        = options.strobe();
 
  // ddraw options: extract the data
  video_config.hwstretch     = options.hwstretch();
diff -rupN ./src/osd/windows/video.h ./src/osd/windows/video.h
--- ./src/osd/windows/video.h 2013-01-11 08:32:46.000000000 +0100
+++ ./src/osd/windows/video.h 2013-03-01 21:56:26.000000000 +0100
@@ -100,6 +100,7 @@ struct win_video_config
  int                 syncrefresh;                // sync only to refresh rate
  int                 triplebuf;                  // triple buffer
  int                 switchres;                  // switch resolutions
+ int                 strobe;                     // strobe to reduce motion blur
 
  // ddraw options
  int                 hwstretch;                  // stretch using the hardware
diff -rupN ./src/osd/windows/window.c ./src/osd/windows/window.c
--- ./src/osd/windows/window.c 2013-01-11 08:32:46.000000000 +0100
+++ ./src/osd/windows/window.c 2013-03-01 22:57:29.000000000 +0100
@@ -817,7 +817,11 @@ void winwindow_video_window_update(win_w
  if (multithreading_enabled)
  PostMessage(window->hwnd, WM_USER_REDRAW, 0, (LPARAM)primlist);
  else
+ {
  SendMessage(window->hwnd, WM_USER_REDRAW, 0, (LPARAM)primlist);
+ if (video_config.strobe)
+ SendMessage(window->hwnd, WM_USER_REDRAW, 0, (LPARAM)primlist);
+ }
  mtlog_add("winwindow_video_window_update: PostMessage end");
  }
  }
diff -rupN ./src/osd/windows/winmain.c ./src/osd/windows/winmain.c
--- ./src/osd/windows/winmain.c 2013-01-11 08:32:46.000000000 +0100
+++ ./src/osd/windows/winmain.c 2013-03-01 21:53:05.000000000 +0100
@@ -422,6 +422,7 @@ const options_entry windows_options::s_o
  { WINOPTION_FULLSCREENBRIGHTNESS ";fsb(0.1-2.0)", "1.0",      OPTION_FLOAT,      "brightness value in full screen mode" },
  { WINOPTION_FULLSCREENCONTRAST ";fsc(0.1-2.0)",   "1.0",      OPTION_FLOAT,      "contrast value in full screen mode" },
  { WINOPTION_FULLSCREENGAMMA ";fsg(0.1-3.0)",      "1.0",      OPTION_FLOAT,      "gamma value in full screen mode" },
+ { WINOPTION_STROBE ";st",                         "0",        OPTION_BOOLEAN,    "alternate a normal and a blank frame, intended to remove motion blur on 120

Hz monitors" },
 
  // sound options
  { NULL,                                           NULL,       OPTION_HEADER,     "WINDOWS SOUND OPTIONS" },
diff -rupN ./src/osd/windows/winmain.h ./src/osd/windows/winmain.h
--- ./src/osd/windows/winmain.h 2013-01-11 08:32:46.000000000 +0100
+++ ./src/osd/windows/winmain.h 2013-03-01 21:29:57.000000000 +0100
@@ -143,6 +143,7 @@
 #define WINOPTION_FULLSCREENBRIGHTNESS  "full_screen_brightness"
 #define WINOPTION_FULLSCREENCONTRAST    "full_screen_contrast"
 #define WINOPTION_FULLSCREENGAMMA       "full_screen_gamma"
+#define WINOPTION_STROBE                "strobe"
 
 // sound options
 #define WINOPTION_AUDIO_LATENCY         "audio_latency"
@@ -262,6 +263,7 @@ public:
  float full_screen_brightness() const { return float_value(WINOPTION_FULLSCREENBRIGHTNESS); }
  float full_screen_contrast() const { return float_value(WINOPTION_FULLSCREENCONTRAST); }
  float full_screen_gamma() const { return float_value(WINOPTION_FULLSCREENGAMMA); }
+ bool strobe() const { return bool_value(WINOPTION_STROBE); }
 
  // sound options
  int audio_latency() const { return int_value(WINOPTION_AUDIO_LATENCY); }

Do you have a setting for 120hz CRT, with the black frame insertion?

Falkentyne

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 14
  • Last login:July 11, 2013, 11:20:50 am
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #46 on: July 11, 2013, 06:49:59 am »
Hi, I posted a request on the last page but no one replied :(:(

Can you guys kindly make a strobed version of the older 0.139 version (64 bit) if possible?  I mentioned that the 0.148 version has problems with save states in the Atari system 1 games (Gauntlet and others).
Just a request.... please?

mdrejhon

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 35
  • Last login:September 12, 2022, 01:24:28 am
  • I want to build my own arcade controls!
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #47 on: July 14, 2013, 06:42:40 am »
MAME developers and others:

Here's a web animation of software-based black-frame insertion.
(Blur Busters Motion Test website, requires Chrome, IE 10+ or FireFox 24+; quit all apps and browser tabs for smooth operation)

http://www.testufo.com/#test=blackframes

If you run at 60Hz, it will demonstrate 30fps + black frames insertion.
If you run at 120Hz, it will demonstrate 60fps + black frames insertion.

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #48 on: July 14, 2013, 11:32:57 am »
Hi, I posted a request on the last page but no one replied :(:(

Can you guys kindly make a strobed version of the older 0.139 version (64 bit) if possible?  I mentioned that the 0.148 version has problems with save states in the Atari system 1 games (Gauntlet and others).
Just a request.... please?

Hi Falkentyne, sorry but I don't have the time atm to make custom builds. However the patch is available and it should be possible to backport it to v0.139. I think you should consider reporting this problem with Gauntlet save states to MAMEdevs so it can get fixed in the main line project.
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

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #49 on: May 14, 2018, 07:03:11 am »

I'm looking to improve display lag and blur.

Are the ideas above still relevant / state of the art ?

Are the necessary options in groovymame now ? or what's the most up to date patch/diff?

What are some good screens to use? eg  24" 120fps
On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7411
  • Last login:March 14, 2024, 05:26:05 am
  • Quote me with care
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #50 on: May 14, 2018, 12:12:29 pm »
This thread is obsolete. GroovyMAME supports black frame insertion since long. The relevant options now are:

-monitor lcd
-black_frame_insertion
-syncrefresh
-lcd_range 60-120  ->this one is required for 120Hz lcds

This will work as long as your desktop is configured with a 120 Hz video mode.

Be warned that the result won't probably be as nice as you may expect.
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

jimmer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 561
  • Last login:March 17, 2024, 06:03:11 pm
  • I want to play Defender like at the arcade.
Re: New 120Hz TFTs how to configure MAME for zero motion blur
« Reply #51 on: May 14, 2018, 05:31:20 pm »

Be warned that the result won't probably be as nice as you may expect.

I don't have a 120fps capable monitor at the moment. From the above comment I don't think I want to pursue this method.

(If I end up with a high frame rate monitor I run the above to see the result). 




On forums jimmer speaks for himself as a Defender fan, not as proprietor of www.jbgaming.co.uk  << Is that advertising or disclosure ? or both ?