# Using MESS at the Command Line

This section deals with configuring and running MESS for Win32. It includes where to start, an in depth look at the command line and a section looking at the MESS.ini file.

## Where to start...

The beauty of MESS for Win32 is the fact although it looks like a DOS file it is actually a windows based program. Therefore you don't have to mess around configuring drivers as it uses DirectX and your windows drivers.

All you need to do to run it is to open a command prompt. Either go to the start button, press run and type command or you can run the command prompt from the start/programs/accessories menu.

Once you are in a DOS box type in this command

cd C:\MESS

You should see the prompt

C:\MESS>

If it is the first time you have run MESS type MESS -cc. This will create a file called MESS.ini which holds all the default MESS settings.

## Command Line Options

MESS for Win32 uses a straightforward command format to execute. Here is what it looks like...

MESS <system> <options...>

The <system> option is the name of the system (for a complete list, check here). The <options...> include both device options as well as options found in Mame. Each system has its own list of device types; some of these are common to multiple systems, whereas some others are specific to certain systems. Cartridges on the NES and Atari 2600 are both specified with the -cart option. The Apple II floppy disk is specified with -s6d1 (Slot 6 Disk 1). One can obtain a complete list of what devices are used for any given system by typing: MESS -listmedia

These are all the command line options that MESS uses...

