SDL-Specific Commandline Options¶
This section contains configuration options that are specific to any build supported by SDL (including Windows where compiled as SDL instead of native).
In addition to the keys described in config.txt, the following additional keys are defined for SDL-specific versions of MAME:
Outputs the error.log data to the stderr TTY channel (usually the command line window MAME was started in). This can be used at the same time as -log to output the log data to both targets as well. Default is OFF (-nooslog).
-watchdog <duration> / -wdog <duration>
Enables an internal watchdog timer that will automatically kill the MAME process if more than <duration> seconds passes without a frame update. Keep in mind that some games sit for a while during load time without updating the screen, so <duration> should be long enough to cover that. 10-30 seconds on a modern system should be plenty in general. By default there is no watchdog.
-numprocessors <auto|value> / -np <auto|value>
Specify the number of processors to use for work queues. Specifying “auto” will use the value reported by the system or environment variable OSDPROCESSORS. To avoid abuse, this value is internally limited to 4 times the number of processors reported by the system. The default is “auto”.
Enable output of benchmark data on the SDL video subsystem, including your system’s video driver, X server (if applicable), and OpenGL stack in -video opengl mode.
Benchmark for [n] number of emulated seconds; implies the command string: -str [n] -video none -sound none -nothrottle. Default is OFF (-nobench)
Specifies which video subsystem to use for drawing. The default for Mac OS X is ‘opengl‘ because OS X is guaranteed to have a compliant OpenGL stack. The default on all other systems is ‘soft‘.
Tells MAME how many output windows to create. For most games, a single output window is all you need, but some games originally used multiple screens. Each screen (up to 4) has its own independent settings for physical monitor, aspect ratio, resolution, and view, which can be set using the options below. The default is 1.
-[no]window / -[no]w
Run MAME in either a window or full screen. The default is OFF (-nowindow).
-[no]maximize / -[no]max
Controls initial window size in windowed mode. If it is set on, the window will initially be set to the maximum supported size when you start MAME. If it is turned off, the window will start out at the smallest supported size. This option only has an effect when the -window option is used. The default is ON (-maximize).
-[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).
Allow non-integer stretch factors allowing for great window sizing flexability. The default is ON. (-unevenstretch)
Center horizontally within the view area. Default is ON (-centerh).
Center vertically within the view area. Default is ON (-centerv).
Waits for the refresh period on your computer’s monitor to finish before starting to draw video to your screen. If this option is off, MAME will just draw to the screen at any old time, even in the middle of a refresh cycle. This can cause “tearing” artifacts, where the top portion of the screen is out of sync with the bottom portion. Tearing is not noticeable on all games, and some people hate it more than others. However, if you turn this option on, you will waste more of your CPU cycles waiting for the proper time to draw, so you will see a performance hit. You should only need to turn this on in windowed mode. In full screen mode, it is only needed if -triplebuffer does not remove the tearing, in which case you should use -notriplebuffer -waitvsync. Note that support for this option depends entirely on your operating system and video drivers; in general it will not work in windowed mode so -video opengl and fullscreen give the greatest chance of success. The default is OFF (-nowaitvsync).
Enables speed throttling only to the refresh of your monitor. This means that the game’s actual refresh rate is ignored; however, the sound code still attempts to keep up with the game’s original refresh rate, so you may encounter sound problems. This option is intended mainly for those who have tweaked their video card’s settings to provide carefully matched refresh rate options. The default is OFF (-nosyncrefresh).
Video soft-specific options¶
Scale mode: none, async, yv12, yuy2, yv12x2, yuy2x2 (-video soft only). Default is ‘none‘.
Video OpenGL-specific options¶
-[no]filter / -[no]flt
Enable bilinear filtering on the game screen graphics. When disabled, point filtering is applied, which is crisper but leads to scaling artifacts. If you don’t like the filtered look, you are probably better off increasing the -prescale value rather than turning off filtering altogether. The default is ON (-filter).
Controls the size of the screen images when they are passed off to the graphics system for scaling. At the minimum setting of 1, the screen is rendered at its original resolution before being scaled. At higher settings, the screen is expanded by a factor of <amount> before being scaled. This produces a less blurry image at the expense of some speed and also increases the effective resolution of non-screen elements such as artwork and fonts. The default is 1.
Video OpenGL debugging options¶
These 4 options are for compatibility in -video opengl. If you report rendering artifacts you may be asked to try messing with them by the devs, but normally they should be left at their defaults which results in the best possible video performance.
Always use only power-of-2 sized textures (default off)
Don’t use OpenGL GL_ARB_texture_rectangle (default on)
Enable OpenGL VBO, if available (default on)
Enable OpenGL PBO, if available (default on)
Video OpenGL GLSL options¶
Enable OpenGL GLSL, if available (default off)
Enable OpenGL GLSL filtering instead of FF filtering – 0-plain, 1-bilinear (default is 1)
Custom OpenGL GLSL shader set MAME bitmap 0 [todo: better details on usage at some point. See http://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=100988#Post100988 ]
Custom OpenGL GLSL shader set MAME bitmap 1
Custom OpenGL GLSL shader set MAME bitmap 2
Custom OpenGL GLSL shader set MAME bitmap 3
Custom OpenGL GLSL shader set MAME bitmap 4
Custom OpenGL GLSL shader set MAME bitmap 5
Custom OpenGL GLSL shader set MAME bitmap 6
Custom OpenGL GLSL shader set MAME bitmap 7
Custom OpenGL GLSL shader set MAME bitmap 8
Custom OpenGL GLSL shader set MAME bitmap 9
Custom OpenGL GLSL shader screen bitmap 0
Custom OpenGL GLSL shader screen bitmap 1
Custom OpenGL GLSL shader screen bitmap 2
Custom OpenGL GLSL shader screen bitmap 3
Custom OpenGL GLSL shader screen bitmap 4
Custom OpenGL GLSL shader screen bitmap 5
Custom OpenGL GLSL shader screen bitmap 6
Custom OpenGL GLSL shader screen bitmap 7
Custom OpenGL GLSL shader screen bitmap 8
Custom OpenGL GLSL shader screen bitmap 9
Enable OpenGL GLSL handling of brightness and contrast. Better RGB game performance. Default is on.
NOTE: Multiple Screens may fail to work correctly on some Macintosh machines as of right now.
Full screen options¶
Enables resolution switching. This option is required for the -resolution* options to switch resolutions in full screen mode. On modern video cards, there is little reason to switch resolutions unless you are trying to achieve the “exact” pixel resolutions of the original games, which requires significant tweaking. This option is also useful on LCD displays, since they run with a fixed resolution and switching resolutions on them is just silly. The default is OFF (-noswitchres).
Specifies which sound subsystem to use. ‘none‘ disables sound altogether. The default is sdl.
This controls the amount of latency built into the audio streaming. By default MAME tries to keep the 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 audio lag.
SDL Keyboard Mapping¶
Enable keymap. Default is OFF (-nokeymap)
Keymap Filename. Default is ‘keymap.dat‘.
Key to toggle keyboard mode. Default is ‘SCRLOCK‘
SDL Joystick Mapping¶
Name of joystick mapped to joystick #1, default is auto.
Name of joystick mapped to joystick #2, default is auto.
Name of joystick mapped to joystick #3, default is auto.
Name of joystick mapped to joystick #4, default is auto.
Name of joystick mapped to joystick #5, default is auto.
Name of joystick mapped to joystick #6, default is auto.
Name of joystick mapped to joystick #7, default is auto.
Name of joystick mapped to joystick #8, default is auto.
Use special handling for PS3 Sixaxis controllers. Default is OFF (-nosixaxis)
SDL Lowlevel driver options¶
SDL video driver to use (‘x11’, ‘directfb’, ... or ‘auto‘ for SDL default)
SDL audio driver to use (‘alsa’, ‘arts’, ... or ‘auto‘ for SDL default)
Alternative libGL.so to use; ‘auto‘ for system default