Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 056af629b86546a99f2feca0570542e5 > files > 11

openmsx-0.7.0-2mdv2008.1.x86_64.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
  <link title="Purple" rel="stylesheet" href="manual-purple.css" type="text/css" />
  <link title="Minty" rel="alternate stylesheet" href="manual-minty.css" type="text/css" />
  <link title="Plain" rel="alternate stylesheet" href="manual.css" type="text/css" />

  <title>openMSX Console Command Reference</title>
</head>

<body>
  <h1>openMSX Console Command Reference</h1>

  <ol class="inlinetoccat">
    <li>Commands

      <ol class="inlinetoc">
        <li><a class="internal" href="#after">after</a></li>

        <li><a class="internal" href="#bind">bind / unbind / bind_default / unbind_default</a></li>

        <li><a class="internal" href="#cart">cart / cart&lt;x&gt;</a></li>

        <li><a class="internal" href="#cassetteplayer">cassetteplayer</a></li>

        <li><a class="internal" href="#cd">cd&lt;x&gt;</a></li>

        <li><a class="internal" href="#cycle">cycle / cycle_back</a></li>

        <li><a class="internal" href="#debug">debug</a></li>

        <li><a class="internal" href="#disk">disk&lt;x&gt; / virtual_drive</a></li>

        <li><a class="internal" href="#diskmanipulator">diskmanipulator</a></li>

        <li><a class="internal" href="#escape_grab">escape_grab</a></li>

        <li><a class="internal" href="#exit">exit</a></li>

        <li><a class="internal" href="#ext">ext</a></li>

        <li><a class="internal" href="#findcheat">findcheat</a></li>

        <li><a class="internal" href="#hd">hd&lt;x&gt;</a></li>

        <li><a class="internal" href="#help">help</a></li>

        <li><a class="internal" href="#incr">incr</a></li>

        <li><a class="internal" href="#iomap">iomap</a></li>

        <li><a class="internal" href="#keymatrix">keymatrixdown / keymatrixup</a></li>

        <li><a class="internal" href="#list_extensions">list_extensions</a></li>

        <li><a class="internal" href="#load_icons">load_icons</a></li>

        <li><a class="internal" href="#load_settings">load_settings</a></li>

        <li><a class="internal" href="#machine">machine</a></li>

        <li><a class="internal" href="#machines">create_machine / load_machine / activate_machine / list_machines / delete_machine</a></li>

        <li><a class="internal" href="#machine_info">machine_info</a></li>

	<li><a class="internal" href="#monitor_type">monitor_type</a></li>

	<li><a class="internal" href="#mute_channels">mute_channels / unmute_channels / solo</a></li>

        <li><a class="internal" href="#openmsx_info">openmsx_info</a></li>

        <li><a class="internal" href="#osd">osd</a></li>

        <li><a class="internal" href="#palette">palette</a></li>

        <li><a class="internal" href="#plugunplug">plug / unplug</a></li>
	
	<li><a class="internal" href="#psg_profile">psg_profile</a></li>

        <li><a class="internal" href="#record">record</a></li>

	<li><a class="internal" href="#record_channels">record_channels</a></li>

        <li><a class="internal" href="#remove_extension">remove_extension</a></li>

        <li><a class="internal" href="#reset">reset</a></li>

        <li><a class="internal" href="#save_settings">save_settings</a></li>

        <li><a class="internal" href="#savestate">savestate / loadstate / list_savestates / delete_savestate</a></li>

        <li><a class="internal" href="#screenshot">screenshot</a></li>

        <li><a class="internal" href="#set">set</a></li>

        <li><a class="internal" href="#slotmap">slotmap</a></li>

        <li><a class="internal" href="#slotselect">slotselect</a></li>

        <li><a class="internal" href="#soundlog">soundlog</a></li>

        <li><a class="internal" href="#store_machine">store_machine / restore_machine</a></li>

        <li><a class="internal" href="#test_machine">test_machine</a></li>

        <li><a class="internal" href="#toggle">toggle</a></li>

        <li><a class="internal" href="#trainer">trainer</a></li>

        <li><a class="internal" href="#type">type</a></li>

        <li><a class="internal" href="#unset">unset</a></li>

        <li><a class="internal" href="#update">update</a></li>

        <li><a class="internal" href="#user_setting">user_setting</a></li>

        <li><a class="internal" href="#vdpregs">vdpregs</a></li>

        <li><a class="internal" href="#other">other</a></li>
      </ol>
    </li>

    <li>Old Commands

      <ol class="inlinetoc">
        <li><a class="internal" href="#aliasunalias">alias / unalias</a></li>

        <li><a class="internal" href="#decr">decr</a></li>

        <li><a class="internal" href="#quit">quit</a></li>

        <li><a class="internal" href="#restoredefault">restoredefault</a></li>
      </ol>
    </li>

    <li>Settings

      <ol class="inlinetoc">
        <li><a class="internal" href="#accuracy">accuracy</a></li>

        <li><a class="internal" href="#audio-inputfilename">audio-inputfilename</a></li>

        <li><a class="internal" href="#autoruncassettes">autoruncassettes</a></li>

        <li><a class="internal" href="#blur">blur</a></li>

        <li><a class="internal" href="#bootsector">bootsector</a></li>

        <li><a class="internal" href="#brightness">brightness</a></li>

        <li><a class="internal" href="#cmdtiming">cmdtiming</a></li>

        <li><a class="internal" href="#color_matrix">color_matrix</a></li>

        <li><a class="internal" href="#console">console</a></li>

        <li><a class="internal" href="#consolebackground">consolebackground</a></li>

        <li><a class="internal" href="#consolecolumns">consolecolumns</a></li>

        <li><a class="internal" href="#consolefont">consolefont</a></li>

        <li><a class="internal" href="#consoleplacement">consoleplacement</a></li>

        <li><a class="internal" href="#consolerows">consolerows</a></li>

        <li><a class="internal" href="#contrast">contrast</a></li>

        <li><a class="internal" href="#cputrace">cputrace</a></li>

        <li><a class="internal" href="#debugoutput">debugoutput</a></li>

        <li><a class="internal" href="#default_machine">default_machine</a></li>

        <li><a class="internal" href="#deinterlace">deinterlace</a></li>

        <li><a class="internal" href="#DirAsDSKmode">DirAsDSKmode</a></li>

	<li><a class="internal" href="#display_deform">display_deform</a></li>

        <li><a class="internal" href="#frequency">frequency</a></li>

        <li><a class="internal" href="#firmwareswitch">firmwareswitch</a></li>

        <li><a class="internal" href="#fullscreen">fullscreen</a></li>

        <li><a class="internal" href="#fullspeedwhenloading">fullspeedwhenloading</a></li>

        <li><a class="internal" href="#gamma">gamma</a></li>

        <li><a class="internal" href="#glow">glow</a></li>

        <li><a class="internal" href="#grabinput">grabinput</a></li>

        <li><a class="internal" href="#horizontal_stretch">horizontal_stretch</a></li>

        <li><a class="internal" href="#inputdelay">inputdelay</a></li>

        <li><a class="internal" href="#kbd_auto_toggle_code_kana_lock">kbd_auto_toggle_code_kana_lock</a></li>

	<li><a class="internal" href="#kbd_code_kana_host_key">kbd_code_kana_host_key</a></li>

	<li><a class="internal" href="#kbd_keymap_filename">kbd_keymap_filename</a></li>

	<li><a class="internal" href="#kbd_mapping_mode">kbd_mapping_mode</a></li>

	<li><a class="internal" href="#kbd_numkeypad_always_enabled">kbd_numkeypad_always_enabled</a></li>

	<li><a class="internal" href="#kbd_numkeypad_enter_key">kbd_numkeypad_enter_key</a></li>

        <li><a class="internal" href="#kbd_trace_key_presses">kbd_trace_key_presses</a></li>

        <li><a class="internal" href="#keyjoystick_n_button">keyjoystick&lt;n&gt;.&lt;button&gt;</a></li>

        <li><a class="internal" href="#led">led_&lt;name&gt;</a></li>

        <li><a class="internal" href="#limitsprites">limitsprites</a></li>

        <li><a class="internal" href="#master_volume">master_volume</a></li>

        <li><a class="internal" href="#maxframeskip">maxframeskip</a></li>

        <li><a class="internal" href="#midi-in-readfilename">midi-in-readfilename</a></li>

        <li><a class="internal" href="#midi-out-logfilename">midi-out-logfilename</a></li>

        <li><a class="internal" href="#minframeskip">minframeskip</a></li>

        <li><a class="internal" href="#mute">mute</a></li>

        <li><a class="internal" href="#noise">noise</a></li>

        <li><a class="internal" href="#pause">pause</a></li>

        <li><a class="internal" href="#power">power</a></li>

        <li><a class="internal" href="#printerlogfilename">printerlogfilename</a></li>

        <li><a class="internal" href="#print-resolution">print-resolution</a></li>

        <li><a class="internal" href="#r800_freq">r800_freq / r800_freq_locked</a></li>

        <li><a class="internal" href="#renderer">renderer</a></li>

        <li><a class="internal" href="#renshaturbo">renshaturbo</a></li>

        <li><a class="internal" href="#resampler">resampler</a></li>

        <li><a class="internal" href="#rs232-inputfilename">rs232-inputfilename</a></li>

        <li><a class="internal" href="#rs232-outputfilename">rs232-outputfilename</a></li>

        <li><a class="internal" href="#rtcmode">rtcmode</a></li>

        <li><a class="internal" href="#samples">samples</a></li>

        <li><a class="internal" href="#save_settings_on_exit">save_settings_on_exit</a></li>

        <li><a class="internal" href="#scale_algorithm">scale_algorithm</a></li>

        <li><a class="internal" href="#scale_factor">scale_factor</a></li>

        <li><a class="internal" href="#scanline">scanline</a></li>

        <li><a class="internal" href="#sound_driver">sound_driver</a></li>

        <li><a class="internal" href="#speed">speed</a></li>

	<li><a class="internal" href="#soundchip_balance">&lt;soundchip&gt;_balance</a></li>

        <li><a class="internal" href="#soundchip_channel_record">&lt;soundchip&gt;_ch&lt;channel&gt;_record</a></li>

	<li><a class="internal" href="#soundchip_channel_mute">&lt;soundchip&gt;_ch&lt;channel&gt;_mute</a></li>

        <li><a class="internal" href="#soundchip_detune_frequency">&lt;soundchip&gt;_detune_frequency</a></li>

        <li><a class="internal" href="#soundchip_detune_percent">&lt;soundchip&gt;_detune_percent</a></li>

        <li><a class="internal" href="#soundchip_vibrato_frequency">&lt;soundchip&gt;_vibrato_frequency</a></li>

        <li><a class="internal" href="#soundchip_vibrato_percent">&lt;soundchip&gt;_vibrato_percent</a></li>

        <li><a class="internal" href="#soundchip_volume">&lt;soundchip&gt;_volume</a></li>

        <li><a class="internal" href="#throttle">throttle</a></li>

        <li><a class="internal" href="#turborpause">turborpause</a></li>

        <li><a class="internal" href="#umr_callback">umr_callback</a></li>

        <li><a class="internal" href="#user_directories">user_directories</a></li>

        <li><a class="internal" href="#vdpcmdtrace">vdpcmdtrace</a></li>

        <li><a class="internal" href="#videosource">videosource</a></li>

        <li><a class="internal" href="#v9990cmdtrace">v9990cmdtrace</a></li>

        <li><a class="internal" href="#z80_freq">z80_freq / z80_freq_locked</a></li>
      </ol>
    </li>
  </ol>

  <h2><a id="commands">Commands</a></h2>

  <h3><a id="after">after</a></h3>

  <p>Execute a command after a certain event occurs, for example a given amount of time has passed or the emulator has been idle for a given amount of time.
  Every postponed command executes just once; if you want a command to run periodically, you have to issue it again every time it runs.
  The <code>after</code> command returns the id of the postponed command.
  It is possible to query a list of
  postponed commands and also to cancel postponed commands.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>after time &lt;seconds&gt; &lt;command&gt;</code></td>

      <td>Execute a command after some time. Timescale is in MSX seconds.</td>
    </tr>

    <tr>
      <td><code>after realtime &lt;seconds&gt; &lt;command&gt;</code></td>

      <td>Execute a command after some time. Timescale is in host seconds.</td>
    </tr>

    <tr>
      <td><code>after idle &lt;seconds&gt; &lt;command&gt;</code></td>

      <td>Execute a command after some time being idle</td>
    </tr>

    <tr>
      <td><code>after frame &lt;command&gt;</code></td>

      <td>Execute a command when a video frame is finished
      (VDP scanning reaches vsync)</td>
    </tr>

    <tr>
      <td><code>after break &lt;command&gt;</code></td>

      <td>Execute a command after a breakpoint is reached</td>
    </tr>

    <tr>
      <td><code>after boot &lt;command&gt;</code></td>

      <td>Execute a command after a (re)boot</td>
    </tr>

    <tr>
      <td><code>after machine_switch &lt;command&gt;</code></td>

      <td>Execute a command after switch to new a machine</td>
    </tr>

    <tr>
      <td><code>after info</code></td>

      <td>List all postponed commands</td>
    </tr>

    <tr>
      <td><code>after cancel &lt;id&gt;</code></td>

      <td>Cancel the postponed command with given id</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>after time 2.6 "set renderer SDLGL"</code><br />
    <code>after idle 100 exit</code><br />
    <code>after info</code><br />
    <code>after cancel 2</code>
  </div>

  <h3><a id="bind">bind / unbind / bind_default / unbind_default</a></h3>

  <p>Associate events (such as key presses) with commands. Whenever the specified event occurs (e.g. you press the
  specified key), the corresponding command will be executed. To customize your bindings you should use the (un)bind
  commands. A script that wants to provide a default binding for its functionality needs to use bind_default.</p>

  <p>Events can be:</p>

  <table>
    <tr>
      <td><code>&lt;key&gt;[,release]</code></td>

      <td>Short for <code>keyb &lt;key&gt;[,release]</code></td>
    </tr>

    <tr>
      <td><code>keyb &lt;key&gt;[,release]</code></td>

      <td>&lt;key&gt; is pressed [or released]</td>
    </tr>

    <tr>
      <td><code>mouse button&lt;n&gt; &lt;up/down&gt;</code></td>

      <td>Mouse button &lt;n&gt; went up or down</td>
    </tr>

    <tr>
      <td><code>mouse motion &lt;x&gt; &lt;y&gt;</code></td>

      <td>Mouse motion of &lt;x&gt; and &lt;y&gt;</td>
    </tr>

    <tr>
      <td><code>joy&lt;n&gt; button&lt;m&gt; &lt;up/down&gt;</code></td>

      <td>Button &lt;m&gt; of joystick &lt;n&gt; went up/down</td>
    </tr>

    <tr>
      <td><code>joy&lt;n&gt; axis&lt;m&gt; &lt;value&gt;</code></td>

      <td>Axis &lt;m&gt; of joystick &lt;n&gt; got value &lt;value&gt;</td>
    </tr>

    <tr>
      <td><code>focus &lt;boolean&gt;</code></td>

      <td>The openMSX window got (1) or lost (0) focus</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>bind</code></td>

      <td>Show all bindings</td>
    </tr>

    <tr>
      <td><code>bind &lt;key&gt;</code></td>

      <td>Show binding for the given key</td>
    </tr>

    <tr>
      <td><code>bind &lt;event&gt;</code></td>

      <td>Show binding for this event</td>
    </tr>

    <tr>
      <td><code>bind &lt;event&gt; [-repeat] &lt;command&gt;</code></td>

      <td>Make a new binding</td>
    </tr>

    <tr>
      <td><code>unbind &lt;key&gt;</code></td>

      <td>Undo binding for this event</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>bind PAGEUP "set speed 100"</code><br />
    <code>bind PAGEDOWN "set speed 50"</code><br />
    <br />
    Only run with full throttle while F9 is pressed (like BrMSX):<br />
    <code>unbind F9</code><br />
    <code>bind F9 "set throttle off"</code><br />
    <code>bind F9,release "set throttle on"</code><br />
    <br />
    Pause when window loses focus (like fMSX):<br />
    <code>bind "focus 0" "set pause on"</code><br />
    <code>bind "focus 1" "set pause off"</code><br />
    <br />
    Middle-click to toggle input grabbing:<br />
    <code>bind "mouse button2 down" "toggle grabinput"</code><br />
    <br />
    Map button 8 of joystick 1 to F2-key:<br />
    <code>bind "joy1 button8 down" "keymatrixdown 6 0x40"</code><br />
    <code>bind "joy1 button8 up" "keymatrixup 6 0x40"</code><br />
    <br />
    Use pageup/down to increase/decrease emulation speed.<br/>
    <code>bind pageup   -repeat "incr speed  1"</code><br />
    <code>bind pagedown -repeat "incr speed -1"</code><br />
  </div>

  <h3><a id="cart">cart / cart&lt;x&gt;</a></h3>

  <p>Insert a ROM cartridge in a running MSX. The <code>cart</code> command inserts the cartridge in the first available slot. The <code>carta</code>, <code>cartb</code> etc. commands insert it in the specified slot. The cartridges can be removed again with the <code>eject</code> subcommand.</p>

  <p>ROM cartridges are a special class of extensions. For extensions that are not ROM cartridges, see the commands <code><a class="internal" href="#ext">ext</a></code>, <code><a class="internal" href="#list_extensions">list_extensions</a></code> and <code><a class="internal" href="#remove_extension">remove_extension</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>cart KMARE.ROM</code></td>

      <td>Insert ROM cartridge in first free slot</td>
    </tr>

    <tr>
      <td><code>cart insert KMARE.ROM</code></td>

      <td>Insert ROM cartridge in first free slot</td>
    </tr>

    <tr>
      <td><code>carta USAS.ROM -ips USAS.IPS</code></td>

      <td>Insert ROM cartridge in slot A, with IPS patch applied to the ROM contents</td>
    </tr>

    <tr>
      <td><code>carta eject</code></td>

      <td>Eject the currently inserted cartridge from slot A</td>
    </tr>
  </table>

  <h3><a id="cassetteplayer">cassetteplayer</a></h3>

  <p>Controls the openMSX cassette player. The various subcommands can be used to insert, remove, create and rewind tape images.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>cassetteplayer insert &lt;tape image&gt;</code></td>

      <td>Insert tape image (WAV or CAS format) in the cassette player</td>
    </tr>

    <tr>
      <td><code>cassetteplayer eject</code></td>

      <td>Remove tape from virtual cassette player</td>
    </tr>

    <tr>
      <td><code>cassetteplayer rewind</code></td>

      <td>Rewind the current tape</td>
    </tr>

    <tr>
      <td><code>cassetteplayer motorcontrol on|off</code></td>

      <td>Selects whether motor control signal (remote) is obeyed (default: on)</td>
    </tr>

    <tr>
      <td><code>cassetteplayer new [&lt;tape image&gt;]</code></td>

      <td>Create new tape image and go to record mode</td>
    </tr>

    <tr>
      <td><code>cassetteplayer play</code></td>

      <td>Go to play mode (when in record mode) and rewind the tape</td>
    </tr>
  </table>

  <h3><a id="cd">cd&lt;x&gt;</a></h3>

  <p>Change the CDROM image. The commands <code>cda</code>, <code>cdb</code> etc. are assigned to all available CDROM drives in the MSX. They will not
  correspond to drive names as used in MSX-DOS.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>cda &lt;iso image&gt;</code></td>

      <td>Use ISO image for CDROM drive "cda"</td>
    </tr>

    <tr>
      <td><code>cda insert &lt;iso image&gt;</code></td>

      <td>Use ISO image for CDROM drive "cda"</td>
    </tr>

    <tr>
      <td><code>cda eject</code></td>

      <td>Eject CDROM from CDROM drive "cda"</td>
    </tr>

    <tr>
      <td><code>cda</code></td>

      <td>Show current ISO image for CDROM drive "cda"</td>
    </tr>
  </table>


  <h3><a id="cycle">cycle / cycle_back</a></h3>

  <p>Iterates through the values of an enumerated setting.</p>

  <p><code>cycle_back</code> does the same as <code>cycle</code>, but it goes in the opposite direction.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>cycle &lt;setting&gt;</code></td>
      <td>Changes the specified setting to the next value in the cycle</td>
    </tr>
    <tr>
      <td><code>cycle_back &lt;setting&gt;</code></td>
      <td>Changes the specified setting to the previous value in the cycle</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>cycle scale_algorithm</code><br />
    <code>cycle videosource</code>
  </div>


  <h3><a id="debug">debug</a></h3>

  <p>This command provides access to the debugger functionality of openMSX. It's meant to be used by an external debugger (see also <a class="external" href="openmsx-control.html">Controlling openMSX from External Applications</a>). The general format of the debug command is:</p>

  <p><code>debug &lt;subcommand&gt; [&lt;extra arguments&gt;]</code></p>

  <p>where 'extra arguments' are specific for each subcommand. Below is a list of all subcommands:</p>

  <table>
    <tr>
      <td><code>debug list</code></td>

      <td>Return a list of all debuggables.<br />
      A debuggable is (part of) the state of<br />
      a MSX device that can be accessed via these debug commands.<br />
      Examples are:<br />
      - the VDP registers<br />
      - the currently visible memory for the Z80<br />
      - the contents of the RAM</td>
    </tr>

    <tr>
      <td><code>debug desc &lt;name&gt;</code></td>

      <td>Return a description of this debuggable</td>
    </tr>

    <tr>
      <td><code>debug size &lt;name&gt;</code></td>

      <td>Return the size of this debuggable</td>
    </tr>

    <tr>
      <td><code>debug read &lt;name&gt; &lt;addr&gt;</code></td>

      <td>Read a byte from a debuggable</td>
    </tr>

    <tr>
      <td><code>debug write &lt;name&gt; &lt;addr&gt; &lt;val&gt;</code></td>

      <td>Write a byte to a debuggable</td>
    </tr>

    <tr>
      <td><code>debug read_block &lt;name&gt; &lt;addr&gt; &lt;size&gt;</code></td>

      <td>Read a whole block at once</td>
    </tr>

    <tr>
      <td><code>debug write_block &lt;name&gt; &lt;addr&gt; &lt;values&gt;</code></td>

      <td>Write a whole block at once</td>
    </tr>

    <tr>
      <td><code>debug probe &lt;subcommand&gt;</code></td>
      <td>See below.</td>
    </tr>

    <tr>
      <td><code>debug break</code></td>

      <td>Break CPU at current position</td>
    </tr>

    <tr>
      <td><code>debug breaked</code></td>

      <td>Query CPU break status</td>
    </tr>

    <tr>
      <td><code>debug cont</code></td>

      <td>Continue execution after break</td>
    </tr>

    <tr>
      <td><code>debug step</code></td>

      <td>Execute one instruction</td>
    </tr>

    <tr>
      <td><code>debug list_bp</code></td>

      <td>List the active breakpoints</td>
    </tr>

    <tr>
      <td><code>debug set_bp &lt;addr&gt; [&lt;cond&gt;] [&lt;cmd&gt;]</code></td>

      <td>Insert a new breakpoint at the given address. Optionally you can specify a condition and a command. When
      the CPU is about to execute the instruction at the given address, the condition will be evaluated, if this
      evaluates to true then the command is executed. The condition can be any Tcl expression and the command can be
      any Tcl command. The default condition is 'true' and the default command is <code>"debug break"</code>.</td>
    </tr>

    <tr>
      <td><code>debug remove_bp &lt;id&gt;</code></td>

      <td>Remove a certain breakpoint</td>
    </tr>

    <tr>
      <td><code>debug list_watchpoints</code></td>

      <td>List all defined watchpoints</td>
    </tr>

    <tr>
      <td><code>debug set_watchpoint &lt;type&gt; &lt;region&gt; [&lt;cond&gt;] [&lt;cmd&gt;]</code></td>

      <td>Insert a new watchpoint. When the CPU is about to read or write to/from the specified memory or IO region,
      the condition is evaluated. If the condition evaluated to true, the command is executed. The condition and the
      command are similar to the ones in the 'set_bp' subcommand. A watchpoint can either be set on a single memory
      address or IO port (specify a single value), or on a whole memory or IO port range (specify a begin/end pair).
      For example: <code>debug set_watchpoint write_mem {0x8000 0x8fff}</code></td>
    </tr>

    <tr>
      <td><code>debug remove_watchpoint &lt;id&gt;</code></td>

      <td>Remove a certain watchpoint</td>
    </tr>

    <tr>
      <td><code>debug disasm [&lt;addr&gt;]</code></td>

      <td>Disassemble instructions at PC or given address</td>
    </tr>
  </table>

  <p>The probe subcommand again has subcommands:</p>
  <table>
    <tr>
      <td><code>debug probe list</code></td>
      <td>Returns a list of all probes.</td>
    </tr>
    <tr>
      <td><code>debug probe desc &lt;probe&gt;</code></td>
      <td>Returns a description of this probe.</td>
    </tr>
    <tr>
      <td><code>debug probe read &lt;probe&gt;</code></td>
      <td>Returns the current value of a probe. But note that not all probes have a value</td>
    </tr>
    <tr>
      <td><code>debug probe set_bp &lt;probe&gt; [&lt;cond&gt;] [&lt;cmd&gt;]</code></td>
      <td>Set a breakpoint of a probe. Like in the 'set_bp' subcommand you can optionally specify a condition and a command.</td>
    </tr>
    <tr>
      <td><code>debug probe remove_bp &lt;id&gt;</code></td>
      <td>Remove the given breakpoint.</td>
    </tr>
    <tr>
      <td><code>debug probe list_bp</code></td>
      <td>List the active breakpoints set on probes.</td>
    </tr>
  </table>

  <p>At first sight 'probes' and 'debuggables' are very similar. Though there are some important differences and that's why probes and debuggables use different subcommands:</p>
  <table>
    <tr>
      <td>A debuggable is an array of bytes.</td>
      <td>A probe is a single value and can have any type.</td>
    </tr>
    <tr>
      <td>A debuggable is readable and (usually) writable.</td>
      <td>A probe is always read-only.</td>
    </tr>
    <tr>
      <td>It's not possible to set breakpoints on a debuggable.</td>
      <td>You can set breakpoints on a probe (and sometimes this is the only purpose of a probe).</td>
    </tr>
  </table>

  <div class="note">
    Note: Some of the commands are pretty low level. In the share/scripts directory you'll find some Tcl scripts that
    offer convenience wrappers around these commands. For example: <a class="internal" href="#other"><code>showmem</code></a>, <a class="internal" href="#other"><code>disasm</code></a>, <a class="internal" href="#other"><code>cpuregs</code></a>, <a class="internal" href="#other"><code>save_debuggable</code></a>, etc.
  </div>

  <h3><a id="disk">disk&lt;x&gt; / virtual_drive</a></h3>

  <p>Insert a disk image in a drive. Optionally apply an IPS patch to the disk image.
  The commands <code>diska</code>, <code>diskb</code> etc. are
  assigned to all available "physical" disk drives in the MSX. They might not correspond to drive names as used in
  MSX-DOS.</p>

  <p>In addition to the physical <code>disk&lt;x&gt;</code> drives, there is the <code>virtual_drive</code>. This fake drive does not correspond to any MSX hardware. It can be used as a source or target for <code><a class="internal" href="#diskmanipulator">diskmanipulator</a></code> operations just like physical drives.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>diska &lt;disk image&gt;</code></td>

      <td>Insert disk image in drive "diska"</td>
    </tr>

    <tr>
      <td><code>diska &lt;disk image&gt; &lt;ips&gt;</code></td>

      <td>Insert disk image and apply IPS patch</td>
    </tr>

    <tr>
      <td><code>diska eject</code></td>

      <td>Remove disk from drive "diska"</td>
    </tr>

    <tr>
      <td><code>diska ramdsk</code></td>

      <td>Insert scratch disk in drive "diska"</td>
    </tr>
  </table>

  <h3><a id="diskmanipulator">diskmanipulator</a></h3>

  <p>A collection of commands to manipulate (the files on) a disk image.</p>

  <p>It can be used in so many different ways, that we wrote a separate manual for it: <a class="external" href="diskmanipulator.html">Using Diskmanipulator</a>.</p>

  <h3><a id="escape_grab">escape_grab</a></h3>

  <p>Only has effect in windowed mode and when the <code><a class="internal" href="#grabinput">grabinput</a></code> setting is active. Temporarily release the input grab.
  After the openMSX window has lost and regained the focus, the grab is again effective.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>escape_grab</code></td>

      <td>Temporarily release the input grab</td>
    </tr>
  </table>

  <h3><a id="exit">exit</a></h3>

  <p>This command exits the Tcl interpreter, which leads to openMSX exiting as well.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>exit</code></td>

      <td>Exits the emulator</td>
    </tr>
  </table>

  <h3><a id="ext">ext</a></h3>

  <p>Insert an MSX extension in a running MSX machine. The extension can be removed again with the <code><a class="internal" href="#remove_extension">remove_extension</a></code>
  command. See also the commands <code><a class="internal" href="#cart">cart</a></code>, <code><a class="internal" href="#list_extensions">list_extensions</a></code> and <code><a class="internal" href="#remove_extension">remove_extension</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>ext fmpac</code></td>

      <td>Insert an FMPAC in a running MSX machine</td>
    </tr>
  </table>


  <h3><a id="findcheat">findcheat</a></h3>

  <p>This is a tool to find new cheats, for example for a certain game it can help you find the memory location where the number of remaining lives is stored. These cheats can later be added to the <code><a class="internal" href="#trainer">trainer</a></code> command.</p>

  <p>It works more or less like this:</p>
  <ol>
    <li>Initialize the <code>findcheat</code> tool (this takes an initial snapshot of the MSX memory)</li>
    <li>Perform some action in the game that changes the variable that you're interested in. For example if you want to find the memory location where the number of lives is stored, you have to loose (or gain) a life in the game.</li>
    <li>Now use the <code>findcheat</code> tool to compare the current MSX memory state with the previous memory snapshot. <code>findcheat</code> offers a lot of possibilities here, for example you can search for memory locations that became bigger or smaller or locations whose value changed or didn't change.</li>
    <li><code>findcheat</code> will show a list of memory locations that still match the search criteria.</li>
    <li>If there still are still too many matches, repeat from step 2.</li>
  </ol>

  <p>Vampier wrote a very good tutorial on how to use <code>findcheat</code>, you can find it <a class="external" href="http://www.vampier.net/forum/viewtopic.php?f=6&amp;t=34">here</a>.</p>


  <h3><a id="hd">hd&lt;x&gt;</a></h3>

  <p>Change the hard disk image. The commands <code>hda</code>, <code>hdb</code> etc. are assigned to all available hard disk drives in the MSX. They will not correspond to drive names as used in MSX-DOS.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>hda &lt;disk image&gt;</code></td>

      <td>Use hard disk image for hard disk "hda"</td>
    </tr>

    <tr>
      <td><code>hda insert &lt;disk image&gt;</code></td>

      <td>Use hard disk image for hard disk "hda"</td>
    </tr>

    <tr>
      <td><code>hda</code></td>

      <td>Show current hard disk image for hard disk "hda"</td>
    </tr>
  </table>

  <div class="note">
    Note: Because of disk caching, changing the hard disk when the MSX is running can lead to corruption of the hard disk contents. Therefore openMSX blocks the <code>hd&lt;x&gt;</code> commands unless the MSX is powered off.
  </div>

  <h3><a id="help">help</a></h3>

  <p>Shows help info for console commands.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>help</code></td>

      <td>Shows a list of all possible commands</td>
    </tr>

    <tr>
      <td><code>help &lt;command&gt;</code></td>

      <td>Shows help info for a specific command</td>
    </tr>
  </table>

  <h3><a id="incr">incr</a></h3>

  <p>Increment an integer setting.</p>

  <p>This used to be an openMSX custom command, but is now a native Tcl command.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>incr &lt;setting&gt;</code></td>

      <td>Increment the specified setting by one</td>
    </tr>

    <tr>
      <td><code>incr &lt;setting&gt; &lt;num&gt;</code></td>

      <td>Increment the specified setting by the given amount</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>incr speed</code><br />
    <code>incr renshaturbo 10</code><br />
    <code>incr scanline -5</code>
  </div>

  <h3><a id="iomap">iomap</a></h3>

  <p>Shows what I/O ports are connected to which devices. The related command <code><a class="internal" href="#slotmap">slotmap</a></code> shows a similar overview, but for memory-mapped devices.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>iomap</code></td>

      <td>Shows the I/O map of the current MSX machine</td>
    </tr>
  </table>

  <h3><a id="keymatrix">keymatrixdown / keymatrixup</a></h3>

  <p>Press or release keys in the MSX keyboard matrix. Can be used to make an external program or Tcl script press MSX keys. For some more information about the keymatrix, you could read the <a href="http://map.tni.nl/articles/keymatrix.php">article on the MAP</a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>keymatrixdown &lt;row&gt; &lt;mask&gt;</code></td>

      <td>Press the indicated MSX keys</td>
    </tr>

    <tr>
      <td><code>keymatrixup &lt;row&gt; &lt;mask&gt;</code></td>

      <td>Release the indicated MSX keys</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>keymatrixdown 6 0x01</code><br />
    <code>keymatrixup 6 0x01</code>
  </div>

  <h3><a id="list_extensions">list_extensions</a></h3>

  <p>Returns a list of inserted cartridges and extensions. These can be removed with the <code><a class="internal" href="#remove_extension">remove_extension</a></code> command or
  additional items can be added with the <code><a class="internal" href="#cart">cart</a></code> and <code><a class="internal" href="#ext">ext</a></code> commands.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>list_extensions</code></td>

      <td>Lists all currently inserted cartridges and extensions</td>
    </tr>
  </table>

  <h3><a id="load_icons">load_icons</a></h3>

  <p>Load a different icon set (used for the On Screen Display (OSD) LEDs).</p>
  <p>Icon sets are stored in the share/skins directory.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>load_icons &lt;name&gt;</code></td>

      <td>Load the given icon set, but don't change the position on the screen.</td>
    </tr>

    <tr>
      <td><code>load_icons &lt;name&gt; &lt;position&gt;</code></td>

      <td>Load the given icon set and place them at the requested position. Position can be <code>bottom</code>, <code>top</code>, <code>left</code> or <code>right</code>.</td>
    </tr>
  </table>

  <h3><a id="load_settings">load_settings</a></h3>

  <p>Load settings from a given settings XML file. The settings file does not have to be complete: settings that are not mentioned in the given file are left untouched. See also <code><a class="internal" href="#save_settings">save_settings</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>load_settings &lt;filename&gt;</code></td>

      <td>Load settings from the given file</td>
    </tr>
  </table>

  <h3><a id="machine">machine</a></h3>

  <p>Switch to a new MSX machine.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>machine</code></td>

      <td>Returns the handle for the currently active machine</td>
    </tr>

    <tr>
      <td><code>machine &lt;machine name&gt;</code></td>

      <td>Switch to the specified machine, also returns the handle for that machine</td>
    </tr>
  </table>

  <div class="note">
    Note: The machine handle mostly used for external applications controlling openMSX (see also <a class="external" href="openmsx-control.html">Controlling openMSX from External Applications</a>). For interactive use you can omit the machine handle to have the commands operate on the current machine.
  </div>


  <h3><a id="machines">create_machine / load_machine / activate_machine / list_machines / delete_machine</a></h3>

  <p>openMSX has the possibility to have multiple MSX machines concurrently in memory. This is more or less like multiple tabs in a web browser: you only work with one at-a-time, but you can have multiple open at the same time and easily switch between them. These commands are low level commands to manage this.</p>

  <p>Some commands are specific per machine, for example if you insert a disk image into the disk drive of the emulated MSX machine and if you have multiple MSX machines, you need to specify in which MSX machine you want to insert the disk. To solve this, we introduced the concept of the 'active' MSX machine (this is also the machine that is visible and audible). All unqualified machine-specific command will act on the active machine. If you want to execute the command in a specific machine, you can qualify the command with a machineID prefix.</p>

  <table>
    <tr>
      <td><code>diska &lt;diskimage&gt;</code></td>
      <td>execute diska command in the active machine</td>
    </tr>
    <tr>
      <td><code>&lt;machine-ID&gt;::diska &lt;diskimage&gt;</code></td>
      <td>execute diska command in the specified machine</td>
    </tr>
  </table>

  <h4><code>create_machine</code>:</h4>
  <p>This command returns a new machine-id. This machine-id can be used in the following commands. In the web browser analogy this command would open a new empty tab.</p>

  <h4><code>load_machine</code>:</h4>
  <p>This command loads a machine configuration (= MSX model) into the given machine-ID.
  In the web browser analogy, this command would load a page in a previously created empty tab. And unlike a web browser, where you can load a different page in the same tab, you cannot load a different machine configuration in the same machine-ID.</p>

  <h4><code>activate_machine</code>:</h4>
  <p>This command activates the given machine-ID. At any time there can only be one active machine-ID. This is analogue to switching tabs in a web browser.</p>

  <h4><code>list_machines</code>:</h4>
  <p>Returns a list of all currently existing machine-IDs.</p>

  <h4><code>delete_machine</code>:</h4>
  <p>Deletes the given machine-ID. This is analogue to closing a tab in a web browser.</p>

  <h4>examples:</h4>
  <table>
    <tr>
      <td><code>set oldID [machineID]</code></td>
      <td>get the current machineID</td>
    </tr>
    <tr>
      <td><code>set newID [create_machine]</code></td>
      <td>create a new machineID</td>
    </tr>
    <tr>
      <td><code>$newID::load_machine Philips_NMS_8250</code></td>
      <td>load an MSX2 configuration in that new machineID</td>
    </tr>
    <tr>
      <td><code>activate_machine $newID</code></td>
      <td>switch to the new machine</td>
    </tr>
    <tr>
      <td><code>activate_machine $oldID</code></td>
      <td>switch back to old machine</td>
    </tr>
    <tr>
      <td><code>delete_machine $newID</code></td>
      <td>delete new machine</td>
    </tr>
  </table>

  <div class="note">
    If you don't care about multiple active machines, the <code><a class="internal" href="#machine">machine</a></code> command is much more convenient to switch to a different MSX configuration.
  </div>


  <h3><a id="machine_info">machine_info</a></h3>

  <p>Shows information about a certain topic. This command is similar to the <code><a class="internal" href="#openmsx_info">openmsx_info</a></code> command. The topics of
  <code>machine_info</code> are all machine specific, while the topics of <code><a class="internal" href="#openmsx_info">openmsx_info</a></code> are generic.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>machine_info</code></td>

      <td>Shows a list of all possible topics</td>
    </tr>

    <tr>
      <td><code>machine_info &lt;topic&gt;</code></td>

      <td>Shows info on the given topic</td>
    </tr>
  </table>

  <h3><a id="monitor_type">monitor_type</a></h3>

  <p>Select a monitor color profile.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>monitor_type</code></td>

      <td>Shows the currently selected color profile</td>
    </tr>

    <tr>
      <td><code>monitor_type -list</code></td>

      <td>Lists all available color profiles</td>
    </tr>

    <tr>
      <td><code>monitor_type &lt;profile&gt;</code></td>

      <td>Selects a new color profile</td>
    </tr>
  </table>

  <div class="note">
    Note: This command is a convenience wrapper around the <code><a class="internal" href="#color_matrix">color_matrix</a></code> setting.
  </div>

  <h3><a id="mute_channels">mute_channels / unmute_channels / solo</a></h3>

  <p>Mute or unmute specific individual channels of sound devices. The syntax is very similar to the <code><a class="internal" href="#record_channels">record_channels</a></code> command.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>mute_channels &lt;device&gt; [&lt;channels&gt;]] [&lt;device&gt; [&lt;channels&gt;]]</code></td>

      <td>Mute the specified channels of the specified device(s). If a device is given but no specific channels are specified, all channels of that device are muted. If no arguments are given at all, this command return a list of all currently muted channels.</td>
    </tr>

    <tr>
      <td><code>unmute_channels &lt;device&gt; [&lt;channels&gt;]] [&lt;device&gt; [&lt;channels&gt;]]</code></td>

      <td>Unmute the specified channels of the specified device(s). If a device is given but no specific channels are specified, all channels of that device are unmuted. If no arguments are given at all, this command unmutes all channels of all devices. </td>
    </tr>
    <tr>
      <td><code>solo &lt;device&gt; [&lt;channels&gt;]] [&lt;device&gt; [&lt;channels&gt;]]</code></td>

      <td>Mute all channels of all devices except for the specified channels.</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>mute_channels</code><br />
    <code>mute_channels PSG</code><br />
    <code>mute_channels SCC 2,4</code><br />
    <code>unmute_channels</code><br />
    <code>unmute_channels PSG 1 SCC 1,3-4</code><br />
    <code>solo PSG 3</code>
  </div>


  <h3><a id="openmsx_info">openmsx_info</a></h3>

  <p>Shows information about a certain topic. For machine-specific topics, use the related command <code><a class="internal" href="#machine_info">machine_info</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>openmsx_info</code></td>

      <td>Shows a list of all possible topics</td>
    </tr>

    <tr>
      <td><code>openmsx_info &lt;topic&gt;</code></td>

      <td>Shows info on the given topic</td>
    </tr>
  </table>


  <h3><a id="osd">osd</a></h3>

  <p>openMSX has the possibility to show OSD (on screen display) elements. For example, the LEDs and the fps-indicator are implemented via OSD elements. This command allows to create new OSD elements, configure existing elements or delete elements.</p>

  <p>This command is only useful if you plan to adjust or enhance the openMSX OSD, or create your own OSD widgets.</p>

  <!-- do we really have to repeat the help text from the openmsx source code here? -->

  <p>Execute "<code>help osd</code>" to get a detailed description of this command, which we will not repeat here.</p>

  <h3><a id="palette">palette</a></h3>

  <p>Shows the current VDP palette settings.  Related command: <code><a class="internal" href="#vdpregs">vdpregs</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>palette</code></td>

      <td>Show the currently active color palette</td>
    </tr>
  </table>

  <h3><a id="plugunplug">plug / unplug</a></h3>

  <p>Plugs or unplugs a plug into a connector, for example plug a virtual joystick into a virtual joystick port.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>plug</code></td>

      <td>Shows all currently connected plugs</td>
    </tr>

    <tr>
      <td><code>plug &lt;connector&gt;</code></td>

      <td>Shows currently connected plug for the specified connector</td>
    </tr>

    <tr>
      <td><code>plug &lt;connector&gt; &lt;plug&gt;</code></td>

      <td>Plugs the specified plug into the specified connector</td>
    </tr>

    <tr>
      <td><code>unplug &lt;connector&gt;</code></td>

      <td>Unplugs the plug connected to the specified connector</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>plug cassetteport cassetteplayer</code><br />
    <code>plug joyporta mouse</code><br />
    <code>plug printerport logger</code><br />
    <code>unplug joyportb</code><br />
  </div>

  <h3><a id="psg_profile">psg_profile</a></h3>

  <p>Select a PSG sound profile.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>psg_profile</code></td>

      <td>Shows the currently selected sound profile</td>
    </tr>

    <tr>
      <td><code>psg_profile -list</code></td>

      <td>Lists all available sound profiles</td>
    </tr>

    <tr>
      <td><code>psg_profile &lt;profile&gt;</code></td>

      <td>Selects a new sound profile</td>
    </tr>
  </table>

  <div class="note">
    Note: This command is a convenience wrapper around the <code><a class="internal" href="#soundchip_vibrato_frequency">PSG_vibrato_frequency</a></code>, <code><a class="internal" href="#soundchip_vibrato_percent">PSG_vibrato_percent</a></code>, <code><a class="internal" href="#soundchip_detune_frequency">PSG_detune_frequency</a></code> and <code><a class="internal" href="#soundchip_detune_percent">PSG_detune_percent</a></code> settings.
  </div>

  <h3><a id="record">record</a></h3>

  <p>Controls video recording: write openMSX audio/video to an AVI file.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>record start</code></td>

      <td>Record to file "openmsxNNNN.avi"</td>
    </tr>

    <tr>
      <td><code>record start &lt;filename&gt;</code></td>

      <td>Record to indicated file</td>
    </tr>

    <tr>
      <td><code>record start -prefix foo</code></td>

      <td>Record to file "fooNNNN.avi"</td>
    </tr>

    <tr>
      <td><code>record stop</code></td>

      <td>Stop recording</td>
    </tr>

    <tr>
      <td><code>record toggle</code></td>

      <td>Toggle recording</td>
    </tr>
  </table>

  <p>The <code>start</code> subcommand also accepts an optional <code>-audioonly</code>, <code>-videoonly</code> and a <code>-doublesize</code> flag. Videos are recorded in a 320&times;240 size by default and at 640&times;480 when the <code>-doublesize</code> flag is used.
  If only audio is recorded, the created file will be a WAV file instead of an AVI file.
  The <code><a class="internal" href="#soundlog">soundlog</a></code> command is a shorthand for <code>record -audioonly</code>.</p>

  <h3><a id="record_channels">record_channels</a></h3>

  <p>A high level command to record individual channels of sound chips to separate files. In the following variants of the command you can specify devices and channels. Multiple devices can be specified and multiple channels as well. If you want to specify channels of a device, put them right after the device.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>record_channels [start] &lt;device&gt; [&lt;channels&gt;] [&lt;device&gt; [&lt;channels&gt;]]</code></td>

      <td>Start recording the specified channel(s) of the specified device(s). If no channels are given, all channels of the device are recorded. </td>
    </tr>

    <tr>
      <td><code>record_channels stop [&lt;device&gt; [&lt;channels&gt;]] [&lt;device&gt; [&lt;channels&gt;]]</code></td>

      <td>Stop recording the specified channel(s) of the specified device(s). If no channels are given, recording for all channels is stopped for the given device(s). If no devices are given, all channel recording is stopped.</td>
    </tr>

    <tr>
      <td><code>record_channels list</code></td>

      <td>Lists which channels of which sound chips are currently being recorded.</td>
    </tr>

  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>record_channels start PSG</code><br />
    <code>record_channels PSG</code><br />
    <code>record_channels SCC 1,4-5</code><br />
    <code>record_channels SCC PSG 1</code><br />
    <code>record_channels "MSX Music" 7-9 SCC 3,5 PSG 2</code><br />
    <code>record_channels stop</code><br />
    <code>record_channels stop PSG</code><br />
    <code>record_channels stop SCC 3,5</code><br />
    <code>record_channels list</code>
  </div>

