GameRoom Articles
GameRoom Web Store
RetroBlast Reviews
RetroBlast Articles
Game Room Links
File Downloads
Site and Contact Information

Quick Jump:

Part 2: Changing the Default Settings

Here are the settings I change from the defaults:


triplebuffer 1

resolution 1024x768x16

refresh 85

autosyncrefresh 1

autosyncrefresh_range 1.500000

syncrefresh 0


If I load a game that is 60.60606 fps, then it will be within the range of 60 fps +/- 1.5 (58.5 - 61.5 fps) and autosyncrefresh will enable syncrefresh and change the refresh to 60 which enables technique 2.

If I load a game that is 53 fps, then it will be outside the range and autosyncrefresh will do nothing.  This will leave syncrefresh off and refresh at 85 Hz which are perfect for technique 3.

So there you have it, automatic selection of two techniques that deal with the video timing problems of Windows MAME.  If you force all the games to conform to a single resolution (something that Windows is excellent at), you can now display all the games in MAME with only two video modes (1024x768x60 Hz and 1024x768x85 Hz in my example).  You can adjust your monitor for both of these modes, center and size them appropriately and every game in MAME will look great.

If you use different resolutions for different games, then you can decide per game which technique you want to use and then simply enable it in a game specific INI, you don't actually need my autosyncrefresh tweak although you will still need MAME 0.103u2 or later for the bug fixes that come with it.

Other options I haven't already mentioned that you might also tweak in MAME:




-[no]autoframeskip / -[no]afs  skip frames to speed up emulation              

 I always disable autoframeskip as it is useless for modern processors.  The games that are unable to run full speed these days can't be helped by the technique of frame skipping.  It looks terrible anyway and I think they should remove this option from MAME because it no longer has any value.




-[no]waitvsync                 wait for vertical sync (reduces tearing)       


 There is really no good reason to use waitvsync because triplebuffer does it better, unless you aren't using full screen mode.




-[no]triplebuffer / -[no]tb    triple buffering (only if fullscreen)    


 This is the preferred technique of waiting for the vertical blank to draw the next frame.




-[no]direct3d / -[no]d3d       use Direct3D for rendering                 


 I enable direct3d only for vector games because they appear brighter in direct3d mode.  I prefer the way raster games look on directdraw so I usually don't use direct3d for them.


resolution and refresh


-resolution / -r <string>      set resolution                                 

-refresh <int>                 set specific monitor refresh rate


 I always define a specific resolution and refresh rate because I don't want MAME guessing for each game what to do.




-effect <string>               specify the blitting effect    


 I use a high resolution PC monitor and if you leave this at none you will get a blurry stretch that looks more like a lower arcade resolution monitor, not perfect but not bad.  I usually use sharp on this option because I prefer the retro looking crispness that comes with sharpening.




-screen_aspect <string>        specify an alternate monitor aspect ratio  


 If you have a horizontal mounted monitor this should probably be 4:3, on a vertical setup it is usually 3:4.  But keep in mind that you can use this to alter the width to height ratio of games.  My monitor is mounted vertically and the result is that horizontal games have black bars at the top and bottom.  I use this option in a horizontal.ini file (parsing of horizontal.ini is added by one of my other tweaks) that affects only horizontal games to stretch them a little bit vertically.  This makes horizontal games look bigger and if you only stretch them a little it is subtle.




-[no]sleep          allow MAME to give back time to the system when it's not needed     


 I don't ever want MAME to sleep or volunteer CPU cycles back to the operating system so I disable this.  Don't confuse this with the sleepafterframe option below which gives control back to the operating system at the end of each frame.  I recommend the sleepafterframe option because it will bring synchronization to when MAME will be preempted.




-[no]rdtsc                     prefer RDTSC over QueryPerformanceCounter for  timing     


 You can only use this on certain processors (mostly desktop ones).  Any machine with power saving capability will likely be unable to handle RDTSC.  My suggestion is to start with this disabled and get everything working great.  Then try to enable it and if everything still works ok, then keep it because it has less overhead than the alternative method.  My notebook can't handle it at all and it makes game play extremely erratic. 




-[no]high_priority             increase thread priority      


I always enable this so MAME gets the most CPU time possible.

Other options I haven't already mentioned that are added by my Autosyncrefresh Tweak: 




-[no]sleepafterframe /         releases the current timeslice after each frame



 The sleepafterframe option causes MAME to issue a Sleep(0) command which sleeps for 0 milliseconds after each frame.  In reality this causes MAME to give up its current CPU time slice to the operating system right after a frame has been displayed.  Hopefully when MAME gets the processor back it will get an uninterrupted time slice to perform its processing and be ready to display the next frame before the monitor needs it.  I suggest using this because it creates a known place where MAME will be preempted instead of just leaving the when it will be preempted up to chance.




-override_fps / -of <float>    overrides the default game fps                  


The -override_fps command is a handy command if you want to force a game to run faster or slower.  This is also useful for someone who is impaired or a young child wants to play a game, by slowing it down a bit, you can make it more playable for them.

SA Dev's MAME Tweaks:

My tweaks include many more added options than the ones I've included above.  You can download them here.


To use these tweaks you must know how to compile MAME and modify the source code using them before compiling.  I will also be writing an article soon on how to compile MAME step by step, so you might refer to that when it is available, otherwise there are other guides and forums available on how to do this.  If you already know how to compile MAME, here is a how to integrate my tweaks. 


1.       Extract the zip file into the directory with the makefile.  SRC should be a subdirectory of this directory. 

2.       Run applyscr.bat and it will apply all the scripts one by one as you hit Y for yes. 

3.       Then compile MAME.  Once you have MAME with these tweaks compiled in, just run a "mame -cc" and it will update your mame.ini to contain the new options.  You can use them from the command line as well.


Well, I hope this article will help you to have the best video quality possible from your Windows MAME setup!

Part 1: Tweaking Windows MAME