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: Can I add some delay into groovymame ?  (Read 4763 times)

0 Members and 1 Guest are viewing this topic.

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.
Can I add some delay into groovymame ?
« on: December 15, 2016, 09:46:21 pm »

I'm happy with my groovymame set up.

But is there a way to add in a specific amount of input lag? So I can feel what eg 2 frames more lag is like.
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 ?

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: Can I add some delay into groovymame ?
« Reply #1 on: December 15, 2016, 11:28:01 pm »

interesting idea  ;D

... in the meantime, if you want to feel what 4 frames of lag is like, start a game of galaga'88 and move your spaceship left and right ...

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: Can I add some delay into groovymame ?
« Reply #2 on: December 16, 2016, 06:37:45 am »

interesting idea  ;D

... in the meantime, if you want to feel what 4 frames of lag is like, start a game of galaga'88 and move your spaceship left and right ...

Feels OK to me in groovymame0171. Has it been broken recently then?
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 ?

adder

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 640
  • Last login:February 04, 2021, 10:51:51 am
  • Location: Easy St.
Re: Can I add some delay into groovymame ?
« Reply #3 on: December 18, 2016, 11:21:21 am »
hey, sorry for the delay i dont seem to come by this way as often as i used to  (it used to be daily)  :)

as far as i remember, galaga'88 has 4 frames of lag buit into the game as default (even with the arcade pcb).  or if im wrong, dont know if anyone else can confirm?

im way behind on my groovymame version i use, my version is a couple of years old now  (im still using XP 64bit),  if i were to upgrade i would really be looking to move forward and start over with windows 7.   but anyway im ok as i am at the moment, not in a rush or urgency to upgrade

anyway, so i havnt tried galaga'88 lately, and not with a version of mame or groovymame from the last couple of years

Dacasks

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 57
  • Last login:February 09, 2021, 09:30:30 pm
  • I want to build my own arcade controls!
Re: Can I add some delay into groovymame ?
« Reply #4 on: December 18, 2016, 02:33:47 pm »
Didn't know about that on galaga.

Just tried on Shmupmame out for curiosity and much of the lag is gone.

I guess breaking the game makes up for it sometimes :D

would be good a "GroovyShmupmame" for these cases. Or at least if shmupmame used the native resolutions correctly...

Calamity

  • Moderator
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Can I add some delay into groovymame ?
« Reply #5 on: December 19, 2016, 06:56:50 am »

I'm happy with my groovymame set up.

But is there a way to add in a specific amount of input lag? So I can feel what eg 2 frames more lag is like.

If you're not using frame_delay, then quite probably you're already experiencing 3 frames of lag.
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: Can I add some delay into groovymame ?
« Reply #6 on: January 13, 2017, 01:17:11 pm »

I'm happy with my groovymame set up.

But is there a way to add in a specific amount of input lag? So I can feel what eg 2 frames more lag is like.

If you're not using frame_delay, then quite probably you're already experiencing 3 frames of lag.

I am using frame_delay (=8). 

I'm a bit confused by your comment, are you suggesting that I will have 2 frames of delay even with say frame delay 9 ?

I thought frame_delay was the final part of the puzzle to get response as good as (or better) than the arcade pcb  ???

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: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Can I add some delay into groovymame ?
« Reply #7 on: January 13, 2017, 02:43:12 pm »
Please read my comment again: "If you are not...
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: Can I add some delay into groovymame ?
« Reply #8 on: January 13, 2017, 04:36:45 pm »
Please read my comment again: "If you are not...

I read it OK. What confused me is frame_delay makes a maximum of 0.9 of a frame difference. So you appeared to be characterising groovymame as causing 2 frames of lag?  Whereas it's been my understanding that groovymame with frame_delay 9 is effectively zero lag.

The reason I made this thread is because I've tested back to back with original hardware and I couldn't feel a difference between that and my groovymame set-up. But I don't know how sensitive I am, ie whether or not I would feel 1 frame or 2 frames of lag because I've never had a system with a known amount of lag.
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 ?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:Yesterday at 02:56:48 pm
  • I want to build my own arcade controls!
Re: Can I add some delay into groovymame ?
« Reply #9 on: January 13, 2017, 05:07:35 pm »
This tool is very useful when testing input lag:

http://junkerhq.net/xrgb/index.php/240p_test_suite

Runs in MAME with the genesis driver for instance.

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: Can I add some delay into groovymame ?
« Reply #10 on: January 13, 2017, 05:16:21 pm »
This tool is very useful when testing input lag:

http://junkerhq.net/xrgb/index.php/240p_test_suite

Runs in MAME with the genesis driver for instance.

Any tests in particular?

I need to get my head around that manual lag test.

I've used this to set up groovymame with my LCD screen in the past. I needed offset of 100 lines (1280x1024) does that tell us anything about the display lag?



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 ?

intealls

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:Yesterday at 02:56:48 pm
  • I want to build my own arcade controls!
Re: Can I add some delay into groovymame ?
« Reply #11 on: January 13, 2017, 05:24:12 pm »
I need to get my head around that manual lag test.

Once you do that, you'll definitely see the difference between a high frame_delay value and 3 frames of lag.

I've used this to set up groovymame with my LCD screen in the past. I needed offset of 100 lines (1280x1024) does that tell us anything about the display lag?

