Setting up MAME

The settings below deviates from MAME's default configuration (as of version 0.125). The specifics are listed and explained in the files docs\config.txt and docs\newvideo.txt that comes with MAME.

autoframeskip 1
refreshspeed 1
multithreading 1
video ddraw
prescale 2
effect scanlines.png
hwstretch 0
triplebuffer 1
switchres 1

With this setup, MAME will prefer a mode that is a2 times the games resolution. If you have a game that is 320x240, MAME will pick 640x480, and renderpixels at exactly two times their original size. This is a good-thing(tm), as there will be no jagged/blurry scaling artifacts.

The refreshspeed option adjusts the game speed to match the selected mode, this is also a good-thing(tm), mostly. If the game runs 60.606060Hz, and the mode is 60Hz, the game is slowed down 1% which is not noticeable. If the game runs 53Hz, it is noticeable - and you should do something about it.

If the game is 336x240, MAME will still pick 640x480 withno horizontal scaling, unless 672x480 is available - thus it is important to have modes available that are multiples of the original resolution horizontally.

Connecting a computer to your Arcade monitor

If you have a 31k(VGA) arcade monitor , you should make sure that your computer outputs a compatible video signal before you connect it. An easy way to do this is to use "Resolution Changer":
C:\mame>reschangecon -width=640 -height=480 -depth=32 -refresh=60

Installing custom modes

I will not go into the gory details about monitor timing, just give a few pointers:

Use the excel sheet in the download section to generate the modes you need, save them to a filecalled usermodes.txt, then use soft-15kHz to install them. You need to reboot your computer after installing to make them active.


This stuff really works, and you don't have to spend days tweaking it. All pictures are taken without doing any adjustments on the monitor or "tweaking" the modes. Pictures below are just the output from the excel sheet in the download section and the mame settings above.

Nemesis, 256x224:

For some reason Nemesis is too bright in MAME compared to the original, with gamma set to 0.5 it looks just right.
256x224 resolution

Progear no Arashi, 384x224:

Observe that the width of the picture is just right - the monitor doesn't know that the screen is 128 pixels wider than Nemesis.
Detail from progear, the scanline effect looks really good (authentic) on a CRT:
pro gear detail

R-TYPE 2 384x256@55hz

As is expected, the vertical size is wrong. Since there are no "crazy" timings, the monitor doesn't complain that the refresh reate is 5hz lower, this might not be true for all monitors.
rtype2 384x256

r-type2 mame:
detail of rtype2
r-type2 original PCB, through XRGB2 upscanner, again the emulated version is a bit brighter than the original, could also be the doings of the XRGB2:
r-type2 original

page was last modified: December 02 2015 06:53 UTC