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: How to use vsync offset?  (Read 2597 times)

0 Members and 1 Guest are viewing this topic.

ABTmRw

  • Guest
  • Trade Count: (0)
How to use vsync offset?
« on: August 24, 2020, 02:18:46 am »
Groovy MAME is setup with HLSL and frame delay.  Can someone please give a quick rundown of how to use vsync offset to get rid of or minimize screen tearing?

ABTmRw

  • Guest
  • Trade Count: (0)
Re: How to use vsync offset?
« Reply #1 on: August 24, 2020, 07:13:01 pm »

schmerzkaufen

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 791
  • Last login:October 03, 2023, 02:27:31 pm
  • Multiple Electronic Machine Emulator
Re: How to use vsync offset?
« Reply #2 on: August 25, 2020, 02:34:47 am »
Why are you digging around old things like that likely to make it more complicated ?

The main guide on eiusdemmodi that I linked, and our recent exchanges, already have the explanation how to use vsync_offset.

This just tells you haven't read carefully.

You'll also find several posts here on BYOAC, or the shmups forums also, that explain how to use vsync_offset for lcd users.

http://forum.arcadecontrols.com/index.php/topic,163313.0.html
Quote
you may see tearing, and will have to use the vsync_offset setting in conjunction with frame delay.
Typically: create one gamename.ini per game, and set a value that will eliminate that tearing.

Note you should do this AFTER setting HLSL, otherwise it'll throw off your vsync_offset settings.

http://geedorah.com/eiusdemmodi/forum/viewtopic.php?id=433
Quote
4. vsync_offset                     0

The V-sync offset feature only makes sense if a tearing effect appears with -frame_delay. Tearing happens with high resolutions, when there's substantial scaling going on, be it 640 x 480 or 2560 x 240. At high resolutions, the time it takes the GPU to scale a frame starts being longer than the blanking period itself, which may cause static tearing when -frame_delay is used.

To compensate this issue, -vsync_offset forces the render code to be called a number of lines ahead of time. Ideally, using a proper value realigns the render completion with the end of the blanking period, cleanly removing all tearing, but you'll need a fairly fast graphics card in order to fully remove tearing. The higher the tearing line appears on the screen initially, the faster your card is, and the more chances of completely hiding tearing through -vsync_offset. The value should be typed as the estimated number of scan lines required to hide the effect for every particular case.

Notice that it'll be required to lower the -frame_delay value proportionally to the amount of lines set in -vsync_offset.

You have a 1920x1080 display, if the tearing line appears around 1/5th of the screen's height from the top, which makes about 200 lines, then try 200 for vsync_offset value. It may not work perfectly on the first try, therefore adjust the value until tearing completely disappears.
If you can't make it disappear try decreasing frame_delay by 1 and do it again.
The more powerful your card the easier it will be to eliminate the tearing line, even while using HLSL.

EDIT: more here found in 1 minute googling groovymame frame_delay vsync_offset; https://shmups.system11.org/viewtopic.php?p=1379400#p1379400
Quote
3. Note about frame_delay: set it to 1 (TAB ingame > sliders > frame delay 1) and you'll get only 1 frame of input delay.
(note: steps do not correspond to a number of frames, they have to do with input polling, so don't try to use this like run-ahead)

it might introduce a bit of screen tearing at the top of the screen (more so if you increase it to get even less delay)
in which case create more .ini files, either individual ones dedicated to a single game (like rtype.ini) or to a system (cps2.ini), but put the latter in the 'source' subfolder.
and inside write this;
Code: [Select]
vsync_offset              0and define a value corresponding to the approximate number of scanlines to correct on your screen.
if the tearing line is located around 1/5th of the screen from the top, then try 200 or more, e.g. (nb: that's if you have a 1080p display, with a 1440 it would be a value closer to 300, etc)
Code: [Select]
vsync_offset              200if the tearing line is very low, like 1/3rd or in the middle of the screen, then reduce frame_delay and try again.

--

I hate myself for having explained this for maybe the Nth time when I swore I wouldn't, because I know out of the dozens I've explained often taking the matter entirely into my hands, the users haven't followed the recommendations seriously nor cooperated enough.

This absence of a feature in GroovyMAME is just massive time waster, it makes it unpractical for most aspirant flat panels users because it is too complicated, the guides don't detail clearly enough how to use it, and the forums much too f*cking deserted even by its developer and contributors for support.

Until Calamity implements the vsync_offset slider I tell people again: DON'T USE GROOVYMAME ON LCDS IF YOU ARE NOT SERIOUS ENOUGH TO READ AND LEARN THOROUGHLY, BUY GSYNC~FREESYNC HARDWARE INSTEAD, OR WAIT A YEAR OR TWO UNTIL CALAMITY IS DONE.
« Last Edit: August 25, 2020, 03:14:02 am by schmerzkaufen »

ABTmRw

  • Guest
  • Trade Count: (0)
Re: How to use vsync offset?
« Reply #3 on: August 25, 2020, 01:28:43 pm »
Thanks for the reply!

I did eventually figure it out and I have it working with HLSL.