*** Frontend Related ***
-help / -h ./ -? | Show the help message
-listfull / -ll | Lists all games as short name, full name
-listdetails | Lists all games with detailed info
-listxml / -lx | Lists all available info on a driver in XML format
-listclones / -lc | Lists only clones
-listcrc | Lists rom checksums
-listmedia | Lists the devices used by a system in MESS
-listroms | Displays ROMs required by the specified system
-listsamples | Displays samples required by the specified game
-verifyroms | Checks specified game(s) for missing and invalid ROMs.
-verifysets / -vset | Checks specified game(s) and reports its status.
-verifysamples | Checks that all samplesets have the correct samples in them.
-romident | Checks an unknown romset against MESS romsets to see what it belongs to
-isknown | Same as above but with less info
*** Windows path and folder options ***
-rompath / -rp | Specify path for ROM files
-hashpath / -hash | Specify path for software hash check files
-inipath | Specify path for game ini files
-samplepath / -sp | Specify path for system samples
-cfg_directory | Specify the folder to save configurations
-nvram_directory | Specify the folder to save nvram contents
-memcard_directory | Specify the folder to save memory card contents
-input_directory | Specify the folder to save input device logs
-hiscore_directory | Specify the folder to save hiscores
-state_directory | Specify the folder to save states
-artwork_directory | Specify the folder for Artwork (Overlays etc.)
-snapshot_directory | Specify the folder for screenshots (.png format)
-ctrlr_directory | Lets you specify a folder for MESS to look in for you controller ini files.
-cheat_file | Specify the cheat filename
*** Windows video options ***
-[no]autoframeskip / -[no]afs | If you game is running slow then use skip frames to speed up emulation
-frameskip / -fs | Lets you specify how many frames are skipped when playing a game. (autoframeskip needs to be off)
-[no]waitvsync | Waits for the screen to draw before drawing the next frame (reduces tearing of graphics)
-[no]triplebuffer / -[no]tb | Triple buffering (only if fullscreen) draws three screens at a time and flips them which creates smoother animation.
-[no]window / -[no]w | This option lets you run MESS in a window on your desktop or fullscreen.
-[no]ddraw / -[no]dd | Use DirectDraw for rendering (Leave on!)
-[no]direct3d / -[no]d3d | Use Direct3D for rendering (On some cards faster than direct draw)
-[no]hwstretch / -[no]hws | Stretches games to fill the screen using the hardware on your graphics card (if you have it)
-cleanstretch / -cs | Stretches the screem to integer ratios and ignores the game aspect ratio. Uses these options... -cleanstretch auto : Lets MESS decide. -cleanstretch full -cleanstretch none : Disables cleanstretch -cleanstretch horizontal : Horzontal clean stretch only -cleanstretch vertical : Vertical clean stretch only
-resolution / -r | Sets the resolution in fullscreen mode (e.g. 640x480)
-zoom / -z | Forces a specific zoom level
-refresh | Set a specific monitor refresh rate in hz
-[no]scanlines / -[no]sl | Emulates the lower resolution screenmode on monitors and TV's.
-[no]switchres | Switches the screen resolutions to best fit the game
-[no]switchbpp | Switch the color depth of a screen to match the game being played.
-[no]maximize / -[no]max | Starts a MESS window maximized
-[no]keepaspect / -[no]ka | Keep a game in the right aspect no matter what resolution is used.
-[no]matchrefresh | Attempt to match the game's refresh rate
-[no]syncrefresh | Synchronize only to the monitor refresh
-[no]throttle | Throttle MESS's speed to match the game's framerate
-full_screen_brightness / -fsb | Sets the brightness in full screen mode
-frames_to_run / -ftr | Sets the number of frames to run within the game
-effect | none - no effect (this is the default) sharp - Stretch screen without blurring scan25 - 25% scanlines scan50 - 50% scanlines scan75 - 75% scanlines rgb3 - a certain "monitor mask" rgb4 - another one rgb6 - another one rgb16 - another one. Choose the one you like best.
-screen_aspect X:Y | Where X and Y are the aspect you want. Helps configure the screen to fill your monitor. eg.g. most monitors are 4:3 though if you have a wide screen then you may have 16:9.
-[no]sleep | Lets MESS use less CPU time if it can
-[no]rdtsc | Changes the timing in a game
-[no]high_priority | Increase processor thread priority so improves performance if you have alot of programs running.
*** Windows Direct3D 2D video options ***
-[no]d3dtexmanage | Lets DirectX manage all game screen to texture operations rather than MESS.
-d3dfilter / -flt | Sets the filter (blurriness) when using D3D for rendering the game screen thus reducing jagged edges. 0 is none 1 bi-linear 2 flat bi-cubic 3 gaussian bicubic 4 anisotropic (If your card supports it)
-[no]d3dprescale | Works like sharp in the effects so doesn't blur the screen.
-d3dfeedback | Something about feedback intensity (Whatever that is)
-d3dsaturate | Over saturates the colour intensity in games.
-d3dscan | Sets the scanline intensity if you select this effect.
-[no]d3deffectrotate | Rotates the d3deffect command to work with vertically aligned monitors.
-d3deffect | Adds screen effects when the game screen is drawn. You can also use the names from the -effect option too. rgbminmask dotmedmask rgbmedmask rgbmicro rgbtiny aperturegrille dotmedbright rgbmaxbright
-d3dcustom | Dont touch unless you know what you're doing
-d3dexpert | Same as above.
*** Windows sound options ***
-audio_latency | Sets MESSs audio latency which help to reduce sound clicks and pops
*** Input device options ***
-[no]mouse | Enable mouse input
-[no]joystick / -[no]joy | Enable joystick input
-[no]lightgun / -[no]gun | Enable lightgun input
-[no]steadkey / -[no]steady | If you are having problems with pressing more than one key at a time then enable this option.
-[no]keyboard_leds / -[no]leds | uses the keyboard LED's (e.g. numlock light) to simulate the LED's on an arcade board
-a2d_deadzone / -a2d <float> | How much you have to move an analog joystick before it registers on digitally controlled games.
-ctrlr name Loads the controller ini file specified by name (e.g. -ctrlr wingman)
*** MESS specific options ***
-[no]newui / -[no]nu | Uses the new MESS windows user interface for options instead of Mames screen based one
-ramsize / -ram | Lets you set the amount of RAM a system can use (if the system supports it)
-threads / -thr | Used for parallel data
-[no]natural / -[no]nat | Determines whether a natural keyboard is being used
-min_width / -mw <int> | Sets a minimum width for the MESS screen
-min_height / -mh <int> | Sets a minimum height for the MESS screen
-[no]writeconfig / -[no]wc | Determines whether MESS writes a configuration file for a system when you close it
-createdir | Creates all the system folders in the MESS software folder
*** MESS CORE video options ***
-[no]norotate | Do not apply rotation
-[no]ror | Rotate screen clockwise
-[no]rol | Rotate screen anti-clockwise
-[no]autoror | Automatically rotates the screen clockwise for vertical games.
-[no]autorol | Automatically rotates the screen anti-clockwise for vertical games.
-[no]flipx | Flip screen upside-down
-[no]flipy | Flip screen left-right
-gamma | Gamma correction is used if you find your game is too dark.
-brightness | Brightness is also used if you find your game is too dark.
-pause_brightness | Changes the brightness of the game when paused.
*** MESS CORE vector game options ***
-[no]antialias / -[no]aa | Draw antialiased vectors which smoothes out the edges.
-[no]translucency / -[no]tl | Draw translucent vectors which simulates the feel of vector games
-beam | Set beam width in vector games
-flicker | Set flickering in vector games which again adds to the realism of vector games.
-intensity | Sets the brightness of the vectors.
*** MESS CORE sound options ***
-samplerate / -sr | Set samplerate (e.g. 22050) in khz
-[no]samples | Uses samples to complete the sound systems for games which require them.
-[no]sound | Enable/Disable sound and sound CPUs
-volume / -vol | Volume (range [-32,0])
*** MESS CORE misc options ***
-[no]artwork / -[no]art | Use additional game artwork
-[no]use_backdrops / -[no]backdrop | For art files that are the backdrop for games.
-[no]use_overlays / -[no]overlay | For art files that are overlayed on top of games.
-[no]use_bezels / -[no]bezel | For art files that are go around games.
-[no]artwork_crop / -[no]artcrop | Crop artwork to game screen size only.
-artwork_resolution / -artres | Sets the resolution for the artwork in a game (0 for auto)
-[no]cheat / -[no]c | Enable/disable cheat subsystem
-[no]debug / -[no]d | Enable/disable debugger (only if available)
-playback / -pb | Playback an input file
-record / -rec | Record an input file
-[no]log | Generate an error.log for debugging
-[no]oslog | Outputs an error log to MESSs debugger
-[no]skip_gameinfo | Skips the game info screen
-bios | Select the system BIOS to use.
*** Configuration options ***
-createconfig / -cc | Create the default configuration file
-showconfig / -sc | Display running parameters in rc style
-showusage / -su | Show key help
-[no]readconfig / -[no]rc | Enable/disable loading of configfiles
-[no]verbose / -[no]v | Display additional diagnostic information

