Minimizing input lag on MAME

This is the main shmups forum. Chat about shmups in here - keep it on-topic please!
Post Reply
dakonishi
Posts: 8
Joined: Fri Feb 05, 2010 9:45 pm

Minimizing input lag on MAME

Post by dakonishi »

Hey guys I am using MAMEFX 0.106 and was wondering if you have any tips to minimize input lag.
My setup is:


Image

Image

Image

Image


Please let me know what could help.
User avatar
DC906270
Posts: 993
Joined: Wed Apr 27, 2005 7:34 pm
Location: THE UK!!!

Re: Minimizing input lag on MAME

Post by DC906270 »

erm, dont know if this is causing the problem, but youre screen resolution settings are set at 1600 x 1200. most arcade games should be set at 640 x 480. you should set this to auto for best results.
User avatar
Obiwanshinobi
Posts: 7470
Joined: Sun Jul 26, 2009 1:14 am

Re: Minimizing input lag on MAME

Post by Obiwanshinobi »

DC906270 wrote:erm, dont know if this is causing the problem, but youre screen resolution settings are set at 1600 x 1200. most arcade games should be set at 640 x 480. you should set this to auto for best results.
Hell no. If he's using an LCD monitor, the resolution should be set to his display's native. 640x480 (and pretty much every resolution lower than the native) looks ugly as sin on an LCD.
Aesthetically the best setup is: given monitor's native resolution, NO FILTERING WHATSOEVER and "real scanlines" (that's how Mameuifx32 call them anyway). If he's using a CRT, 640x480 for horizontals and 800x600 for verticals, NO FILTERING WHATSOEVER, "alternate scanlines" (that's how Kawaks call them anyway) and - of course - correct window/full screen ratio are usually the best option for lo-res 2D games. That said, even on a CRT the picture upscaled to high resolution (WITHOUT FILTERING) and scanlined (with scanlines thickness 25% or so) doesn't look too shabby. Still more antiseptic than on the original hardware, but the Holy Pixellation remains unscathed.
There are various nuances to the different emulators' scanlines drawing methods, but monitor's native resolution, scanlines and no filtering are essential if you do not wish to mutilate lo-res graphics on a hi-res display.
The rear gate is closed down
The way out is cut off

Image
dakonishi
Posts: 8
Joined: Fri Feb 05, 2010 9:45 pm

Re: Minimizing input lag on MAME

Post by dakonishi »

Obiwanshinobi wrote:
DC906270 wrote:erm, dont know if this is causing the problem, but youre screen resolution settings are set at 1600 x 1200. most arcade games should be set at 640 x 480. you should set this to auto for best results.
Hell no. If he's using an LCD monitor, the resolution should be set to his display's native. 640x480 (and pretty much every resolution lower than the native) looks ugly as sin on an LCD.
Aesthetically the best setup is: given monitor's native resolution, NO FILTERING WHATSOEVER and "real scanlines" (that's how Mameuifx32 call them anyway). If he's using a CRT, 640x480 for horizontals and 800x600 for verticals, NO FILTERING WHATSOEVER, "alternate scanlines" (that's how Kawaks call them anyway) and - of course - correct window/full screen ratio are usually the best option for lo-res 2D games. That said, even on a CRT the picture upscaled to high resolution (WITHOUT FILTERING) and scanlined (with scanlines thickness 25% or so) doesn't look too shabby. Still more antiseptic than on the original hardware, but the Holy Pixellation remains unscathed.
There are various nuances to the different emulators' scanlines drawing methods, but monitor's native resolution, scanlines and no filtering are essential if you do not wish to mutilate lo-res graphics on a hi-res display.
I am using a 15" In Plane Switching LCD laptop, its quite nice for an LCD. Its a 4:3 UXGA so the max res is 1600x1200(exactly quadruple of 640x480 I believe). I dont see an option for "real scanlines" in FX, does it have any other name?
User avatar
dmauro
Posts: 673
Joined: Sat Mar 25, 2006 5:48 pm
Location: NY