<h3><a id="remove_extension">remove_extension</a></h3>

  <p>Remove a cartridge or extension from a running MSX machine. See also the commands <code><a class="internal" href="#cart">cart</a></code>, <code><a class="internal" href="#ext">ext</a></code>, <code><a class="internal" href="#list_extensions">list_extensions</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>remove_extension fmpac</code></td>

      <td>Removes the FMPAC extension from the running MSX</td>
    </tr>
  </table>

  <h3><a id="reset">reset</a></h3>

  <p>Emulates the pressing of the reset button on the MSX. This sends a reset pulse to all devices, but does not erase memory contents.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>reset</code></td>

      <td>Resets the current machine</td>
    </tr>
  </table>

  <h3><a id="save_settings">save_settings</a></h3>

  <p>Write the current openMSX settings to a settings XML file. See also <code><a class="internal" href="#load_settings">load_settings</a></code>.</p>

  <p>If you disabled <code><a class="internal" href="#save_settings_on_exit">save_settings_on_exit</a></code>, you can use this command to save your preferences.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>save_settings</code></td>

      <td>Save settings to the default settings file</td>
    </tr>

    <tr>
      <td><code>save_settings &lt;filename&gt;</code></td>

      <td>Save settings to the given file</td>
    </tr>
  </table>


  <h3><a id="savestate">savestate / loadstate / list_savestates / delete_savestate</a></h3>

  <p>These command can be used to manage savestates. These are much easier to use than the lowlevel <code><a class="internal" href="#store_machine">store_machine</a></code> and <code><a class="internal" href="#store_machine">restore_machine</a></code> commands.</p>

  <h4><code>savestate [&lt;name&gt;]</code></h4>
  <p>This creates a snapshot of the currently emulated MSX machine. Optionally you can specify a name for the savestate, if you omit this name, the default name <code>quicksave</code> will be taken.</p>

  <h4><code>loadstate [&lt;name&gt;]</code></h4>
  <p>This restores a previously created savestate. Like above you can specify a name which defaults to <code>quicksave</code> if omitted.</p>

  <h4><code>list_savestates</code></h4>
  <p>This returns the names of all previously created savestates.</p>

  <h4><code>delete_savestate &lt;name&gt;</code></h4>
  <p>Delete a previously created savestate.</p>


  <h3><a id="screenshot">screenshot</a></h3>

  <p>Take a screenshot of the openMSX screen. By default this includes the console and icons if those are visible when the screenshot is taken. The screenshots are PNG files and (by default) are saved in the <code>screenshots</code> subdirectory of the openMSX data directory in your home directory.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td>
        <code>screenshot [-msxonly [-doublesize]] [-prefix &lt;prefix&gt;] [&lt;filename&gt;]</code>
      </td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <table>
    <tr>
      <td><code>screenshot</code></td>
      <td>Write screenshot to file "openmsxNNNN.png"</td>
    </tr>

    <tr>
      <td><code>screenshot &lt;filename&gt;</code></td>
      <td>Write screenshot to indicated file</td>
    </tr>

    <tr>
      <td><code>screenshot -prefix foo</code></td>
      <td>Write screenshot to file "fooNNNN.png"</td>
    </tr>

    <tr>
      <td><code>screenshot -msxonly</code></td>
      <td>Create screenshot of the MSX screen only (so no icons or console)</td>
    </tr>

    <tr>
      <td><code>screenshot -msxonly -doublesize</code></td>
      <td>Create screenshot of the MSX screen only, with resolution 640&times;480</td>
    </tr>
  </table>

  <h3><a id="set">set</a></h3>

  <p>Change or query the value of various settings. See also: <code><a class="internal" href="#unset">unset</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;setting&gt;</code></td>

      <td>Query the current value of the specified setting</td>
    </tr>

    <tr>
      <td><code>set &lt;setting&gt; &lt;value&gt;</code></td>

      <td>Change the specified setting to the given value</td>
    </tr>
  </table>

  <p>The settings that can be adjusted with this command are listed and explained at the end of this document.</p>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set accuracy pixel</code><br />
    <code>set blur 25</code><br />
    <code>set scanline 20</code><br />
    <code>set deinterlace on</code><br />
  </div>

  <h3><a id="slotmap">slotmap</a></h3>

  <p>Shows what devices are inserted into which slots. The related command <code><a class="internal" href="#iomap">iomap</a></code> shows a similar overview, but for I/O mapped devices.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>slotmap</code></td>

      <td>Shows the slot map of the current MSX machine</td>
    </tr>
  </table>

  <h3><a id="slotselect">slotselect</a></h3>

  <p>Shows the currently selected slots. To see what devices are located in the slots, use the <code><a class="internal" href="#slotmap">slotmap</a></code> command.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>slotselect</code></td>

      <td>Shows the currently selected slot for each page</td>
    </tr>
  </table>

  <h3><a id="soundlog">soundlog</a></h3>

  <p>Controls sound logging: writing the openMSX sound to a WAV file.</p>

  <p>This command is a shorthand for <code><a class="internal" href="#record">record</a> -audioonly</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>soundlog start</code></td>

      <td>Log sound to file "openmsxNNNN.wav"</td>
    </tr>

    <tr>
      <td><code>soundlog start &lt;filename&gt;</code></td>

      <td>Log sound to indicated file</td>
    </tr>

    <tr>
      <td><code>soundlog start -prefix foo</code></td>

      <td>Log sound to file "fooNNNN.wav"</td>
    </tr>

    <tr>
      <td><code>soundlog stop</code></td>

      <td>Stop logging sound</td>
    </tr>

    <tr>
      <td><code>soundlog toggle</code></td>

      <td>Toggle sound logging state</td>
    </tr>
  </table>


  <h3><a id="store_machine">store_machine / restore_machine</a></h3>

  <p>These are low-level commands, used to implement savestates.</p>

  <h4><code>store_machine</code>:</h4>
  <p>Saves the state of the specified machine to a file.</p>

  <table>
    <tr>
      <td><code>store_machine</code></td>
      <td>Save state of current machine to file "openmsxNNNN.xml.gz"</td>
    </tr>
    <tr>
      <td><code>store_machine &lt;machineID&gt;</code></td>
      <td>Save state of indicated machine to file "openmsxNNNN.xml.gz"</td>
    </tr>
    <tr>
      <td><code>store_machine &lt;machineID&gt; &lt;filename&gt;</code></td>
      <td>Save state of indicated machine to specified file</td>
    </tr>
  </table>

  <h4><code>restore_machine</code>:</h4>
  <p>Load a previously saved machine in a new machine-ID, next to the already available machines. See the section on <code><a class="internal" href="#machines">activate_machine</a></code>.</p>

  <table>
    <tr>
      <td><code>restore_machine</code></td>
      <td>Load state from last saved state in default directory</td>
    </tr>
    <tr>
      <td><code>restore_machine &lt;filename&gt;</code></td>
      <td>Load state from indicated file</td>
    </tr>
  </table>

  <div class="note">
    Note: These commands are pretty low level. The <code><a class="internal" href="#savestate">savestate</a></code> and <code><a class="internal" href="#savestate">loadstate</a></code> scripts are build on top of this and are much more convenient to use.
  </div>


  <h3><a id="test_machine">test_machine</a></h3>

  <p>Test whether the given MSX machine configuration works. For example whether you have all required system-roms for this machine. See also <code><a class="internal" href="#machines">load_machine</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>
  <table>
    <tr>
      <td><code>test_machine &lt;machine-config&gt;</code></td>
      <td>Test whether the given machine configuration is OK.</td>
    </tr>
  </table>


  <h3><a id="toggle">toggle</a></h3>

  <p>Toggles any boolean (on/off) setting: if it was on, it will be turned off and vice versa.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>toggle &lt;setting&gt;</code></td>

      <td>Toggles the specified setting</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>toggle mute</code><br />
    <code>toggle throttle</code>
  </div>

  <h3><a id="trainer">trainer</a></h3>

  <p>Control game trainers. You can enable or disable individual cheats of each trainer. Make use of the TAB key to see
  what is available. When switching trainers, the currently active trainer will be deactivated.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>trainer</code></td>

      <td>See which trainer is currently active</td>
    </tr>

    <tr>
      <td><code>trainer &lt;game&gt;</code></td>

      <td>See which cheats are currently active in the trainer</td>
    </tr>

    <tr>
      <td><code>trainer &lt;game&gt; all</code></td>

      <td>Activate all cheats in the trainer of &lt;game&gt;</td>
    </tr>

    <tr>
      <td><code>trainer &lt;game&gt; \[&lt;cheat&gt; ..\]</code></td>

      <td>Toggle cheats of &lt;game&gt; on/off</td>
    </tr>

    <tr>
      <td><code>trainer deactivate</code></td>

      <td>Deactivate all trainers</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>trainer Frogger all</code><br />
    <code>trainer Circus\ Charlie 1 2</code><br />
    <code>trainer Pippols lives \"jump shoes\"\</code>
  </div>

  <h3><a id="type">type</a></h3>

  <p>Type a string in the emulated MSX. This command automatically presses and releases keys in the simulated MSX
  keyboard matrix. This command is useful for demoing and for automating tasks in MSX-BASIC.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>type "Hello world!"</code></td>

      <td>Yet another manifestation of the most famous program</td>
    </tr>
  </table>

  <h3><a id="unset">unset</a></h3>

  <p>Undefines a Tcl variable. When used on openMSX settings, they are reverted to their default value. See also: <code><a class="internal" href="#set">set</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>unset &lt;variable&gt;</code></td>

      <td>Undefines the given variable</td>
    </tr>

    <tr>
      <td><code>unset &lt;setting&gt;</code></td>

      <td>Reverts the given setting to its default value</td>
    </tr>
  </table>

  <h3><a id="update">update</a></h3>

  <p>Enable or disable update notifications of a certain type. This command is intended for external programs controlling openMSX. More about this in <a class="external" href="openmsx-control.html">Controlling openMSX from External Applications</a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>update enable &lt;type&gt;</code></td>

      <td>enable notifications for this type</td>
    </tr>

    <tr>
      <td><code>update disable &lt;type&gt;</code></td>

      <td>disable notifications for this type</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>update enable led</code><br />
    <code>update disable setting</code>
  </div>


  <h3><a id="user_setting">user_setting</a></h3>
  <p>This command is only meant to be used in Tcl scripts. It allows to create Tcl variables that act very much like built-in openMSX settings. They have a description (can be queried with "<code>help set &lt;setting-name&gt;</code>") and their value is stored saved/restored when openMSX is quit/restarted.</p>

  <!-- do we really have to repeat the help text from the openmsx source code here? -->

  <p>Execute "<code>help user_setting</code>" to get a detailed description of this command.</p>


  <h3><a id="vdpregs">vdpregs</a></h3>

  <p>Shows the current register settings of the Video Display Processor (VDP). Related command: <code><a class="internal" href="#palette">palette</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>vdpregs</code></td>

      <td>Shows the current VDP control register contents</td>
    </tr>
  </table>


  <h3><a id="other">other</a></h3>

  <p>Most commands described above are generally useful. openMSX also has a bunch of other more specialized commands. Some of these are intended for programmers who code MSX programs using openMSX as a tool. Other of these commands are more like toys or examples that show the openMSX scripting capabilities.</p>

  <p>We've only listed a very brief overview of these command. As always execute "<code>help &lt;command-name&gt;</code>" to get a more detailed description of the command.</p>

  <table>
    <tr>
      <td><code>about</code></td>
      <td>Search command help-texts for given keyword</td>
    </tr>
    <tr>
      <td><code>cpuregs</code></td>
      <td>Gives overview of the CPU registers</td>
    </tr>
    <tr>
      <td><code>data_file</code></td>
      <td>Helps locate openMSX data files</td>
    </tr>
    <tr>
      <td><code>disasm</code></td>
      <td>Print disassembled instructions at given memory location</td>
    </tr>
    <tr>
      <td><code>getcolor</code></td>
      <td>Query V99x8 palette settings</td>
    </tr>
    <tr>
      <td><code>getScreen</code></td>
      <td>Capture the content of a MSX text screen in a Tcl string</td>
    </tr>
    <tr>
      <td><code>get_selected_slot</code></td>
      <td>Returns the selected slot for the given memory page</td>
    </tr>
    <tr>
      <td><code>guess_title</code></td>
      <td>Use heuristics to guess the title of the current game (cartridge or disk)</td>
    </tr>
    <tr>
      <td><code>listing</code></td>
      <td>Reimplementation of the BASIC LIST command in Tcl</td>
    </tr>
    <tr>
      <td><code>load_debuggable</code></td>
      <td>Write the content of a file to a openMSX debuggable</td>
    </tr>
    <tr>
      <td><code>multi_screenshot</code></td>
      <td>Take screenshots of multiple successive frames</td>
    </tr>
    <tr>
      <td><code>pc_in_slot</code></td>
      <td>Check whether CPU is executing from the specified slot (useful as breakpoint condition)</td>
    </tr>
    <tr>
      <td><code>peek</code></td>
      <td>Read a byte from given memory location</td>
    </tr>
    <tr>
      <td><code>peek16</code></td>
      <td>Read a 16 bit word from given memory location</td>
    </tr>
    <tr>
      <td><code>poke</code></td>
      <td>Write a byte to given memory location</td>
    </tr>
    <tr>
      <td><code>poke16</code></td>
      <td>Write a 16 bit word to given memory location</td>
    </tr>
    <tr>
      <td><code>psg_log</code></td>
      <td>Log or replay PSG register values in binary format</td>
    </tr>
    <tr>
      <td><code>reg</code></td>
      <td>Read or write CPU registers</td>
    </tr>
    <tr>
      <td><code>reg_log</code></td>
      <td>Log or replay register values for the specified debuggable in ASCII format</td>
    </tr>
    <tr>
      <td><code>run_to</code></td>
      <td>Execute instructions until PC reaches specified address</td>
    </tr>
    <tr>
      <td><code>save_debuggable</code></td>
      <td>Save the content of a debuggable to a file</td>
    </tr>
    <tr>
      <td><code>setcolor</code></td>
      <td>Change V99x8 palette settings</td>
    </tr>
    <tr>
      <td><code>set_help_text</code></td>
      <td>Associate help text with a Tcl proc</td>
    </tr>
    <tr>
      <td><code>set_tabcompletion_proc</code></td>
      <td>Associate tab completion with a Tcl proc</td>
    </tr>
    <tr>
      <td><code>showdebuggable</code></td>
      <td>Print the content of a debuggable in a table</td>
    </tr>
    <tr>
      <td><code>showmem</code></td>
      <td>Print the content of memory in a table</td>
    </tr>
    <tr>
      <td><code>show_osd</code></td>
      <td>Print an overview of the defined OSD elements</td>
    </tr>
    <tr>
      <td><code>stack</code></td>
      <td>Print the top of the CPU stack</td>
    </tr>
    <tr>
      <td><code>step_in</code></td>
      <td>Execute one CPU instruction, go into subroutines</td>
    </tr>
    <tr>
      <td><code>step_over</code></td>
      <td>Execute one CPU instruction, but don't go into subroutines</td>
    </tr>
    <tr>
      <td><code>text_echo</code></td>
      <td>Echo all printed MSX text on stderr</td>
    </tr>
    <tr>
      <td><code>toggle_fps</code></td>
      <td>Show a fps indicator</td>
    </tr>
    <tr>
      <td><code>toggle_freq</code></td>
      <td>Switch between PAL/NTSC</td>
    </tr>
    <tr>
      <td><code>umrcallback</code></td>
      <td>Example proc to use with the umr_callback setting</td>
    </tr>
    <tr>
      <td><code>v9990reg</code></td>
      <td>Read or write a V9990 register</td>
    </tr>
    <tr>
      <td><code>v9990regs</code></td>
      <td>Print an overview of all V9990 registers</td>
    </tr>
    <tr>
      <td><code>vdpreg</code></td>
      <td>Read or write a V99x8 register</td>
    </tr>
    <tr>
      <td><code>vdrive</code></td>
      <td>Easily switch disks in multi-disk games</td>
    </tr>
  </table>

  <p>The source code of all these scripts is located in <code>share/scripts</code> directory. Feel free to inspect these scripts and modify them to suit your needs.</p>


  <h2><a id="old_commands">Old Commands</a></h2>

  <p>The following commands existed in older openMSX versions. For backwards compatibility they are still supported for
  a while. In later versions they will be removed.</p>

  <h3><a id="aliasunalias">alias / unalias</a></h3>

  <p>Create a new command that is an alias for another (group of) command(s).</p>

  <p>It is better to use the more powerful Tcl <code>proc</code> command.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>alias &lt;name&gt; &lt;command&gt;</code></td>

      <td>Defines an alias</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>alias gl "set renderer SDLGL"</code><br />
    <code>alias restart "set power off ; set power on"</code>
  </div>

  <div class="note">
    Note: The backwards compatibility implementation of the <code>alias</code> command is not 100% compatible with the old <code>alias</code> command. It is recommended that you update your scripts to use the Tcl <code>proc</code> command.
  </div>

  <h3><a id="decr">decr</a></h3>

  <p>Decrement an integer setting.</p>

  <p>This command is deprecated, please use the <code><a class="internal" href="#incr">incr</a></code> command with a negative offset instead.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>decr &lt;setting&gt;</code></td>

      <td>Decrement the specified setting by one</td>
    </tr>

    <tr>
      <td><code>decr &lt;setting&gt; &lt;num&gt;</code></td>

      <td>Decrement the specified setting by the given amount</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>decr speed</code><br />
    <code>decr renshaturbo 10</code>
  </div>

  <h3><a id="quit">quit</a></h3>

  <p>Quits the emulator.</p>

  <p>Please use <code><a class="internal" href="#exit">exit</a></code> instead.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>quit</code></td>

      <td>Exits openMSX</td>
    </tr>
  </table>

  <h3><a id="restoredefault">restoredefault</a></h3>

  <p>Restore the default value for a setting.</p>

  <p>This command is deprecated, please use <code><a class="internal" href="#unset">unset</a> &lt;setting&gt;</code> instead.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>restoredefault &lt;setting&gt;</code></td>

      <td>Restores the default value for the given setting</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>restoredefault PSG_volume</code>
  </div>

  <h2><a id="settings">Settings</a></h2>

  <p>Settings control many aspects of openMSX. Below, the available settings are listed and described. You can change setting values with the <code><a class="internal" href="#set">set</a></code> command.</p>

  <h3><a id="accuracy">accuracy</a></h3>

  <p>Sets the render accuracy. openMSX supports three levels of render accuracy:</p>

  <dl>
    <dt>screen accurate:</dt>
    <dd>Changes in VDP state become effective only once per video frame. Works well for most MSX1 software, but will break a lot of MSX2 software (anything that does so-called raster effects).</dd>

    <dt>line accurate:</dt>
    <dd>Changes in VDP state become effective only once per display line. Works well for almost all software.</dd>

    <dt>pixel accurate:</dt>
    <dd>Changes in VDP state become effective immediately. In this mode even the 'Unknown Reality scope part' is rendered correctly.</dd>
  </dl>

  <p>In some cases switching to a lower accuracy level can speed up emulation, but in many cases the speed difference is negligible.</p>

  <p>The default is pixel accuracy, since this is the most realistic. If the software you are running shows a jittery screen split and you would prefer a stable screen split, switching to line accuracy can help.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set accuracy</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set accuracy screen</code></td>

      <td>Selects screen accurate rendering</td>
    </tr>

    <tr>
      <td><code>set accuracy line</code></td>

      <td>Selects line accurate rendering</td>
    </tr>

    <tr>
      <td><code>set accuracy pixel</code></td>

      <td>Selects pixel accurate rendering</td>
    </tr>
  </table>

  <h3><a id="audio-inputfilename">audio-inputfilename</a></h3>

  <p>Sets the audio file from which the wave input is read for the sampler.</p>

  <p>By default, it is read from "audio-input.wav" when available.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set audio-inputfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set audio-inputfilename mysample.wav</code></td>

      <td>Read from "mysample.wav"</td>
    </tr>
  </table>

  <div class="note">
    Note: The file is fully read into memory, so under Linux/UNIX do not attempt to read from a device node such as <code>/dev/dsp</code>.
  </div>

  <h3><a id="autoruncassettes">autoruncassettes</a></h3>

  <p>Switches the "auto-run cassettes" feature on or off. When it's enabled, openMSX will try to type the proper loading
  instruction when a cassette is inserted.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set autoruncassettes</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set autoruncassettes on</code></td>

      <td>Try to run cassettes automatically</td>
    </tr>

    <tr>
      <td><code>set autoruncassettes off</code></td>

      <td>Do nothing when cassettes are inserted</td>
    </tr>
  </table>

  <div class="note">
    Note: This only works with CAS images for now and it is still an experimental feature.
  </div>

  <h3><a id="blur">blur</a></h3>

  <p>Sets the amount of horizontal blur effect. A value of 0 turns off blur, while 100 selects maximum blur.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set blur</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set blur &lt;value&gt;</code></td>

      <td>Change the value</td>
    </tr>
  </table>

  <div class="note">
    Note: this setting may be overridden by scaling algorithms.
  </div>

  <h3><a id="bootsector">bootsector</a></h3>

  <p>Sets the boot sector type for DirAsDSK. Default: DOS2. Only relevant on turboR, because it boots differently
  depending on the type of boot sector on the disk in drive A.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set bootsector</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set bootsector DOS1</code></td>

      <td>Use a DOS1 boot sector</td>
    </tr>
  </table>

  <h3><a id="brightness">brightness</a></h3>

  <p>Controls the brightness of the video output. Can be between -100 and 100. Lower values are darker, higher values are brighter. The default is 0, which is neutral. This setting shifts the brightness of all colors, including black and white, while the <code><a class="internal" href="#gamma">gamma</a></code> setting changes the relative brightness of colors but does not change black and white.</p>

  <p>The section about the <code><a class="internal" href="#noise">noise</a></code> setting describes a typical way of using <code>brightness</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set brightness</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set brightness 5</code></td>

      <td>Make the video output a bit brighter than default</td>
    </tr>
  </table>

  <h3><a id="cmdtiming">cmdtiming</a></h3>

  <p>Controls VDP command execution timing.</p>

  <p>This is useful for debugging and for speeding up games where the command engine performance is a bottleneck.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set cmdtiming</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set cmdtiming broken</code></td>

      <td>Make VDP commands finish instantly</td>
    </tr>

    <tr>
      <td><code>set cmdtiming real</code></td>

      <td>Make VDP commands take a realistic amount of time</td>
    </tr>
  </table>

  <div class="note">
    Note: When set to <code>broken</code> the emulated MSX acts different from a real MSX. This might cause some software to fail.
  </div>

  <h3><a id="color_matrix">color_matrix</a></h3>

  <p>This setting represents a 3&times;3 matrix that is used to transform MSX RGB colors to host RGB colors. This setting can
  be used to generate all kind of color schemes, see <code>scripts/monitor.tcl</code> for examples.</p>

  <p>To get the following color transformation:</p>
  <pre>
        | a b c |   | Rm |   | Rh |
        | d e f | &times; | Gm | = | Gh |
        | g h i |   | Bm |   | Bh |
  </pre>
  <p>Use this command:</p>
  <pre>
        set color_matrix { { a b c } { d e f } { g h i } }
  </pre>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set color_matrix</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set color_matrix { { 1 0 0 } { 0 1 0 } { 0 0 1 } }</code></td>

      <td>This is the default (no color transformation)</td>
    </tr>

    <tr>
      <td><code>set color_matrix { { .33 .33 .33 } { .33 .33 .33 } { .33 .33 .33 } }</code></td>

      <td>Transform to grey scale</td>
    </tr>
  </table>

  <div class="note">
    Note: It is often more convenient to use the <code><a class="internal" href="#monitor_type">monitor_type</a></code> command.
  </div>

  <h3><a id="console">console</a></h3>

  <p>Turns the openMSX on-screen console on or off.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set console</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set console on</code></td>

      <td>Turns the console on</td>
    </tr>

    <tr>
      <td><code>set console off</code></td>

      <td>Turns the console off</td>
    </tr>
  </table>

  <h3><a id="consolebackground">consolebackground</a></h3>

  <p>Change the console background image. Images in the PNG format are certainly supported, other image formats such as JPEG and GIF might be supported depending on how your openMSX was compiled (more accurately, how SDL_image was compiled). Some renderers (OpenGL) can use an alpha channel, this channel is only present in PNG images.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set consolebackground</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set consolebackground &lt;image&gt;</code></td>

      <td>Sets a new background image</td>
    </tr>
  </table>

  <h3><a id="consolecolumns">consolecolumns</a></h3>

  <p>Change the width of the console measured by the number of columns.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set consolecolumns</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set consolecolumns &lt;value&gt;</code></td>

      <td>Set the specified width</td>
    </tr>
  </table>

  <h3><a id="consolefont">consolefont</a></h3>

  <p>Change the console font. Images in the PNG format are certainly supported, other image formats such as JPEG and GIF might be supported depending on how your openMSX was compiled (more accurately, how SDL_image was compiled). The image must contain a 16&times;16 matrix with the characters in ASCII order. Some renderers (OpenGL) require an alpha channel to have transparency in the font, this channel is only present in PNG images.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set consolefont</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set consolefont &lt;image&gt;</code></td>

      <td>Sets a new font</td>
    </tr>
  </table>

  <h3><a id="consoleplacement">consoleplacement</a></h3>

  <p>Changes the position of the console on the emulator screen.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set consoleplacement</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set consoleplacement &lt;place&gt;</code></td>

      <td>Moves the console to the specified location; <code>&lt;place&gt;</code> can be <code>topleft</code>, <code>top</code>, <code>topright</code>, <code>left</code>, <code>center</code>, <code>right</code>, <code>bottomleft</code>, <code>bottom</code> or <code>bottomright</code>.</td>
    </tr>
  </table>

  <h3><a id="consolerows">consolerows</a></h3>

  <p>Change the height of the console measured by the number of rows.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set consolerows</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set consolerows &lt;value&gt;</code></td>

      <td>Set the specified width</td>
    </tr>
  </table>

  <h3><a id="contrast">contrast</a></h3>

  <p>Controls the contrast of the video output. Can be between -100 and 100. Lower values are less contrast, higher values are more contrast. The default is 0, which is neutral.</p>

  <p>The section about the <code><a class="internal" href="#noise">noise</a></code> setting describes a typical way of using <code>contrast</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set contrast</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set contrast -5</code></td>

      <td>Reduce the video contrast a bit</td>
    </tr>
  </table>

  <h3><a id="cputrace">cputrace</a></h3>

  <p>Enable/disable CPU instruction tracing. When enabled, the state of the CPU (Z80/R800) is printed on stdout after every instruction. This creates a lot of output and slows down emulation considerably, but it can be very useful for debugging.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set cputrace</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set cputrace on</code></td>

      <td>Enables CPU tracing</td>
    </tr>

    <tr>
      <td><code>set cputrace off</code></td>

      <td>Disables CPU tracing</td>
    </tr>
  </table>

  <h3><a id="debugoutput">debugoutput</a></h3>

  <p>Selects the file to where the output from the debug device goes.</p>

  <p>The User's Manual <a class="external" href="user.html#debugdevice">describes the debug device</a> in more detail.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set debugoutput</code></td>

      <td>Shows the current output file name</td>
    </tr>

    <tr>
      <td><code>set debugoutput stdout</code></td>

      <td>Writes debug output to openMSX's standard output stream</td>
    </tr>

    <tr>
      <td><code>set debugoutput stderr</code></td>

      <td>Writes debug output to openMSX's standard error stream</td>
    </tr>

    <tr>
      <td><code>set debugoutput &lt;output file&gt;</code></td>

      <td>Writes debug output to the specified file</td>
    </tr>
  </table>

  <div class="note">
    Note: This setting only exists if the <code>debugdevice</code> extension is present in the current MSX machine.
  </div>

  <h3><a id="default_machine">default_machine</a></h3>

  <p>Selects the default MSX model. openMSX uses this machine when it is started without the <code>-machine</code> option. This is a typical setting that should be saved, see also <a class="internal" href="#save_settings"><code>save_settings</code></a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set default_machine</code></td>

      <td>Shows current setting</td>
    </tr>

    <tr>
      <td><code>set default_machine Panasonic_FS-A1GT</code></td>

      <td>Use the turboR GT the next time openMSX is started</td>
    </tr>
  </table>

  <h3><a id="DirAsDSKmode">DirAsDSKmode</a></h3>

  <p>Determine the behavior of the DirAsDSK when inserting a directory to be used as diskimage.</p>

  <p>The possible values are <code>read_only</code>, <code>cached_write</code>, <code>nodelete</code> and <code>full</code>.</p>
  <p>Although it is the most risky mode, the default is set to <code>full</code>, since this is what most users expect from using DirAsDSK.</p>

  <table>
    <tr>
      <td><code>read_only</code></td>

      <td>The MSX can not write to the virtual disk.<br/>Changes on the host-OS are still reflected on the virtual disk, however.</td>
    </tr>

    <tr>
      <td><code>cached_write</code></td>

      <td>The MSX can write to the virtual disk, however, all changes are only cached in memory, no changes are passed onto the host-OS.<br/>Changes on the host-OS are still reflected on the virtual disk and will override any changes that the MSX has made.</td>
    </tr>

    <tr>
      <td><code>nodelete</code></td>

      <td>Changes are two ways, from host-OS to MSX and vice versa.<br/>However, deleting a file on the MSX will not delete the file on the host-OS. This can lead to unexpected behavior when the MSX later recreates a file with the same name, since this will be reflected towards the host-OS.</td>
    </tr>

    <tr>
      <td><code>full</code></td>

      <td>All changes are performed both ways, no restrictions apply.</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set DirAsDSKmode</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set DirAsDSKmode read_only</code></td>

      <td>Disk image will be read only</td>
    </tr>
  </table>

  <div class="note">
    Note: this setting is only used when the directory is inserted, it is not possible to change the behaviour of the current virtual disk by altering the setting. The new setting will become effective after the current virtual disk has been ejected.
  </div>
  <div class="note">
    Note: On turboR machines, the MSX keeps a cache of the directory sectors in memory. This means that changes made on the host OS are detected by the DirAsDSK routine, but will not show up in those machines. The data sectors will have been changed when reading, however. This can cause unexpected data to be read in the MSX environment. To rectify this situation, perform a disk eject and reinsert the directory again. This will cause the hardware switch that the turboR has to be toggled, and its internal cache to be invalidated. Since the turboR machines do not use a write cache, the changes on the MSX side are correctly written to the host OS.
  </div>

  <h3><a id="deinterlace">deinterlace</a></h3>

  <p>Turns deinterlacing on/off. Deinterlace is a filter which combines the even and odd field of interlaced video into a single frame which has double vertical resolution. It results in a sharp and stable image, but can show artifacts on fast animations.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set deinterlace</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set deinterlace on</code></td>

      <td>Turns deinterlacing on</td>
    </tr>

    <tr>
      <td><code>set deinterlace off</code></td>

      <td>Turns deinterlacing off</td>
    </tr>
  </table>

  <div class="note">
    Note: Not all renderers support deinterlacing.
  </div>

  <h3><a id="display_deform">display_deform</a></h3>

  <p>Select display deformation effect. This effect is only supported in the SDLGL-PP renderer.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set display_deform</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set display_deform normal</code></td>

      <td>Turns off display deform</td>
    </tr>

    <tr>
      <td><code>set display_deform 3d</code></td>

      <td>Deforms the image in 3D, to look like a CRT (like JEmu2)</td>
    </tr>
  </table>

  <div class="note">
    Note: In the past there was also a 'horizontal_stretch' mode. This is now replaced by the <code><a class="internal" href="#horizontal_stretch">horizontal_stretch</a></code> setting.
  </div>

  <h3><a id="frequency">frequency</a></h3>

  <p>Sets the sound mixer frequency. Sound hardware and sound APIs typically support a limited set of frequencies, such as 11025 Hz, 22050 Hz, 44100 Hz and 48000 Hz.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set frequency</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set frequency 44100</code></td>

      <td>Use 44.1 kHz mixing frequency (CD quality)</td>
    </tr>
  </table>


  <h3><a id="firmwareswitch">firmwareswitch</a></h3>

  <p>Some machines (e.g. turboR) have a switch on the front (or on the back) that controls if the machine should boot
  'normally' or start the built-in software, also called firmware. This setting controls the position of that
  switch.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set firmwareswitch</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set firmwareswitch on</code></td>

      <td>Boot into the internal software</td>
    </tr>

    <tr>
      <td><code>set firmwareswitch off</code></td>

      <td>Boot into MSX-BASIC or on-disk software</td>
    </tr>
  </table>

  <h3><a id="fullscreen">fullscreen</a></h3>

  <p>Switch to/from fullscreen mode.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set fullscreen</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set fullscreen on</code></td>

      <td>Switch to fullscreen mode</td>
    </tr>

    <tr>
      <td><code>set fullscreen off</code></td>

      <td>Switch to windowed mode</td>
    </tr>
  </table>

  <h3><a id="fullspeedwhenloading">fullspeedwhenloading</a></h3>

  <p>When enabled, openMSX will try to detect when the MSX is loading from diskette or cassette. During loading openMSX will run at full speed (<code><a class="internal" href="#throttle">throttle</a></code> off). This can be convenient if you're not interested in the realistic but slow loading times on MSX. Default is off, because it is not according to the behaviour of a real MSX.</p>

  <p>Unlike the fast loading features in for example fMSX, <code>fullspeedwhenloading</code> does not intercept BIOS calls. Instead, it speeds up the emulation of the entire MSX, including all hardware devices. This avoids bugs like VRAM corruption in several games (for example the intro of Aleste Gaiden), as well as working correctly with software that uses a custom loader that bypasses the BIOS.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set fullspeedwhenloading</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set fullspeedwhenloading on</code></td>

      <td>Load as fast as possible</td>
    </tr>

    <tr>
      <td><code>set fullspeedwhenloading off</code></td>

      <td>Load at the same speed as a real MSX</td>
    </tr>
  </table>

  <h3><a id="gamma">gamma</a></h3>

  <p>Sets the amount of gamma correction. A value of 1.0 will turn off gamma correction. Lower values will result in a darker image, higher values in a brighter image.</p>

  <p>If you want to get a realistic picture, set the openMSX gamma correction to <i>PC gamma / MSX gamma</i>. TVs use a standardised gamma of 2.5, let's take that as the value of <i>MSX gamma</i>. You can measure the gamma of your PC screen with a simple test such as the Gamma Measurement Image in <a class="external" href="http://www.bberger.net/rwb/gamma.html">Robert W. Berger's "An Explanation of Monitor Gamma"</a>. If your <i>PC gamma</i> would be for example 2.0, the most realistic value for gamma correction would be 2.0 / 2.5 = 0.8.</p>

  <p>Alternatively, you can just try a few values and see what you like.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set gamma</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set gamma &lt;num&gt;</code></td>

      <td>Sets a new gamma correction amount</td>
    </tr>
  </table>

  <h3><a id="glow">glow</a></h3>

  <p>Sets the amount of afterglow effect: 0 is off and 100 is a very heavy afterglow.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set glow</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set glow &lt;value&gt;</code></td>

      <td>Change the amount of afterglow</td>
    </tr>
  </table>

  <div class="note">
    Note: Not all renderers support this.
  </div>

  <h3><a id="grabinput">grabinput</a></h3>

  <p>Controls whether openMSX grabs all input events or not. When this setting is turned on, all input events are directly passed to openMSX. The mouse pointer can't leave the openMSX window and the window manager won't be able to react to keyboard shortcuts.</p>

   <p>You can turn this setting on when you want to use mouse-controlled MSX software while openMSX is in windowed mode. It is best turned off in all other cases. See also <a class="internal" href="#escape_grab"><code>escape_grab</code></a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set grabinput</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set grabinput on</code></td>

      <td>Starts grabbing all input events</td>
    </tr>

    <tr>
      <td><code>set grabinput off</code></td>

      <td>Stops grabbing all input events</td>
    </tr>
  </table>

  <h3><a id="horizontal_stretch">horizontal_stretch</a></h3>

  <p>Sets the amount of horizontal stretch, thus also the aspect ratio of the screen. More specifically, a setting of <code>n</code> means stretch the center <code>n</code> MSX pixels to the full width of the host output window (at <code><a class="internal" href="#scale_factor">scale_factor</a></code> 1).</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set horizontal_stretch</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set horizontal_stretch &lt;value&gt;</code></td>

      <td>Change the amount of horizontal stretch</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples of typical useful values:
  </div>

  <div class="examples">
    <code>set horizontal_stretch 320</code> (no horizontal stretch)<br />
    <code>set horizontal_stretch 272</code> (approach real aspect ratio of MSX screen)<br />
    <code>set horizontal_stretch 284</code> (default: show all generated border pixels, so that all border demo effects are still visible)<br />
    <code>set horizontal_stretch 256</code> (borders are not visible at all; doesn't work well in combination with set-adjust)
  </div>

  <div class="note">
    Note: Not all renderers support this: currently only the SDLGL-PP renderer.
  </div>

  <h3><a id="inputdelay">inputdelay</a></h3>

  <p>Input events for the MSX machine are delayed by this amount. Increase this value when the MSX machine misses keyboard presses when you type very fast. Decrease this value to reduce the latency between pressing a key on the host machine and seeing it being typed in the MSX machine.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set inputdelay</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set inputdelay &lt;time&gt;</code></td>

      <td>Sets the input delay to the specified number of seconds</td>
    </tr>
  </table>

  <div class="note">
    Note: The default value of 0.03 seconds should almost always be OK, this small delay is practically not noticeable and still allows the MSX machine to get accurate timing on the input events. Please <b>do not change</b> the value of this setting unless you know what you are doing.
  </div>

  <h3><a id="kbd_auto_toggle_code_kana_lock">kbd_auto_toggle_code_kana_lock</a></h3>

  <p>Switches the "Automatically toggle the CODE/KANA lock" feature on or off. When it's on, openMSX will
  automatically toggle the CODE/KANA lock when a user enters a character for which the CODE/KANA lock
  state must be changed.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set kbd_auto_toggle_code_kana_lock</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_auto_toggle_code_kana_lock&nbsp;on</code></td>

      <td>Automatically toggle the CODE/KANA lock when required</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_auto_toggle_code_kana_lock&nbsp;off</code></td>

      <td>Only toggle CODE/KANA lock status when user presses the CODE/KANA lock key</td>
    </tr>
  </table>

  <div class="note">
    Note: This only works on MSX models for which the CODE/KANA key locks (e.g. Japanese MSX models and the Philips VG8010). On other models, this setting is ignored.
  </div>

  <h3><a id="kbd_code_kana_host_key">kbd_code_kana_host_key</a></h3>

  <p>Host key that maps to the MSX CODE/KANA key.</p>
  <p>It is especially useful for
  people with AZERTY host keyboard, on which the right-ALT key (RALT, which is
  the default value of this setting) has a special function; it is called the
  ALT-GR key and it's used to enter some special characters (some keys are
  tagged with 3 characters; normal, key+SHIFT, key+ALT-GR).</p>
  <p>It is also useful for people with a Japanese (jp106) keyboard; they can map the HENKAN_MODE key (which is similar to the KANA Lock on Japanese MSX models) to the CODE/KANA key.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set&nbsp;kbd_code_kana_host_key</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_code_kana_host_key&nbsp;MENU</code></td>

      <td>Binds the MENU key on the host keyboard to the MSX CODE/KANA key</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_code_kana_host_key&nbsp;HENKAN_MODE</code></td>

      <td>Binds the HENKAN_MODE key on the host keyboard to the MSX CODE/KANA key</td>
    </tr>
  </table>

  <h3><a id="kbd_keymap_filename">kbd_keymap_filename</a></h3>

  <p>Sets the filename of the file that contains a mapping from host keys to MSX keys.</p>
  <p>In CHARACTER <a class="internal" href="#kbd_mapping_mode">mapping mode</a>, it is only used for special keys for
  which no unicode character exists, like the SHIFT key, the ALT key and so on.</p>
  <p>In KEY <a class="internal" href="#kbd_mapping_mode">mapping mode</a>, it is used for all keys but the ones for which a special
  setting exists (like <code><a class="internal"
  href="#kbd_numkeypad_enter_key">kbd_numkeypad_enter_key</a></code>).</p>
  <p>By default, this setting is not set but a built-in mapping is used. The built-in
  mapping maps from a US-QWERTY host keyboard to an 'international'-QWERTY MSX keyboard</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set kbd_keymap_filename</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set kbd_keymap_filename keymap.jp2eng</code></td>

      <td>Use the mapping from the file keymap.jp2eng</td>
    </tr>
  </table>

  <h3><a id="kbd_mapping_mode">kbd_mapping_mode</a></h3>

  <p>The keyboard driver can work in two mapping modes; KEY mapping and CHARACTER mapping.</p>

  <dl>
    <dt>KEY mapping:</dt>
    <dd>A key pressed on the host keyboard maps to one specific key on the MSX keyboard. This mode
  is convenient when the host keyboard and the MSX keyboard have the same layout or when working with a program
  that directly reads the keyboard matrix and forces the user to enter a certain key combination that can not
  be auto-generated in the CHARACTER mapping mode.</dd>
    <dt>CHARACTER mapping:</dt>
    <dd>A character entered by the user is mapped to the correct key combination on the MSX to
  enter that character. For example, when the user enters an ! character and openMSX is emulating an 'international'
  MSX model, the keyboard driver will press SHIFT and 1 on the MSX keyboard. This will be done regardless of the key
  or keys that the user pressed on the host keyboard to enter the ! character.<br/>
  This is especially useful when the user has an AZERTY host keyboard and is working on a QWERTY style MSX or
  when he has a US-QWERTY keyboard and is working on a Japanese MSX.<br/>
  Note that special keys (like CAPSLOCK) are mapped directly, just like in the KEY mapping mode.</dd>
  </dl>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set&nbsp;kbd_mapping_mode</code></td>

      <td>Shows the current mode</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_mapping_mode&nbsp;CHARACTER</code></td>

      <td>Set the CHARACTER mapping mode</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_mapping_mode&nbsp;KEY</code></td>

      <td>Set the KEY mapping mode</td>
    </tr>

  </table>

  <h3><a id="kbd_numkeypad_always_enabled">kbd_numkeypad_always_enabled</a></h3>

  <p>Some real MSX computers do not have a numeric keypad. openMSX will ignore
  key presses on the host numeric keypad when emulating such an MSX model.
  With this parameter, you can indicate that even on such MSX models, presses
  on the host numeric keypad must be mapped to the MSX numeric keypad. So, you
  can override accurate behaviour with it, which is the reason that by default,
  this setting is set to 'off'.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set kbd_numkeypad_always_enabled</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set kbd_numkeypad_always_enabled on</code></td>

      <td>Enables numeric keypad, even if the emulated MSX does not have one</td>
    </tr>
  </table>

  <h3><a id="kbd_numkeypad_enter_key">kbd_numkeypad_enter_key</a></h3>

  <p>There is a subtle difference between numeric keypad of MSX computers and
  of most host computers; the MSX computers have a '.' and a ',' on the numeric
  keypad. On the other hand, the host computers have a '.' and an 'ENTER' key
  on the keypad.</p>

  <p>In some respect it is logical that the 'ENTER' key on the host numeric
  keypad is mapped to the 'normal' MSX 'ENTER' key. On the other hand, that
  would make it impossible to enter the ',' on the MSX numeric keypad.
  Therefore, the user can choose whether the host numeric keypad ENTER key
  should be mapped to the MSX numeric keypad ',' (which is the default) or to
  the main 'ENTER' key.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set&nbsp;kbd_numkeypad_enter_key</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set&nbsp;kbd_numkeypad_enter_key&nbsp;ENTER</code></td>

      <td>Maps the keypad enter key to the main 'ENTER' key, instead of the comma key on the MSX keypad</td>
    </tr>
  </table>

  <h3><a id="kbd_trace_key_presses">kbd_trace_key_presses</a></h3>

  <p>Log SDL key code, SDL modifiers and Unicode value for each key that gets
  pressed on the host keyboard on stderr.  Also show Unicode value and
  corresponding MSX key-presses for characters that get 'pasted' into the MSX
  by the console <code><a class="internal" href="#type">type</a></code>
  command. This setting is especially useful when defining unicode keymap
  files, so that you can find out the unicode values belonging to certain
  keys/characters.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set kbd_trace_key_presses</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set kbd_trace_key_presses on</code></td>

      <td>Turn logging of key presses on</td>
    </tr>

  </table>

  <h3><a id="keyjoystick_n_button">keyjoystick&lt;n&gt;.&lt;button&gt;</a></h3>

  <p>Configure the keys of the keyjoysticks. It's likely this will change in the future.</p>

  <p>Valid values for <code>&lt;n&gt;</code>: <code>1</code>, <code>2</code>.</p>

  <p>Valid values for <code>&lt;button&gt;</code>: <code>up</code>, <code>down</code>, <code>left</code>, <code>right</code>, <code>triga</code>, <code>trigb</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set keyjoystick1.up W</code></td>
    </tr>

    <tr>
      <td><code>set keyjoystick1.down S</code></td>
    </tr>

    <tr>
      <td><code>set keyjoystick1.left A</code></td>
    </tr>

    <tr>
      <td><code>set keyjoystick1.right D</code></td>
    </tr>

    <tr>
      <td><code>set keyjoystick1.triga SPACE</code></td>
    </tr>
  </table>


  <h3><a id="led">led_&lt;name&gt;</a></h3>

  <p>These are read-only settings. Their value reflects the current status of the corresponding LED on the emulated MSX machine. The currently supported LED names are: <code>power</code>, <code>caps</code>, <code>kana</code>, <code>pause</code>, <code>turbo</code> and <code>FDD</code>.</p>

  <p>As for any setting you can use the native <code>trace</code> Tcl command to trigger a callback when the value of these settings changes. (In fact this possibility was the main motivation to make these read-only settings instead of topics of the <code><a class="internal" href="#machine_info">machine_info</a></code> command.)</p>


  <h3><a id="limitsprites">limitsprites</a></h3>

  <p>Controls whether the VDP has a limit on the number of sprites it can display per line. The default is on, because the real VDP has such a limit. You can turn off the limit to reduce sprite flashing in games such as Aleste. Note that some games (Penguin Adventure, among others) make use of this limitation, so they will display incorrectly if the limit is turned off.</p>

  <p>The 5th/9th sprite status flag of the VDP is not influenced by the <code>limitsprites</code> setting: the flag always takes the limit into account.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set limitsprites</code></td>

      <td>Shows the current value</td>
    </tr>

    <tr>
      <td><code>set limitsprites on</code></td>

      <td>Limits number of sprites per line</td>
    </tr>

    <tr>
      <td><code>set limitsprites off</code></td>

      <td>Turns off number of sprites per line limit</td>
    </tr>
  </table>

  <h3><a id="master_volume">master_volume</a></h3>

  <p>Controls the overall openMSX volume. The volume of individual sound devices can be controlled with the <code><a class="internal" href="#soundchip_volume">&lt;soundchip&gt;_volume</a></code> settings.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set master_volume</code></td>

      <td>Shows current setting</td>
    </tr>

    <tr>
      <td><code>set master_volume 50</code></td>

      <td>Sets master volume to 50%</td>
    </tr>
  </table>

  <h3><a id="maxframeskip">maxframeskip</a></h3>

  <p>Sets the maximum amount of frames to skip: show a frame and then skip at most &lt;number&gt; frames. So 0 means show everything (no frame skipping), 1 means show at least every second frame etc.</p>

  <p>Frame skipping is done on demand, as a way to keep the flow of time for the emulated MSX in sync with the flow of real time. You can set limits on the amount of frame skipping with the <code><a class="internal" href="#minframeskip">minframeskip</a></code> and <code>maxframeskip</code> setting.</p>

  <p>In a situation where the number of consecutive frames specified by <code>maxframeskip</code> has been skipped, openMSX will display the next frame, even if that means emulation will start lagging behind real time.</p>

  <p>When <code><a class="internal" href="#throttle">throttle</a></code> is off, the number of skipped frames will be equal to <code>maxframeskip</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set maxframeskip</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set maxframeskip &lt;number&gt;</code></td>

      <td>Sets the maximum number of consecutive frame skips</td>
    </tr>
  </table>

  <h3><a id="midi-in-readfilename">midi-in-readfilename</a></h3>

  <p>Sets the file from which the MIDI input is read. By default, it is set to <code>/dev/midi</code> when available.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set midi-in-readfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set midi-in-readfilename mymidilog.dat</code></td>

      <td>Read MIDI events from "mymidilog.dat"</td>
    </tr>
  </table>

  <h3><a id="midi-out-logfilename">midi-out-logfilename</a></h3>

  <p>Sets the file to which the MIDI output is logged. By default, it logs to <code>/dev/midi</code> when available.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set midi-out-logfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set midi-out-logfilename mymidilog.dat</code></td>

      <td>Log MIDI events to "mymidilog.dat"</td>
    </tr>
  </table>

  <h3><a id="minframeskip">minframeskip</a></h3>

  <p>Sets the minimum amount of frames to skip: show a frame and then skip at least &lt;number&gt; frames.
  So 0 means no forced frame skipping, 1 means skip at least every second frame etc.</p>

  <p>Frame skipping is done on demand, as a way to keep the flow of time for the emulated MSX in sync with the flow of real time. You can set limits on the amount of frame skipping with the <code>minframeskip</code> and <code><a class="internal" href="#maxframeskip">maxframeskip</a></code> setting.</p>

  <p>The <code>minframeskip</code> setting can be useful if you want to ease the burden on your PC processor, for example for longer battery life on a laptop. It can also be useful if your PC is consistently too slow to run without frame skipping: in such cases video might be smoother with a low but constant frame rate than with a fluctuating frame rate.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set minframeskip</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set minframeskip &lt;number&gt;</code></td>

      <td>Sets the number of frame skips</td>
    </tr>
  </table>

  <h3><a id="mute">mute</a></h3>

  <p>Mute/unmute all sound output.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set mute</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set mute on</code></td>

      <td>Mute sound</td>
    </tr>

    <tr>
      <td><code>set mute off</code></td>

      <td>Unmute sound</td>
    </tr>
  </table>

  <h3><a id="noise">noise</a></h3>

  <p>Controls the amount of Gaussian noise that is added to the video output. A small amount of noise can give a more authentic look to the video output on TFTs. Values can be between 0 and 100, where 0 is no noise and 100 is lots of noise.</p>

  <p>This setting is best combined with <code><a class="internal" href="#brightness">brightness</a></code> and <code><a class="internal" href="#contrast">contrast</a></code>: noise creates small random fluctuations in the brightness of pixels. When noise is applied to pure black, it is not possible to make it any darker, so half of the time the noise is ineffective. The same happens with pure white. By setting the <code><a class="internal" href="#brightness">brightness</a></code> slightly above 0 and <code><a class="internal" href="#contrast">contrast</a></code> slightly below 0, you will get a better looking noise effect.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set noise</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set noise 7</code></td>

      <td>Add a moderate amount of noise</td>
    </tr>
  </table>

  <h3><a id="pause">pause</a></h3>

  <p>Pauses the emulation.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set pause</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set pause on</code></td>

      <td>Pauses emulation</td>
    </tr>

    <tr>
      <td><code>set pause off</code></td>

      <td>Unpauses emulation</td>
    </tr>
  </table>

  <div class="note">
    Note: Some video settings cannot be applied to an already rendered frame and will therefore not take effect until openMSX is unpaused.
  </div>

  <h3><a id="power">power</a></h3>

  <p>Turn the power of the emulated MSX machine on or off.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set power</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set power on</code></td>

      <td>Turns the MSX machine on (the default)</td>
    </tr>

    <tr>
      <td><code>set power off</code></td>

      <td>Turns the MSX machine off</td>
    </tr>
  </table>

  <h3><a id="printerlogfilename">printerlogfilename</a></h3>

  <p>Sets the file to which the printer logger writes.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set printerlogfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set printerlogfilename myprinterlog.txt</code></td>

      <td>Log to "myprinterlog.txt"</td>
    </tr>
  </table>

  <h3><a id="print-resolution">print-resolution</a></h3>

  <p>Sets the resolution (in dpi) for the emulated dot-matrix printer.</p>

  <p>The emulated printer 'prints' pages as PNG files. This settings determines the resolution of those images.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set print-resolution</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set print-resolution 600</code></td>

      <td>Sets resolution to 600 dpi</td>
    </tr>
  </table>

  <h3><a id="r800_freq">r800_freq / r800_freq_locked</a></h3>

  <p>These two settings control the R800 clock frequency. See <code><a class="internal" href="#z80_freq">z80_freq / z80_freq_locked</a></code> for details.</p>

  <h3><a id="renderer">renderer</a></h3>

  <p>Switch to a different video renderer. See the User's Manual for <a class="external" href="user.html#renderers">a description of the available renderers</a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set renderer</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set renderer &lt;name&gt;</code></td>

      <td>Switches to the given renderer</td>
    </tr>
  </table>

  <h3><a id="renshaturbo">renshaturbo</a></h3>

  <p>Sets the speed of the built-in auto fire on some Japanese MSX models, for example the turboR machines. A value of 0 turns off auto fire, while 100 selects the most rapid auto fire.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set renshaturbo</code></td>

      <td>Shows the current renshaturbo value</td>
    </tr>

    <tr>
      <td><code>set renshaturbo &lt;num&gt;</code></td>

      <td>Sets speed to value &lt;num&gt;</td>
    </tr>
  </table>

  <div class="note">
    Note: This setting is only available if the current MSX machine has hardware Rensha Turbo support.
  </div>

  <h3><a id="resampler">resampler</a></h3>

  <p>Sets the method to resample the sound of sound chips from their native frequency to the <a class="internal" href="#frequency">desired output frequency</a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set resampler</code></td>

      <td>Shows the currently active resampler</td>
    </tr>

    <tr>
      <td><code>set resampler fast</code></td>

      <td>Sets a fast, but low quality resampler. This uses simple linear interpolation, which can result in very audible aliasing effects in some cases. Although this is a relatively low quality algorithm, it's the algorithm that was used in pre-0.6.3 openMSX versions (and most other MSX emulators).</td>
    </tr>

    <tr>
      <td><code>set resampler blip</code></td>

      <td>Sets the <a href="http://slack.net/~ant/libs/audio.html#Blip_Buffer">Blip_Buffer</a> based resampler, which has the best quality per CPU usage ratio (this is the default value).</td>
    </tr>

    <tr>
      <td><code>set resampler hq</code></td>

      <td>Sets the highest quality resampler, but it also takes the most CPU time. It's based on the <a href="http://www.mega-nerd.com/SRC/">libsamplerate</a> algorithm.</td>
    </tr>
  </table>


  <h3><a id="rs232-inputfilename">rs232-inputfilename</a></h3>

  <p>Sets the file from which the RS232-tester reads data.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set rs232-inputfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set rs232-inputfilename myrs232input.txt</code></td>

      <td>Reads from "myrs232input.txt"</td>
    </tr>
  </table>

  <h3><a id="rs232-outputfilename">rs232-outputfilename</a></h3>

  <p>Sets the file to which the RS232-tester writes the data.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set rs232-outputfilename</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set rs232-outputfilename myrs232output.txt</code></td>

      <td>Write to "myrs232output.txt"</td>
    </tr>
  </table>

  <h3><a id="rtcmode">rtcmode</a></h3>

  <p>Sets the Real Time Clock mode. Can be either <code>RealTime</code> or <code>EmuTime</code>.</p>

  <p>In <code>RealTime</code> mode the MSX clock is always synchronized with the host clock, even when for example emulation is paused for a while or when emulation is run at 200% of real speed.</p>

  <p>In <code>EmuTime</code> mode the time is only synchronized with the host clock when openMSX starts. From then on the clock ticks at the same pace as the emulated machine. So when emulation is paused, the clock is paused as well. If emulation is run at 200% speed, the clock also ticks twice as fast.</p>

  <p>In <code>EmuTime</code> mode it's not possible for a MSX program to detect whether it's running on a real or on an emulated machine. That's why this is the default mode. On the other hand the <code>RealTime</code> mode might be better if for example you care that timestamps of files written by the emulated MSX machine are in sync with the host machine time.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set rtcmode</code></td>

      <td>Shows the current mode</td>
    </tr>

    <tr>
      <td><code>set rtcmode EmuTime</code></td>

      <td>Set EmuTime mode (the default)</td>
    </tr>

    <tr>
      <td><code>set rtcmode RealTime</code></td>

      <td>Set RealTime mode</td>
    </tr>
  </table>

  <h3><a id="samples">samples</a></h3>

  <p>Sets the size of the sound mixer buffer. Higher values help against buffer underruns (hickups), but increase the latency of the sound output.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set samples</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set samples 1024</code></td>

      <td>Use a mixing buffer of 1024 samples</td>
    </tr>
  </table>

  <h3><a id="save_settings_on_exit">save_settings_on_exit</a></h3>

  <p>Automatically save the current settings when openMSX exits: execute a <code><a class="internal" href="#save_settings">save_settings</a></code> command on exit.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set save_settings_on_exit</code></td>

      <td>Show current setting</td>
    </tr>

    <tr>
      <td><code>set save_settings_on_exit on</code></td>

      <td>Enable auto save</td>
    </tr>

    <tr>
      <td><code>set save_settings_on_exit off</code></td>

      <td>Disable auto save</td>
    </tr>
  </table>

  <h3><a id="scale_algorithm">scale_algorithm</a></h3>

  <p>Selects the algorithm used to transform MSX pixels to host pixels. The User's Manual contains <a class="external" href="user.html#scalers">more information about scalers</a>.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set scale_algorithm</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set scale_algorithm simple</code></td>

      <td>Selects the default scale algorithm</td>
    </tr>

    <tr>
      <td><code>set scale_algorithm hq</code></td>

      <td>Selects the HQ2x/3x/4x scale algorithm</td>
    </tr>
  </table>

  <div class="note">
    Note: Not all renderers support all scale algorithms.
  </div>

  <h3><a id="scale_factor">scale_factor</a></h3>

  <p>Selects the scale factor. Scale factor &lt;n&gt; means the typical MSX pixel (MSX resolution 256&times;212) is mapped on &lt;n&gt; by &lt;n&gt; host pixels. For the moment the possible values are 1 to 4. In the future we may support a wider range or even non-integer values. The User's Manual contains <a class="external" href="user.html#scalers">more information about scalers</a>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set scale_factor</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set scale_factor &lt;n&gt;</code></td>

      <td>Sets a new scale factor</td>
    </tr>
  </table>

  <div class="note">
    Note: Not all renderers support all scale factors.
  </div>

  <h3><a id="scanline">scanline</a></h3>

  <p>Sets the amount of scanline effect.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set scanline</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set scanline &lt;value&gt;</code></td>

      <td>Changes the value</td>
    </tr>
  </table>

  <div class="note">
    Note: Some scalers will not render scanlines at all.
  </div>

  <h3><a id="sound_driver">sound_driver</a></h3>

  <p>Select the sound output driver. The list of available sound drivers is platform specific.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set sound_driver sdl</code></td>

      <td>Selects the SDL sound driver (all platforms)</td>
    </tr>

    <tr>
      <td><code>set sound_driver directx</code></td>

      <td>Selects the DirectX sound driver (Windows only)</td>
    </tr>
  </table>

  <h3><a id="speed">speed</a></h3>

  <p>Sets the emulation speed relative to the speed of a real MSX. Speed 100 means as fast as a real MSX, lower values are slower than real MSX, higher values are faster than real MSX.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set speed</code></td>

      <td>Shows current emulation speed</td>
    </tr>

    <tr>
      <td><code>set speed &lt;num&gt;</code></td>

      <td>Sets new emulation speed</td>
    </tr>
  </table>

  <h3><a id="soundchip_balance">&lt;soundchip&gt;_balance</a></h3>

  <p>Sets the balance (distribution over the left and right channel) for individual sound chips. It replaces the previously available <code>&lt;soundchip&gt;_mode</code> setting. The range is between -100 (totally left) and 100 (totally right).</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_balance</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_balance 0</code></td>

      <td>Plays the output of this chip on both the left and right channel</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_balance -100</code></td>

      <td>Plays the output of this chip on only the left channel</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_balance 75</code></td>

      <td>Plays the output of this chip mostly on the right channel, but also a bit on the left channel</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_balance</code><br />
    <code>set PSG_balance -100</code><br />
    <code>set FMPAC_balance 0</code>
  </div>

  <h3><a id="soundchip_channel_record">&lt;soundchip&gt;_ch&lt;channel&gt;_record</a></h3>

  <p>Sets the filename to which the sound of an individual channel of
  individual sound chips should be recorded. When this setting is not set, no
  recording takes place and recording starts as soon as the setting is set.
  Normally, you would probably prefer to use the <code><a class="internal"
  href="#record_channels">record_channels</a></code> command to set up channel
  recording instead of this low level setting.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_ch&lt;channel&gt;_record</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_ch&lt;channel&gt;_record filename</code></td>

      <td>Starts recording the sound of the specified chip and channel to the file with name &lt;filename&gt;</td>
    </tr>

  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set SCC_ch1_record</code><br />
    <code>set PSG_ch3 /tmp/PSG_ch3.wav</code>
  </div>

  <h3><a id="soundchip_channel_mute">&lt;soundchip&gt;_ch&lt;channel&gt;_mute</a></h3>

  <p>Use to mute a specific channel of an individual sound chip.
  Normally, you would probably prefer to use the <code><a class="internal"
  href="#mute_channels">mute_channels</a></code> command to set up channel
  muting instead of this low level setting.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_ch&lt;channel&gt;_mute</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_ch&lt;channel&gt;_record on</code></td>

      <td>Mutes the sound of the specified channel of the specified chip</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_ch&lt;channel&gt;_record off</code></td>

      <td>Unmutes the sound of the specified channel of the specified chip</td>
    </tr>

  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set SCC_ch1_mute</code><br />
    <code>set PSG_ch3_mute on</code><br />
    <code>set SCC_ch5_mute off</code>
  </div>

  <h3><a id="soundchip_detune_frequency">&lt;soundchip&gt;_detune_frequency</a></h3>

  <p>Sets the frequency of the detune (a random variation in a sound's frequency) effect. It makes a sound fatter and more natural, as if played by a human being.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_detune_frequency</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_detune_frequency &lt;num&gt;</code></td>

      <td>Sets new detune frequency in Hz; 1 is minimum, 100 is maximum</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_detune_frequency</code><br />
    <code>set PSG_detune_frequency 5</code> (default)<br />
  </div>

  <div class="note">
    Note: For now, this setting is only available for the PSG soundchip.
  </div>
  <div class="note">
    Note: It is often more convenient to use the <code><a class="internal" href="#psg_profile">psg_profile</a></code> command.
  </div>

  <h3><a id="soundchip_detune_percent">&lt;soundchip&gt;_detune_percent</a></h3>

  <p>Sets the strength of the detune effect. By default it is 0, which means the effect is switched off.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_detune_percent</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_detune_percent &lt;num&gt;</code></td>

      <td>Sets new detune strength; 0 is minimum, 10 is maximum</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_detune_percent</code><br />
    <code>set PSG_detune_percent 0</code> (switched off, default)<br />
    <code>set PSG_detune_percent 0.5</code> (recommended)<br />
  </div>

  <div class="note">
    Note: For now, this setting is only available for the PSG soundchip.
  </div>
  <div class="note">
    Note: It is often more convenient to use the <code><a class="internal" href="#psg_profile">psg_profile</a></code> command.
  </div>

  <h3><a id="soundchip_vibrato_frequency">&lt;soundchip&gt;_vibrato_frequency</a></h3>

  <p>Sets the frequency of the vibrato (a periodic variation in a sound's frequency) effect.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_vibrato_frequency</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_vibrato_frequency &lt;num&gt;</code></td>

      <td>Sets new vibrato frequency in Hz; 1 is minimum, 10 is maximum</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_vibrato_frequency</code><br />
    <code>set PSG_vibrato_frequency 5</code> (default)<br />
  </div>

  <div class="note">
    Note: For now, this setting is only available for the PSG soundchip.
  </div>
  <div class="note">
    Note: It is often more convenient to use the <code><a class="internal" href="#psg_profile">psg_profile</a></code> command.
  </div>

  <h3><a id="soundchip_vibrato_percent">&lt;soundchip&gt;_vibrato_percent</a></h3>

  <p>Sets the strength of the vibrato effect. By default it is 0, which means the effect is switched off.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_vibrato_percent</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_vibrato_percent &lt;num&gt;</code></td>

      <td>Sets new vibrato strength; 0 is minimum, 10 is maximum</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_vibrato_percent</code><br />
    <code>set PSG_vibrato_percent 0</code> (switched off, default)<br />
    <code>set PSG_vibrato_percent 1</code> (recommended)<br />
  </div>

  <div class="note">
    Note: For now, this setting is only available for the PSG soundchip.
  </div>
  <div class="note">
    Note: It is often more convenient to use the <code><a class="internal" href="#psg_profile">psg_profile</a></code> command.
  </div>

  <h3><a id="soundchip_volume">&lt;soundchip&gt;_volume</a></h3>

  <p>Sets the volume for individual sound chips. The overall volume is controlled by the <code><a class="internal" href="#master_volume">master_volume</a></code> setting.
  </p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set &lt;soundchip&gt;_volume</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set &lt;soundchip&gt;_volume &lt;num&gt;</code></td>

      <td>Sets new volume; 0 is off, 100 is maximum</td>
    </tr>
  </table>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    <code>set PSG_volume</code><br />
    <code>set PSG_volume 60</code><br />
    <code>set "FMPAC_volume" 50</code>
  </div>

  <h3><a id="throttle">throttle</a></h3>

  <p>Sets throttle mode. In throttle mode the emulator tries to run at the specified speed relative to a real MSX (see <a class="internal" href="#speed">speed</a> command). When throttling is turned off the emulator runs as fast as possible.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set throttle</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set throttle on</code></td>

      <td>Turn throttle mode on (normal operation)</td>
    </tr>

    <tr>
      <td><code>set throttle off</code></td>

      <td>Turn throttle mode off (fast forward)</td>
    </tr>
  </table>


  <h3><a id="turborpause">turborpause</a></h3>

  <p>Controls the pause key on a MSX turboR machine.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set turborpause</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set turborpause on</code></td>

      <td>Activate the pause key</td>
    </tr>

    <tr>
      <td><code>set turborpause off</code></td>

      <td>Deactivate the pause key</td>
    </tr>
  </table>

  <div class="note">
    Note: If you use this setting often, it may be useful to bind it to a key on your PC keyboard. See the <code><a class="internal" href="#bind">bind</a></code> and <code><a class="internal" href="#toggle">toggle</a></code> commands.
  </div>


  <h3><a id="umr_callback">umr_callback</a></h3>

  <p>Selects the Tcl procedure to be called when an Uninitialized Memory Read has been detected. This is useful for debugging MSX programs: uninitialized memory is not guaranteed to have any particular value, so reading it is most likely a bug.</p>

  <p>By default this setting is empty, which means that nothing is done when an Uninitialized Memory Read is detected. We ship a useful procedure called <code>umrcallback</code> which logs all UMRs. You can activate it with <code>set umr_callback umrcallback</code>. You can find the source code for this procedure in <code>scripts/umrcallback.tcl</code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set umr_callback</code></td>

      <td>Shows the current UMR callback setting</td>
    </tr>

    <tr>
      <td><code>set umr_callback umrcallback</code></td>

      <td>Sets callback proc to <code>umrcallback</code></td>
    </tr>
  </table>

  <h3><a id="user_directories">user_directories</a></h3>

  <p>Contains the list of "user directories". This makes it a bit more convenient to insert disks, tapes, ROMs etc. The Setup Guide describes <a class="external" href="setup.html#settings">how the user directories mechanism works</a>. This setting is a list in Tcl format (items are space separated or enclosed in braces, see Tcl
  manual for details). Thus all Tcl functions to manipulate lists can be used on this setting.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set user_directories</code></td>

      <td>Shows the current list</td>
    </tr>

    <tr>
      <td><code>set user_directories "~/disks ~/roms"</code></td>

      <td>Replace the list with a new one</td>
    </tr>

    <tr>
      <td><code>set user_directories {}</code></td>

      <td>Remove all user directories</td>
    </tr>

    <tr>
      <td><code>lappend user_directories ~/tapes</code></td>

      <td>Add a directory to the list</td>
    </tr>
  </table>

  <h3><a id="vdpcmdtrace">vdpcmdtrace</a></h3>

  <p>Enable/disable VDP command tracing. When enabled, every VDP command is logged on stdout. This is useful when debugging MSX programs that use the VDP command engine.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set vdpcmdtrace</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set vdpcmdtrace on</code></td>

      <td>Enables VDP command tracing</td>
    </tr>

    <tr>
      <td><code>set vdpcmdtrace off</code></td>

      <td>Disables VDP command tracing</td>
    </tr>
  </table>

  <h3><a id="videosource">videosource</a></h3>

  <p>Switch between <code>MSX</code> (V99x8) or <code>GFX9000</code> (V9990) video source.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set videosource</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set videosource MSX</code></td>

      <td>Switch to normal MSX screen</td>
    </tr>

    <tr>
      <td><code>set videosource GFX9000</code></td>

      <td>Switch to GFX9000 screen</td>
    </tr>
  </table>

  <div class="note">
    Note: This setting is only available if the <code>gfx9000</code> extension is present.
  </div>

  <h3><a id="v9990cmdtrace">v9990cmdtrace</a></h3>

  <p>Enable/disable V9990 command tracing. This is the V9990 equivalent of <code><a class="internal" href="#vdpcmdtrace">vdpcmdtrace</a></code>.</p>

  <div class="subsectiontitle">
    usage:
  </div>

  <table>
    <tr>
      <td><code>set v9990cmdtrace</code></td>

      <td>Shows the current setting</td>
    </tr>

    <tr>
      <td><code>set v9990cmdtrace on</code></td>

      <td>Enables V9990 command tracing</td>
    </tr>

    <tr>
      <td><code>set v9990cmdtrace off</code></td>

      <td>Disables V9990 command tracing</td>
    </tr>
  </table>

  <div class="note">
    Note: This setting is only available if the <code>gfx9000</code> extension is present.
  </div>

  <h3><a id="z80_freq">z80_freq / z80_freq_locked</a></h3>

  <p>These two settings control the Z80 clock frequency. When <code>z80_freq_locked</code> is true the emulated Z80 runs at the normal 3.5 MHz (or optionally 5.3 MHz on some machines). When <code>z80_freq_locked</code> is false the value of <code>z80_freq</code> is taken as the Z80 clock frequency.</p>

  <div class="subsectiontitle">
    examples:
  </div>

  <div class="examples">
    Overclock Z80 to 14 MHz:<br />
    <code>set z80_freq 14318180</code><br />
    <code>set z80_freq_locked false</code><br />
    <br />
    F8 switches between 3.5 MHz and 7 MHz:<br />
    <code>set Z80_freq 7159090</code><br />
    <code>bind F8 "toggle z80_freq_locked"</code><br />
  </div>

  <p class="version">$Id: commands.html 8398 2008-12-09 09:23:52Z m9710797 $</p>
</body>
</html>