Here is an example of running MESS at the command line...

mess a2600 -cart c:\games\defender.a26 -now

This will run defender on an Atari 2600 using the full screen. As you can see it's not too hard once you've got over the amount of options available to you. If your brain is frazzled and you want an easier MESS use the GUI version as it's much easier to configure.

##
MESS.ini File

Rather than using the command line to set up the options you want to use in MESS you can adjust a file called MESS.ini . This is where MESS stores it's default configuration information.

To edit the file in windows find the MESS.ini file in the C:\MESS folder (it will have an icon next to it that looks like a text pad with a yellow stamp on it) and then double click it. This will automatically bring up the MESS.ini file in notepad. There are several parts to it and as you can see they relate to the command line options above.

The format of the file is simple to follow, most things with a yes / no answer are denoted by 0 for no and 1 for yes. there are also a few numerical options (e.g. gamma) and a few that require a text answer (e.g. rom path)

If you configure this file correctly you wont need to add options onto the command line.

Don't worry if you muck the whole file up because if you can delete it and, if you run MESS -cc again it will make another.

    #
    # CORE SEARCH PATH OPTIONS
    #
    rompath                   roms
    hashpath                  hash
    softwarepath              software
    samplepath                samples
    artpath                   artwork
    ctrlrpath                 ctrlr
    inipath                   .;ini
    fontpath                  .

    #
    # CORE OUTPUT DIRECTORY OPTIONS
    #
    cfg_directory             cfg
    nvram_directory           nvram
    memcard_directory         memcard
    input_directory           inp
    state_directory           sta
    snapshot_directory        snap
    diff_directory            diff
    comment_directory         comments

    #
    # CORE FILENAME OPTIONS
    #
    cheat_file                cheat.dat

    #
    # CONFIGURATION OPTIONS
    #
    readconfig                1
    skip_gameinfo             0

    #
    # MISC OPTIONS
    #
    bios                      default
    cheat                     0

    #
    # STATE/PLAYBACK OPTIONS
    #
    # state                   <NULL> (not set)
    autosave                  0
    # playback                <NULL> (not set)
    # record                  <NULL> (not set)
    # mngwrite                <NULL> (not set)
    # wavwrite                <NULL> (not set)

    #
    # DEBUGGING OPTIONS
    #
    log                       0
    oslog                     0
    verbose                   0

    #
    # PERFORMANCE OPTIONS
    #
    autoframeskip             0
    frameskip                 0
    frames_to_run             0
    throttle                  1
    sleep                     1
    rdtsc                     0
    priority                  0
    multithreading            0

    #
    # VIDEO OPTIONS
    #
    video                     d3d
    numscreens                1
    window                    0
    maximize                  1
    keepaspect                1
    prescale                  1
    effect                    none
    pause_brightness          0.65
    waitvsync                 0
    syncrefresh               0

    #
    # VIDEO ROTATION OPTIONS
    #
    rotate                    1
    ror                       0
    rol                       0
    autoror                   0
    autorol                   0
    flipx                     0
    flipy                     0

    #
    # DIRECTDRAW-SPECIFIC OPTIONS
    #
    hwstretch                 1

    #
    # DIRECT3D-SPECIFIC OPTIONS
    #
    d3dversion                9
    filter                    1

    #
    # PER-WINDOW VIDEO OPTIONS
    #
    screen                    auto
    aspect                    auto
    resolution                auto
    view                      auto
    screen0                   auto
    aspect0                   auto
    resolution0               auto
    view0                     auto
    screen1                   auto
    aspect1                   auto
    resolution1               auto
    view1                     auto
    screen2                   auto
    aspect2                   auto
    resolution2               auto
    view2                     auto
    screen3                   auto
    aspect3                   auto
    resolution3               auto
    view3                     auto

    #
    # FULL SCREEN OPTIONS
    #
    triplebuffer              0
    switchres                 0
    full_screen_brightness    1.0
    full_screen_contrast      1.0
    full_screen_gamma         1.0

    #
    # GAME SCREEN OPTIONS
    #
    brightness                1.0
    contrast                  1.0
    gamma                     1.0

    #
    # VECTOR RENDERING OPTIONS
    #
    antialias                 1
    beam                      1.0
    flicker                   0

    #
    # ARTWORK OPTIONS
    #
    artwork_crop              0
    use_backdrops             1
    use_overlays              1
    use_bezels                1

    #
    # SOUND OPTIONS
    #
    sound                     1
    samplerate                48000
    samples                   1
    volume                    0
    audio_latency             1

    #
    # INPUT DEVICE OPTIONS
    #
    # ctrlr                   <NULL> (not set)
    mouse                     0
    joystick                  0
    lightgun                  0
    dual_lightgun             0
    offscreen_reload          0
    steadykey                 0
    a2d_deadzone              0.3
    digital                   none

    #
    # AUTOMATIC DEVICE SELECTION OPTIONS
    #
    paddle_device             keyboard
    adstick_device            keyboard
    pedal_device              keyboard
    dial_device               keyboard
    trackball_device          keyboard
    lightgun_device           keyboard
    mouse_device              mouse

    #
    # MESS SPECIFIC OPTIONS
    #
    newui                     1
    # ramsize                 <NULL> (not set)
    threads                   0
    natural                   0
    min_width                 200
    min_height                200
    writeconfig               0
    skip_warnings             0