Mame Command Line Options
Mame Command Line Options
-----------------
For example:
Configuration options
---------------------
-createconfig / -cc
-showconfig / -sc
is equivalent to -createconfig.
-showusage / -su
Displays a summary of all the command line options. For options that
are not mentioned here, the short summary given by "mame -showusage" is
usually sufficient.
-[no]readconfig / -[no]rc
- MAME.INI
- $MY_MAME.INI (i.e. if MAME was renamed MAME060.EXE, MAME
parses MAME060.INI here)
- MAMED.INI (if this is a debug build, i.e. MAMED.EXE)
- VECTOR.INI (for vector games only)
- DRIVER.INI (based on the source filename of the driver)
- PARENT.INI (for clones only, may be called recursively)
- GAMENAME.INI
The settings in the later ini's override those in the earlier ini's.
So, for example, if you wanted to disable hardware stretch in the
vector games, you can create a VECTOR.INI with the "hwstretch 0" line
in it, and it will override whatever hwstretch value you have in your
MAME.INI.
-[no]verbose / -[no]v
Displays some diagnostic information at startup. IMPORTANT: when
reporting bugs, please run with mame -verbose and include the resulting
information. It can be very helpful in tracking down problems. The
default is off (-noverbose)
IMPORTANT: Please use the path, directory and file options ONLY in MAME.INI.
Otherwise, the outcome may be unpredictable and not consistent across releases.
-rompath / -rp
-samplepath / -sp
-inipath
-cfg_directory
After running a game, MAME stores some user changeable settings into
cfg_directory/gamename.cfg. Additionally, on the first start of MAME a
cfg_directory/default.cfg is created. The default is CFG.
-nvram_directory
The original hardware of some games use non-volative ram chips to save
their configuration. The contents of these are saved into this
directory. The default is NVRAM.
-memcard_directory
-input_directory
-hiscore_directory
-state_directory
MAME supports state saving for some games. These states will be saved
here. The default is STATE.
-artwork_directory
Some games used extra artwork not created by electical circuits. MAME
supports such artwork in PNG image format, located in this directory.
The default is ARTWORK.
-snapshot_directory
-diff_directory
Directory for hard drive image difference files. The default is DIFF.
-ctrlr_directory
-cheat_file
The default is CHEAT.DAT. Modifying the default may not work at the
moment.
-history_file
The default is HISTORY.DAT. Modifying the default may not work at the
moment.
-mameinfo_file
The default is MAMEINFO.DAT. Modifying the default may not work at the
moment.
-[no]autoframeskip / -[no]afs
-frameskip / -fs
-[no]waitvsync
-[no]triplebuffer / -[no]tb
-[no]window
-[no]ddraw / -[no]dd
-[no]direct3d / -[no]d3d
Use Direct3D to display the image. This does not render 3D games using
3D hardware, it just uses 3D hardware to display the image, and apply
effects to it. -triplebuffer, -waitvsync, -resolution, -refresh,
-switchres, -switchbpp, -resolution all work with this option. This
option overrides -ddraw and implies -hwstretch. The default is OFF
(-nodirect3d).
-[no]hwstretch / -[no]hws
Stretch the image to integer ratios only. This may leave a black border
around the image in fullscreen mode. The options are:
Specifies an exact resolution to run in. In full screen mode, MAME will
try to use the specific resolution you request. The width (w) and
height (h) are required; the color depth (d) is optional. If omitted or
set to 0, MAME will determine the mode auomatically. For example,
-resolution 640x480 will force 640x480 resolution, but MAME is free to
choose the color depth. Similarly, -resolution 0x0x32 will force 32-bit
color depth, but allows MAME to choose the resolution. The string
"auto" is also supported, and is equivalent to 0x0x0. In window mode,
this resolution is used as a maximum size for the window. The default
is auto (-resolution auto). This option requires -ddraw for full screen
resolution switching.
-refresh
-[no]scanlines / -[no]sl
-[no]switchres
-[no]switchbpp
Enables color depth switching. This option is required for the
-resolution option to switch color depths in full screen mode. This
option is useful if you normally run at 16, 24, or 32 bit color depth
on your desktop, and want to keep that color depth when you run MAME.
The default is ON (-switchbpp). This option requires -ddraw.
-[no]maximize / -[no]max
-[no]keepaspect / -[no]ka
Enables aspect ratio enforcement. When this option is on, the game's
proper aspect ratio (generally 4:3 or 3:4) is enforced, so you get the
game looking like it should. When running in a window with this option
on, you can only resize the window to the proper aspect ratio, unless
you are holding down the CONTROL key. By turning the option off, the
aspect ratio is allowed to float. In full screen mode, this means that
all games will stretch to the full screen size (even vertical games).
In window mode, it means that you can freely resize the window without
any constraints. The default is ON (-keepaspect).
-[no]matchrefresh
Enables refresh rate matching. When enabled, MAME will try to find the
closest refresh rate match that is greater than the game's refresh
rate. For example, if the game runs at 57fps, and you have 60, 70, 75Hz
refresh rates, MAME will choose 60Hz. If the game runs at 61fps, then
it will choose 70Hz. This is intended mainly for those who have tweaked
their video card's settings to provide carefully matched refresh rate
options. The default is OFF (-nomatchrefresh). This option requires
-ddraw and -nowindow.
-[no]syncrefresh
-[no]throttle
-full_screen_brightness / -fsb
Some video cards adjust the brightness/gamma when they switch into full
screen mode. To counteract this, you can specify the
-full_screen_brightness value, which is a number between 0.1 and 2. 0.1
means 1/10th as bright as the default, and 2 means twice as bright.
Note that the hardware support for this option is not present on all
video cards. If you set a non-zero value, you may get a warning if MAME
was unable to set the brightness on your card. The default is 0, which
means that MAME will not attempt to adjust the brightness on your video
card at all. This option requires -ddraw and -nowindow.
-frames_to_run / -ftr
-effect
-screen_aspect
Give a screen aspect ration in the form X:Y where X is the horizontal
and Y the vertical part. Examples are 4:3 for most resolution settings
on computer monitors, 5:4 for the 1280x1024 resolution or 3:4 for
turnable LCD's in the turned position. The default is 4:3.
Try to get a resolution that enlarges the emulated game z times. The
default is -zoom 2. MAME determines the resolution automatically. This
option only works with -direct3d.
-[no]d3dtexmanage
-d3dfeedback [i]
-d3dscan [i]
-[no]d3deffectrotate
Apply rotatation so that any effects are rotated along with the game
image. The default is ON. This option requires -direct3d.
-d3dprescale [option]
Pre-scale up the image with point filtering before fitting the image to
the screen. This gives an only slightly fuzzy image even at high
display resolutions. The options are:
none disable.
auto adaptively apply a moderate pre-scale effect,
depending on other efects used.
full adaptively apply an agressive pre-scale effect.
n (where 2 <= n <= 4) pre-scale the image n times.
-d3deffect [preset]
The filename must start with XxY, where X and Y are the dimensions of
the pattern in pixels. Each pixel is represented by 4 bytes, red,
green, blue, and mask, respectively. mask is an on/off value, where 0
is off. This option requires -direct3d.
-d3dexpert [settings]
-[no]sleep
-[no]high_priority
Increases the thread priority so MAME runs better. The default is OFF
(-nohigh_priority).
-audio_latency
This controls the amount of latency built into the audio streaming. By
default MAME tries to keep the DirectSound audio buffer between 1/5 and
2/5 full. On some systems, this is pushing it too close to the edge,
and you get poor sound sometimes. The latency parameter controls the
lower threshold. The default is 1 (meaning lower=1/5 and upper=2/5).
Set it to 2 (-audio_latency 2) to keep the sound buffer between 2/5 and
3/5 full. If you crank it up to 4, you can definitely notice the lag.
-wavwrite <filename>
Writes the final mixer output to the given <filename> in .WAV format.
-[no]mouse
Controls whether or not MAME looks for a mouse controller to use. When
this is enabled, you will not be able to use your mouse in Windows
while playing a game. If you want to get control of your computer back,
you will need to pause the game, or quit. The default is OFF
(-nomouse).
-[no]joystick / -[no]joy
-[no]lightgun/ -[no]gun
-[no]dual_lightgun / -[no]dual
Controls whether or not MAME attempts to track two lightguns connected
at the same time. This option requires -lightgun. The default is OFF
(-nodual_lightgun).
-[no]offscreen_reload / -[no]reload
-[no]steadykey / -[no]steady
-[no]keyboard_leds / -[no]leds
Since MAME uses an input device (keyboard) for output, this sort of
belongs here. Using this option enables/disables simulation of the game
LEDs by the keyboard LEDs. This works fine, but can lead to problems
after exiting MAME (i.e. CAPS LOCK remains ON), so you can disable it
here. The default is ON (-keyboard_leds).
-led_mode <ps/2|usb>
For Windows NT and later systems, determines how LEDs on the keyboard
are controlled. In PS/2 mode, MAME uses the low-level keyboard driver
directly to control the LEDs. In USB mode, MAME attempts to post fake
keypresses on the Caps Lock, Scroll Lock, and Num Lock keys in order to
induce the LEDs to change. If you have a PS/2 keyboard, PS/2 mode is the
more reliable approach. Default is PS/2.
-a2d_deadzone / -a2d
If you play with an analog joystick, but the game requires digital
input, MAME needs to convert the signals. Here you can give the ratio
of movement along an axis that accounts for a digital signal. This
option expects a float in the range of 0.0 to 1.0. The default is 0.3.
Note: the current handling is not precise, as it does also implicitely
set the size of the arc which is interpreted as diagonal movement. This
is a known problem but it requires some major rework of the input
handling code to fix it.
-ctrlr <controller>
hotrod HotRod
hotrodse HotRod SE
slikstik SlikStik
xarcade X-Arcade
-paddle_device <keyboard|mouse|joystick|lightgun> / -paddle
-adstick_device <keyboard|mouse|joystick|lightgun> / -adstick
-pedal_device <keyboard|mouse|joystick|lightgun> / -pedal
-dial_device <keyboard|mouse|joystick|lightgun> / -dial
-trackball_device <keyboard|mouse|joystick|lightgun> / -trackball
-lightgun_device <keyboard|mouse|joystick|lightgun>
-digital <all|none|j<N>[a<M>[a<K>...]][,j<X>[a<Y>...]][,...]>
Controls which joystick axes are considered digital. If MAME knows that
a given joystick axis is digital, it can make much better decisions about
how to treat that axis. If you are using a digital gamepad with MAME,
you will want to use this option. There are a number of ways to do this:
-digital all means that all axes of all connected joysticks will be
treated as digital.
-digital none means that all axes of all connected joysticks will be
treated as analog (this is the default behavior).
-[no]norotate
-[no]ror
-[no]rol
-[no]autoror
-[no]autorol
-[no]flipx
-[no]flipy
These are the standard MAME rotation options. They are all OFF by
default.
-gamma
This controls the global gamma correction in the game. It is the same
gamma that is applied when you bring up the on-screen-display within
MAME. The default is 1.0.
-brightness / -bright
-pause_brightness
This controls the brightness level when MAME is paused. The default
value is 0.65.
-[no]antialias / -[no]aa
-[no]translucency / -[no]tl
-beam
Sets the width in pixels of the vectors. This option expects a float in
the range of 1.00 through 16.00 as argument. The default is 1 (1 pixel
wide).
-flicker
Makes the vectors flicker. This option requires a float argument in the
range of 0.00 - 100.00 (0=none, 100=maximum). The default is 0.
-intensity
Sets the intensity correction for the beam. Higher values give a
brighter beam. This option expects a float in the range of 0.5 through
3.0 as argument. The default is 1.5.
Sets the audio sample rate. Smaller values (e.g. 11025) cause lower
audio quality but faster emulation speed. Higher values (e.g. 44100)
cause higher audio quality but slower emulation speed. The default is
44100.
-[no]samples
-[no]resamplefilter
-[no]sound
-volume / -vol
Sets the startup volume. It can later be changed with the On Screen
Display (see Keys section). The volume is an attenuation in dB: e.g.,
"-volume -12" will start with -12dB attenuation. The default is 0.
-[no]artwork / -[no]art
-[no]use_backdrops / -[no]backdrop
-[no]use_overlays / -[no]overlay
-[no]use_bezels / -[no]bezel
-[no]artwork_crop / -[no]artcrop
This will crop the artwork to the game screen area only. The default is
OFF (-noartwork_crop).
-artwork_resolution / -artres
Scale the game by this factor to accommodate for higher resolution
artwork. The default is 0 (auto).
-[no]cheat / -[no]c
Cheats, like the speedup in Pac Man or the level-skip in many other
games, are disabled by default. Use this switch to turn them on. The
default is OFF (-nocheat).
-[no]debug
-playback / -pb
Expects a filename as parameter. Play back all game inputs from from
file INP/filename.inp. The gamename is contained in this file,
therefore a gamename needs not be given on the commandline.
-record / -rec
-[no]log
-maxlogsize
-[no]oslog
-[no]skip_disclaimer
-[no]skip_gameinfo
Forces MAME to skip displaying the game info screen. The default is OFF
(-noskip_gameinfo).
-[no]crconly
Tells MAME to only use CRCs for ROM integrity checks. This disables
checking against the more reliable SHA1 hashes. Default is OFF
(-nocrconly).
-bios
Expects a BIOS name as the parameter. -listxml will list the possible
BIOS names for a game/system.
-state <slot>
Starts MAME and loads a saved state immediately from the specified slot.
Note: By default, all the '-list' commands below write info to the screen. If
you wish to write the info to a textfile instead, add this to the end of your
command:
> filename
-help / -?
-[no]clones
-list / -ls
-listfull / -ll
-listgames
-listdetails
-listsourcefile
Displays the source file (in the drivers directory) containing the
driver for the specified game. Useful for finding which driver a game
runs on in order to fix bugs.
-listxml / -lx
List comprehensive details for all of the supported games. The output
is quite long, so better redirect this into a file. The output is in
XML format.
-listclones / -lc
-listsamdir
List directory names for samples. Some clones can share their samples
with their parents (no pun intended).
-listcrc
-listdupcrc
-listroms
-listsamples
-verifyroms
Checks specified game(s) for missing and invalid ROMs. Adding "*"
checks all available games.
-verifysets
Checks specified game(s) and reports its status. Adding "*" checks all
available games. Terse output.
-vset
Checks specified game(s) and reports its status. Adding "*" checks all
available games. Slightly more verbose output.
-verifysamples
Check selected game for missing samples. Adding "*" checks all
available samples.
-vsam
Check selected game for missing samples. Adding "*" checks all
available samples.
-romident
-crconly
Uses only CRC-32 for all integrity checks. Disables the use of SHA-1
checks when loading the ROMs.
-gamelist
-sortname
-sortdriver
-listcpu
-listcpuclass
-listgamespersourcefile
-listnosound
-listnvram
-listpalettesize / -lps
-listromdistribution
-listromnumber
-listromsize / -lrs
-listsound
-listwrongmerge / -lwm
-wrongfps
-wrongorientation
Keys
----
Tilde Toggles the On Screen Display. Use the up and down arrow keys to
select the parameter (global volume, mixing level, gamma
correction etc.), left and right to arrow keys to modify it.
F2 Service Mode