Re: Minimizing input lag on MAME

Post by dmauro »

dakonishi wrote:the max res is 1600x1200(exactly quadruple of 640x480 I believe).
I'm curious to see the math behind that.

Don't worry, mame is good at math, just use integer scaling and that will keep it from getting all fuzzy and if you're running in full screen should just give you black borders for whatever screen area it's not using. I used to run mame like this on my LCD monitor and it actually looked really nice.

As for reducing lag, there's your controller to consider as well...
dakonishi
Posts: 8
Joined: Fri Feb 05, 2010 9:45 pm

Re: Minimizing input lag on MAME

Post by dakonishi »

dmauro wrote:
dakonishi wrote:the max res is 1600x1200(exactly quadruple of 640x480 I believe).
I'm curious to see the math behind that.

Don't worry, mame is good at math, just use integer scaling and that will keep it from getting all fuzzy and if you're running in full screen should just give you black borders for whatever screen area it's not using. I used to run mame like this on my LCD monitor and it actually looked really nice.

As for reducing lag, there's your controller to consider as well...
I'm sorry I meant quadruple the size of SVGA 800x600

http://en.wikipedia.org/wiki/UXGA

http://upload.wikimedia.org/wikipedia/e ... s2.svg.png


I get a black bar around some games, others like Gradius III snap right to 4:3. Is the correct way it should display?
User avatar
linko9
Posts: 497
Joined: Wed Sep 10, 2008 6:01 am
Location: Nouvelle-Jersey

Re: Minimizing input lag on MAME

Post by linko9 »

How much input lag are you getting? Try using the keyboard and see if you get the same lag. You might try unchecking "match game refresh rate."
User avatar
Obiwanshinobi
Posts: 7470
Joined: Sun Jul 26, 2009 1:14 am

Re: Minimizing input lag on MAME

Post by Obiwanshinobi »