Unfortunately no. The LCD latency needs to be deduced with one of these for instance: http://www.leobodnar.com/shop/?main_page=product_info&products_id=212 .

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: Can I add some delay into groovymame ?
« Reply #12 on: January 13, 2017, 06:37:06 pm »
hmm I don't want to spend £75.     Maybe this can be my first arduino + hardware project.


I'm still not getting that manual lag test. Or your comment. How will I see the difference between high delay and 3 frames of lag?  Am I missing something here, is there a way to dial in 3 frames of lag into groovymame? (maybe using triplebuffer?)


edit:

From reading the other thread about lag I think (but not sure) that some of my misunderstanding is down to terminology  eg an average of 34ms from  button press to action on screen action is described as 2 frames of lag ie it is an absolute measurement.  I've been thinking relative to the arcade pcb.

So yeah, my system probably does lag about 2 frames (versus  the arcade pcb lag of 1.5 frames).  Maybe we should call it response time?



« Last Edit: January 13, 2017, 09:16:56 pm by jimmer »
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: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Can I add some delay into groovymame ?
« Reply #13 on: January 14, 2017, 05:13:05 am »
Things are simple. Forget by now about the built-in pcb latency most games have (2 frames).

When you enable vsync on your emulator, AMD/Nvidia drivers create an infamous frame queue of several frames. This is true even without triplebuffer, which obviously makes things even worse (caution: GM's triplebuffer doesn't add latency).

Now, take stock MAME, or GM, they're mostly the same. And run it fullscreen with -waitvsync, and WITHOUT -frame_delay. You'll be experiencing 2-3 frames of lag due to frame queue (buffering), in addition to the pcb latency. GM might be slightly better (1 frame) due to the way the inputs are polled but no big deal: the bulk of the latency is in the driver's hidden frame queue.

Then, run GM adding -frame_delay 5. As a side effect of current -frame_delay implementation, the frame queue is bypassed, and you end up with 0-1 frame latencies. Notice the purpose of -frame_delay is NOT bypassing the frame queue, it is a (desired) side effect. Probably I'll split -frame_delay in two options, one to just bypass the frame queue and another one to actually do frame delay, so to avoid uneducated use of the frame_delay feature.

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: Can I add some delay into groovymame ?
« Reply #14 on: January 14, 2017, 06:45:12 am »
Ah great. I got it now (almost).

I'm not sure now if I have about 2 frames of lag, or about 4 frames of lag.  I'm using groovymame0171 on winXP 32bit with onboard graphics (Intel Q43 chipset).   Which I think means I don't have Direct3D9ex , which is what allows the frame queue bypassing?


Quote
What's new in SwitchRes v0.015j

- Direct3D9ex support [koopah, intealls] (new option: -video d3d9ex): now GroovyMAME supports Direct3D9ex, which is present in all versions of Windows starting with Vista. This allows the application to take control of the frame latency and force it to the minimum allowed by the driver, avoiding the dreaded frame queues. This is specially useful in the situations where frame_delay can't be used reliably without tearing (LCDs, high resolutions). Besides, Direct3D9ex seems to perform better for certain hardware (Nvidia, Intel), so it may be preferred to plain Direct3D9 in general.

- Frame delay (improved) [intealls, Calamity]: now frame_delay polls the video driver for absolute scanline values, totally bypassing the default vertical synchronization functions. Some of the advantages are:
  • Improved stability of the vertical synchronization mechanism, that finally makes it possible to extend GroovyMAME's audio/video synchronization to the frame delay use case.
  • Awareness of the raster position and notification of missed retraces.
  • Allows for anticipating the vertical retrace accurately (see vsync_offset, below).

- Vsync offset [intealls] (new option: -vsync_offset): forces render to happen a certain number of lines before the vertical blank (e.g. -vsync_offset 200). At high resolutions (LCD, etc.), the time it takes the GPU to scale a frame starts being longer than the blanking period itself. This is specially true when HLSL is used. This appears as 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, even on LCDs with frame_delay and HLSL enabled. In practice, you need a fairly fast 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. Notice that you'll need to lower your frame_delay value proportionally to the amount of lines you set in -vsync_offset.

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 ?

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: Can I add some delay into groovymame ?
« Reply #15 on: January 18, 2017, 12:27:11 pm »
Let me ask in a more general way.  Can you get sub 1 frame lag using groovymame on winXP ?

And if it's not possible on winXP should you mention that prominently in the documentation?   eg in the software reqts section here: http://forum.arcadecontrols.com/index.php/topic,151459.0.html  there is nothing to suggest one OS group is superior.
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: 7414
  • Last login:April 10, 2024, 02:02:31 pm
  • Quote me with care
Re: Can I add some delay into groovymame ?
« Reply #16 on: January 18, 2017, 02:41:08 pm »
Let me ask in a more general way.  Can you get sub 1 frame lag using groovymame on winXP ?

Of course. If you check my posts in the input latency thread, you'll see all my tests were done on XP.

7 is a better OS however and anyone with proper hardware (hd 5000+) shoud be using it already.
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: Can I add some delay into groovymame ?
« Reply #17 on: January 18, 2017, 10:15:41 pm »
so..my understanding now is that direct3d9ex is needed to take control of the vsync frame queues (which I would need a graphics card for).

You wrote a few posts back that AMD/nvidia drivers create the infamous frame queue. Does my Intel Q43 onboard graphics also create the problem frame queues?

If it does, I should be able to get the a 2.5(?) frame difference by tuirning frame_delay on and off.  I will test tomorrow.



« Last Edit: January 18, 2017, 10:38:52 pm by jimmer »
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 ?