dakonishi wrote:I am using a 15" In Plane Switching LCD laptop, its quite nice for an LCD. Its a 4:3 UXGA so the max res is 1600x1200(exactly quadruple of 640x480 I believe). I dont see an option for "real scanlines" in FX, does it have any other name?
Perhaps plain "scanlines" will do the trick. I'm not familiar with the GUI you're using, but that slider beneath the "Effect Overrides" and "Scanlines" captions seem to control scanlines thickness. 25% is usually okay. I don't remember how "Apperture grille" effect you've apparently chosen looks like, but in my opinion nothing beats proper scanlines. Just saiyn'.
dmauro wrote:As for reducing lag, there's your controller to consider as well...
Bear in mind that no matter how fast your machine is and how laggy the controller/adapter, the most rampant input lag in MAME is hard-wired, depends on a game in discussion and I don't know a way around it. Metal Black has literally no input lag (the ships moves in the first frame you're holding a direction), DoDonPachi and Dangun Feveron have one frame's worth of input lag (ships move in the second frame), Guwange and ESP Ra. De. - two frames, Progear no Arashi (in Kawaks too), early Psikyo games, Battle Garegga/Bakraid - three frames, Mars Matrix - four frames from what I remember...
dakonishi wrote:I get a black bar around some games, others like Gradius III snap right to 4:3. Is the correct way it should display?
Dunno, maybe your version of MAME recognises the optimal aspect ratio. If that's the case, certain games can be bordered indeed. As far as I can tell, Mameuifx32 displays every game either in 4:3 or 3:4 by default. You can force some other aspect ratio (an arcade machine owner can tweak the proportions to his/her liking via the monitor settings I believe). Some games have slightly deformed look in 4:3 (Metal Black, Darius Gaiden, R-Types on the PSX), but they won't tell you which aspect ratio is optimal. You can experiment until round objects (bullets, segments of multi-jointed bosses etc.) will be round indeed rather than oval. If you really care, that is. Taito games on Taito Legends 2 for the PS2 have the exact same deformation (maybe except for Bonze Adventure/Jigoku Meguri, which runs slightly bordered and doesn't look deformed). Seems like Taito wouldn't care (but then again, nearly all of those retro collections for the PS2 are lazy; only Gunstar Heroes Treasure Box shows how it should be done).
The rear gate is closed down
The way out is cut off

Image
User avatar
elvis
Posts: 984
Joined: Fri Nov 04, 2005 10:42 pm
Location: Brisbane, Australia

Re: Minimizing input lag on MAME

Post by elvis »

dakonishi wrote:Hey guys I am using MAMEFX 0.106 and was wondering if you have any tips to minimize input lag.
Don't use Windows (or MacOSX, which is even worse). All the testing I've done so far has shown Linux to have objectively higher maximum framerates, and subjectively less input lag than either Windows or Mac, particularly when using USB game controllers.

The latter I'll be testing objectively once I can get my hands on a 60FPS camera!
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Minimizing input lag on MAME

Post by captpain »

elvis wrote:
dakonishi wrote:Hey guys I am using MAMEFX 0.106 and was wondering if you have any tips to minimize input lag.
Don't use Windows (or MacOSX, which is even worse). All the testing I've done so far has shown Linux to have objectively higher maximum framerates, and subjectively less input lag than either Windows or Mac, particularly when using USB game controllers.

The latter I'll be testing objectively once I can get my hands on a 60FPS camera!
Too bad the frontends are all so awful!
User avatar
jandrogo
Posts: 268
Joined: Thu Feb 07, 2008 11:51 pm
Location: Spain

Re: Minimizing input lag on MAME

Post by jandrogo »

dmauro wrote:
dakonishi wrote:the max res is 1600x1200(exactly quadruple of 640x480 I believe).
I'm curious to see the math behind that.
In fact I think it's not bad at all. Almost all the vertical shmups are 320x240, so 1600x1200 it's just 5 times 320x240, with a decent scanline image, you'll get nice emulation in that monitor.. but bigger resolutions increase the CPU use and decrease the FPS. I've checked that with the 2 monitors I have at home, with the same computer I get more FPS and less delay at 1024x768 than 1366x768
Working in the japanese language achievement
User avatar
DC906270
Posts: 993
Joined: Wed Apr 27, 2005 7:34 pm
Location: THE UK!!!

Re: Minimizing input lag on MAME

Post by DC906270 »

Yeh, m, i know i was shot down in flames earlier in the thread, but i would have thought that if the emulator is doing work to put more lines on the screen, then it would slow it down some and might introduce greater lag as a side effect :?:
User avatar
Obiwanshinobi
Posts: 7470
Joined: Sun Jul 26, 2009 1:14 am

Re: Minimizing input lag on MAME

Post by Obiwanshinobi »

Most computers these days do the postprocessing without breaking a sweat. Rendering 3D graphics with all modern bells and whistles in high resolution is one thing, stretching 320x240 or so up to your display's native resolution and putting on scanlines is another beast. I do not recommend fancy filtering and interframe blending anyway, as it doesn't look all that hot.
The rear gate is closed down
The way out is cut off

Image
User avatar
Keade
Posts: 385
Joined: Mon Jul 16, 2007 8:44 pm

Re: Minimizing input lag on MAME

Post by Keade »

DC906270 wrote:Yeh, m, i know i was shot down in flames earlier in the thread, but i would have thought that if the emulator is doing work to put more lines on the screen, then it would slow it down some and might introduce greater lag as a side effect :?:
No reason for that, as long as the game runs at constant 100% speed (F11 to check while in MAME).

Disabling tripple buffering / v-sync could get you one or more less frames of delay.
Don't forget to check your screen and controllers adapters. A few LCDs go as high as 60ms of display delay compared to CRTs. That's 4 frames for a 60fps game. As for adapters, I've had two PSX -> USB adapters that were supposedly good according to reviews but gave me horrendous input lag, only the inPin gave me a good result. Just my experience, but I think most of them are crap and it's the first thing to look out for.
User avatar
spl
Posts: 253
Joined: Tue Sep 08, 2009 1:08 am
Location: Australia

Re: Minimizing input lag on MAME

Post by spl »

What is the best way to notice input lag? I'm using PSX -> USB adaptor with an LCD which is rated at 12ms response time. I don't notice any difference on this setup compared to a stick with direct USB interface and a CRT monitor.
Image
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Minimizing input lag on MAME

Post by captpain »

spl wrote:What is the best way to notice input lag? I'm using PSX -> USB adaptor with an LCD which is rated at 12ms response time. I don't notice any difference on this setup compared to a stick with direct USB interface and a CRT monitor.
Do a frame-by-frame check in MAME.
User avatar
spl
Posts: 253
Joined: Tue Sep 08, 2009 1:08 am
Location: Australia

Re: Minimizing input lag on MAME

Post by spl »

captpain wrote:
spl wrote:What is the best way to notice input lag? I'm using PSX -> USB adaptor with an LCD which is rated at 12ms response time. I don't notice any difference on this setup compared to a stick with direct USB interface and a CRT monitor.
Do a frame-by-frame check in MAME.
How do I do that?? sorry for being a noob.
Image
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Minimizing input lag on MAME

Post by captpain »

spl wrote:
captpain wrote:
spl wrote:What is the best way to notice input lag? I'm using PSX -> USB adaptor with an LCD which is rated at 12ms response time. I don't notice any difference on this setup compared to a stick with direct USB interface and a CRT monitor.
Do a frame-by-frame check in MAME.
How do I do that?? sorry for being a noob.
Actually, what I just said won't help you at all! So never mind. I misread what you wrote.

I'm not sure how to help you :oops:
User avatar
Ed Oscuro
Posts: 18654
Joined: Thu Dec 08, 2005 4:13 pm
Location: uoıʇɐɹnƃıɟuoɔ ɯǝʇsʎs

Re: Minimizing input lag on MAME

Post by Ed Oscuro »

elvis wrote:
dakonishi wrote:Hey guys I am using MAMEFX 0.106 and was wondering if you have any tips to minimize input lag.
Don't use Windows (or MacOSX, which is even worse). All the testing I've done so far has shown Linux to have objectively higher maximum framerates, and subjectively less input lag than either Windows or Mac, particularly when using USB game controllers.

The latter I'll be testing objectively once I can get my hands on a 60FPS camera!
Drat. Hmm, suddenly I have an idea what to do with that embedded Linux on my Asus motherboard...probably will end up getting a separate HDD though. Could be interesting.

Careful with the Casio Exilims; the last one I read a review of does have a 240Hz mode (or so) but the picture is squashed (at least the sample videos played that way on my PC, with higher FPS modes getting ore squashed and lossy), not high resolution and full of noise, but then other folks can get results like this. I guess the story is be careful which model you get.

Edit: You could go crazy and get a Canon EOS 5D Mark II, if you don't mind dropping more on a single camera than all but the most expensive Shmups Forumers' collections are worth...
User avatar
DC906270
Posts: 993
Joined: Wed Apr 27, 2005 7:34 pm
Location: THE UK!!!

Re: Minimizing input lag on MAME

Post by DC906270 »

What is the best way to notice input lag?
its only a problem if you notice it yourself. like, you push 'up' or 'fire' and theres a delay between you moving the control, and the ship or whatever on the screen actually moving or firing.
User avatar
spl
Posts: 253
Joined: Tue Sep 08, 2009 1:08 am
Location: Australia

Re: Minimizing input lag on MAME

Post by spl »

DC906270 wrote:
What is the best way to notice input lag?
its only a problem if you notice it yourself. like, you push 'up' or 'fire' and theres a delay between you moving the control, and the ship or whatever on the screen actually moving or firing.
Wow, I have never noticed that in any games. Maybe i'm just too noob? I don't know but that sounds awful.
Image
captpain
Posts: 1783
Joined: Wed Jul 23, 2008 6:23 am

Re: Minimizing input lag on MAME

Post by captpain »

spl wrote:
DC906270 wrote:
What is the best way to notice input lag?
its only a problem if you notice it yourself. like, you push 'up' or 'fire' and theres a delay between you moving the control, and the ship or whatever on the screen actually moving or firing.
Wow, I have never noticed that in any games. Maybe i'm just too noob? I don't know but that sounds awful.
Try Mars Matrix in MAME and you'll notice it. It's really bad in that game, unfortunately.
User avatar
nimitz
Posts: 875
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Minimizing input lag on MAME

Post by nimitz »

I guess it's the perfect time to post a link to my Mame input delay thread. :lol:

http://shmups.system11.org/viewtopic.php?t=26394

The games that have more than "4 frames" will be pretty hard to enjoy, especially if your controller has some delay of it's own.

A few basic guidelines on reducing input lag:
-Never ever use vsync or triple buffering, this will add quite a few frames of delay to what was already there
-Use a controller that has very low lag or the keyboard. (I can elaborate on this)
-Play the mame games that have relatively low lag
-Use specific mame version to reduce lag for specific games : garemame, new wolfmame (for Raiden fighters series)
-don't use "vanilla" mame build version .107 or later.
User avatar
nZero
Posts: 2608
Joined: Wed Jan 26, 2005 1:20 am
Location: DC Area
Contact:

Re: Minimizing input lag on MAME

Post by nZero »

Someone on IRC linked a cool program a while back that allowed you to ABX (double-blind test) your sensitivity to input lag and darn if I can't find it again now. Using a CRT and a USB controller I was able to ABX the difference between next frame and +2 frames of input lag 100% of the time, but next frame and +1 was too fatiguing to do more than guess half of the time. I think it's a good way to determine how much input lag that you would be personally sensitive to (under controlled worst case conditions).

Also, it's worth noting that many games have a frame or two of input delay built in, even on the original arcade versions and subsequent console ports.
Image
User avatar
orange
Posts: 430
Joined: Wed Feb 06, 2008 8:26 pm

Re: Minimizing input lag on MAME

Post by orange »

could anyone shed some light on how fba's input lag compares to mame's? i would try this stuff out on my own but fba acts really weird with my windows 7 installation

also something to consider when testing these things is the polling rate of your usb ports (provided that you're using a usb controller) since there is a noticeable difference between the windows default (125hz) and 1000hz
User avatar
Keade
Posts: 385
Joined: Mon Jul 16, 2007 8:44 pm

Re: Minimizing input lag on MAME

Post by Keade »

Get nFBA, as it's designed for network, the input delay will sure be as low as the devs could do.

Btw, I was going to say "come on, it's only 4 frames, it's not THAT noticeable", then just before posting I did the test with Galaga '88 and Mars Matrix, on keyboard. It's playable, but the lag is quite noticeable, indeed (even considering a placebo effet...)
It's also interesting to read about input delay in recent games. Some games have 10 frames of input lag, this is appalling.
Last edited by Keade on Wed Feb 10, 2010 8:38 pm, edited 6 times in total.
User avatar
Udderdude
Posts: 6297
Joined: Thu Feb 16, 2006 7:55 am
Location: Canada
Contact:

Re: Minimizing input lag on MAME

Post by Udderdude »

nZero wrote:Also, it's worth noting that many games have a frame or two of input delay built in, even on the original arcade versions and subsequent console ports.
NOOOOOOOOOoooooooo

I demand 1.5 updates to all arcade PCBs with extra input lag. Unacceptable! >:O
User avatar
nimitz
Posts: 875
Joined: Thu Jan 10, 2008 5:05 am
Location: Québec

Re: Minimizing input lag on MAME

Post by nimitz »

Here's the program nZero was talking about (he found it after all) :http://speeddemosarchive.com/forum/inde ... 295.0.html It's the 3rd program.

I get 90% 95% right at telling between 1 or 2 frames...so yes, it does make a difference even at very small values
Post Reply